type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
includes | #include <net/sock.h> |
includes | #include <linux/nsproxy.h> |
defines | #define __copy(_field) compat_info._field = info->_field |
defines |
#define __copy(_field) family->family._field = family->_field |
defines | #define __copy(_field) ops[i].ops._field = ops[i]._field |
structs | struct led_timer {
struct list_head list;
struct led_classdev *cdev;
struct timer_list blink_timer;
unsigned long blink_delay_on;
unsigned long blink_delay_off;
int blink_brightness;
}; |
functions | int nl_doit_wrapper(struct sk_buff *skb, struct genl_info *info)
{
struct compat_genl_info compat_info;
struct genl_family *family;
struct genl_ops *ops;
int err;
list_for_each_entry(family, &compat_nl_fam, list) {
if (family->id == info->nlhdr->nlmsg_type)
goto found;
} |
functions | __copy
if (family->pre_doit) {
err = family->pre_doit(ops, skb, &compat_info);
if (err)
return err;
} |
functions | int compat_genl_register_family_with_ops(struct genl_family *family,
struct genl_ops *ops, size_t n_ops)
{
int i, ret;
__copy(id);
__copy(hdrsize);
__copy(version);
__copy(maxattr);
strncpy(family->family.name, family->name, sizeof(family->family.name));
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
... |
functions | int compat_genl_unregister_family(struct genl_family *family)
{
int err;
err = genl_unregister_family(&family->family);
list_del(&family->list);
return err;
} |
functions | void led_brightness_set(struct led_classdev *led_cdev,
enum led_brightness brightness)
{
led_cdev->brightness = brightness;
led_cdev->brightness_set(led_cdev, brightness);
} |
functions | void led_stop_software_blink(struct led_timer *led)
{
del_timer_sync(&led->blink_timer);
led->blink_delay_on = 0;
led->blink_delay_off = 0;
} |
functions | void led_timer_function(unsigned long data)
{
struct led_timer *led = (struct led_timer *)data;
unsigned long brightness;
unsigned long delay;
if (!led->blink_delay_on || !led->blink_delay_off) {
led->cdev->brightness_set(led->cdev, LED_OFF);
return;
} |
functions | void led_blink_set(struct led_classdev *led_cdev,
unsigned long *delay_on,
unsigned long *delay_off)
{
struct led_timer *led;
int current_brightness;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25))
if (led_cdev->blink_set &&
!led_cdev->blink_set(led_cdev, delay_on, delay_off))
return;
#endif
l... |
functions | void compat_led_brightness_set(struct led_classdev *led_cdev,
enum led_brightness brightness)
{
struct led_timer *led = led_get_timer(led_cdev);
if (led)
led_stop_software_blink(led);
return led_cdev->brightness_set(led_cdev, brightness);
} |
functions | void compat_led_classdev_unregister(struct led_classdev *led_cdev)
{
struct led_timer *led = led_get_timer(led_cdev);
unsigned long flags;
if (led) {
del_timer_sync(&led->blink_timer);
spin_lock_irqsave(&led_lock, flags);
list_del(&led->list);
spin_unlock_irqrestore(&led_lock, flags);
kfree(led);
} |
includes |
#include <linux/module.h> |
includes | #include <linux/init.h> |
includes | #include <linux/device.h> |
includes | #include <linux/fs.h> |
includes | #include <linux/kthread.h> |
includes | #include <linux/file.h> |
includes | #include <linux/suspend.h> |
includes | #include <media/v4l2-common.h> |
defines |
#define dprintk(level, fmt, arg...)\ |
functions | int dvb_buf_setup(struct videobuf_queue *q,
unsigned int *count, unsigned int *size)
{
struct cx23885_tsport *port = q->priv_data;
port->ts_packet_size = 188 * 4;
port->ts_packet_count = 32;
*size = port->ts_packet_size * port->ts_packet_count;
*count = 32;
return 0;
} |
functions | int dvb_buf_prepare(struct videobuf_queue *q,
struct videobuf_buffer *vb, enum v4l2_field field)
{
struct cx23885_tsport *port = q->priv_data;
return cx23885_buf_prepare(q, port, (struct cx23885_buffer*)vb, field);
} |
functions | void dvb_buf_queue(struct videobuf_queue *q, struct videobuf_buffer *vb)
{
struct cx23885_tsport *port = q->priv_data;
cx23885_buf_queue(port, (struct cx23885_buffer*)vb);
} |
functions | void dvb_buf_release(struct videobuf_queue *q,
struct videobuf_buffer *vb)
{
cx23885_free_buffer(q, (struct cx23885_buffer*)vb);
} |
functions | int cx23885_hvr1500_xc3028_callback(void *ptr, int command, int arg)
{
struct cx23885_tsport *port = ptr;
struct cx23885_dev *dev = port->dev;
switch (command) {
case XC2028_TUNER_RESET:
/* Send the tuner in then out of reset */
/* GPIO-2 xc3028 tuner */
dprintk(1, "%s: XC2028_TUNER_RESET %d\n", __func__, ar... |
functions | int dvb_register(struct cx23885_tsport *port)
{
struct cx23885_dev *dev = port->dev;
struct cx23885_i2c *i2c_bus = NULL;
/* init struct videobuf_dvb */
port->dvb.name = dev->name;
/* init frontend */
switch (dev->board) {
case CX23885_BOARD_HAUPPAUGE_HVR1250:
i2c_bus = &dev->i2c_bus[0];
port->dvb.frontend ... |
functions | int cx23885_dvb_register(struct cx23885_tsport *port)
{
struct cx23885_dev *dev = port->dev;
int err;
dprintk(1, "%s\n", __func__);
dprintk(1, " ->being probed by Card=%d Name=%s, PCI %02x:%02x\n",
dev->board,
dev->name,
dev->pci_bus,
dev->pci_slot);
err = -ENODEV;
/* dvb stuff */
printk("%s: cx23885 ... |
functions | int cx23885_dvb_unregister(struct cx23885_tsport *port)
{
/* dvb */
if(port->dvb.frontend)
videobuf_dvb_unregister(&port->dvb);
return 0;
} |
includes |
#include <stdlib.h> |
includes | #include <stdio.h> |
includes | #include <stdarg.h> |
includes | #include <unistd.h> |
includes | #include <string.h> |
includes | #include <signal.h> |
includes | #include <time.h> |
includes | #include <ctype.h> |
functions | int
gui_color_attr_get_flag (char c)
{
if (c == GUI_COLOR_EXTENDED_BOLD_CHAR)
return GUI_COLOR_EXTENDED_BOLD_FLAG;
if (c == GUI_COLOR_EXTENDED_REVERSE_CHAR)
return GUI_COLOR_EXTENDED_REVERSE_FLAG;
if (c == GUI_COLOR_EXTENDED_ITALIC_CHAR)
return GUI_COLOR_EXTENDED_ITALIC_FLAG;
... |
functions | void
gui_color_attr_build_string (int color, char *str_attr)
{
int i;
i = 0;
if (color & GUI_COLOR_EXTENDED_BOLD_FLAG)
str_attr[i++] = GUI_COLOR_EXTENDED_BOLD_CHAR;
if (color & GUI_COLOR_EXTENDED_REVERSE_FLAG)
str_attr[i++] = GUI_COLOR_EXTENDED_REVERSE_CHAR;
if (color & GUI_COLOR_E... |
functions | else if (fg >= 0)
{
snprintf (color_fg, sizeof (color_fg), "%s%02d",
(color_attr) ? color_attr : "",
fg);
} |
functions | else if (bg >= 0)
{
snprintf (color_bg, sizeof (color_bg), "%02d",
bg);
} |
functions | else if (color_fg[0])
{
snprintf (color[index_color], sizeof (color[index_color]),
"%c%c%s",
GUI_COLOR_COLOR_CHAR,
GUI_COLOR_FG_CHAR,
color_fg);
} |
functions | else if (color_bg[0])
{
snprintf (color[index_color], sizeof (color[index_color]),
"%c%c%s",
GUI_COLOR_COLOR_CHAR,
GUI_COLOR_BG_CHAR,
color_bg);
} |
functions | void
gui_color_free (struct t_gui_color *color)
{
if (color)
{
if (color->string)
free (color->string);
free (color);
} |
functions | void
gui_color_palette_free_value_cb (struct t_hashtable *hashtable,
const void *key, void *value)
{
struct t_gui_color_palette *color_palette;
/* make C compiler happy */
(void) hashtable;
(void) key;
color_palette = (struct t_gui_color_palette *)value;
if (c... |
functions | void
gui_color_palette_alloc_structs ()
{
if (!gui_color_hash_palette_color)
{
gui_color_hash_palette_color = hashtable_new (32,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_POINTER,
... |
functions | int
gui_color_palette_get_alias (const char *alias)
{
int *ptr_number;
if (gui_color_hash_palette_alias)
{
ptr_number = hashtable_get (gui_color_hash_palette_alias, alias);
if (ptr_number)
return *ptr_number;
} |
functions | void
gui_color_palette_add (int number, const char *value)
{
struct t_gui_color_palette *new_color_palette;
char str_number[64];
gui_color_palette_alloc_structs ();
new_color_palette = gui_color_palette_new (number, value);
if (!new_color_palette)
return;
snprintf (str_number, sizeof ... |
functions | void
gui_color_palette_remove (int number)
{
struct t_gui_color_palette *ptr_color_palette;
char str_number[64];
gui_color_palette_alloc_structs ();
snprintf (str_number, sizeof (str_number), "%d", number);
ptr_color_palette = hashtable_get (gui_color_hash_palette_color,
... |
functions | void
gui_color_palette_free_structs ()
{
if (gui_color_hash_palette_color)
hashtable_free (gui_color_hash_palette_color);
if (gui_color_hash_palette_alias)
hashtable_free (gui_color_hash_palette_alias);
if (gui_color_list_with_alias)
weelist_free (gui_color_list_with_alias);
} |
includes |
#include <stdio.h> |
includes | #include <stdlib.h> |
includes | #include <string.h> |
includes | #include <time.h> |
functions | ReturnType Flash( CommandType cmdCommand, ParameterType *fp ) {
ReturnType rRetVal;
switch (cmdCommand) {
case BlockErase:
rRetVal = FlashBlockErase( (*fp).BlockErase.ublBlockNr );
break;
case BlockProtect:
rRetVal = FlashBlockProtect( (*fp).BlockPr... |
functions | ReturnType FlashBlockErase( uBlockType ublBlockNr) {
ReturnType rRetVal; /* Holds return value */
uCPUBusType ucStatus; /* Holds the Status Register reads */
/* Step 1: Check that the block number exists */
if ( ublBlockNr >= NUM_BLOCKS )
return Flash_BlockNrInvalid;
/* S... |
functions | ReturnType FlashBlockLockDown(uBlockType ublBlockNr) {
ReturnType rRetVal; /* holds the block lock-down status */
/* Step 1: Check to see if the block number exists */
if ( ublBlockNr >= NUM_BLOCKS )
return Flash_BlockNrInvalid;
/* Step 2: Lock-down the block */
FlashWrite(ANY_ADDR... |
functions | ReturnType FlashBlockProtect( uBlockType ublBlockNr ) {
/* Step 1: Check to see if the block number exists */
if ( ublBlockNr >= NUM_BLOCKS )
return Flash_BlockNrInvalid;
/* Step 2: Protect the block */
FlashWrite( ANY_ADDR , CMD(0x0060) );
FlashWrite( BlockOffset[ublBlockNr], CMD(0x0001) )... |
functions | ReturnType FlashBlockUnprotect( uBlockType ublBlockNr ) {
/* Step 1: Check to see if the block number exists */
if ( ublBlockNr >= NUM_BLOCKS )
return Flash_BlockNrInvalid;
/* Step 2: Protect the block */
FlashWrite( ANY_ADDR, CMD(0x0060) );
FlashWrite( BlockOffset[ublBlockNr], CMD(0x00D0) ... |
functions | ReturnType FlashCheckBlockLockDownStatus( uBlockType ublBlockNr ) {
uCPUBusType ucProtStatus; /* Holds the lock-down status */
/* Step 1: Check that the block number exists */
if ( ublBlockNr >= NUM_BLOCKS )
return Flash_BlockNrInvalid;
/* Step 2: Send the Read Electronic Signature c... |
functions | ReturnType FlashCheckBlockProtection( uBlockType ublBlockNr ) {
ReturnType rRetVal; /* Holds the return value */
uCPUBusType ucProtStatus; /* Holds the protection status */
/* Step 1: Check that the block number exists */
if ( ublBlockNr >= NUM_BLOCKS )
return Flash_BlockNrInvalid;
/... |
functions | ReturnType FlashCheckCompatibility( void ) {
ReturnType rRetVal, rCheck1, rCheck2; /* Holds the result of the Read ops */
uCPUBusType ucDeviceId, ucManufacturerCode; /* Holds the values read */
rRetVal = Flash_WrongType;
/* Step 1: Read the Device Id */
rCheck1 = FlashReadDevi... |
functions | ReturnType FlashChipErase( ReturnType *rpResults ) {
ReturnType rRetVal = Flash_Success; /* Return value: Initially optimistic */
ReturnType rError; /* Holds the latest error */
uBlockType ublCurBlock; /* Used to track the current block in a range */
for( ublCurBlock = 0; ublCurBlock < NUM_B... |
functions | ReturnType FlashChipUnprotect(ReturnType *rpResults) {
ReturnType rRetVal = Flash_Success; /* Return value: Initially optimistic */
ReturnType rError; /* holds latest error value */
uBlockType ublCurBlock; /* Used to track the current block in a range */
for (ublCurBlock=0;ublC... |
functions | void FlashClearStatusRegister( void ) {
/* Step 1: Send the Clear Status Register command */
FlashWrite( ANY_ADDR, CMD(0x0050) );
} |
functions | ReturnType FlashDoubleProgram( udword udAddrOff, uCPUBusType ucVal1, uCPUBusType ucVal2 ) {
ReturnType rRetVal; /* Return Value: Initially optimistic */
uCPUBusType ucStatus; /* Holds the Status Register reads */
udword udFirstAddrOff; /* first address offset */
/* Step 1: Check whether t... |
functions | ReturnType FlashProgram(udword udMode, udword udAddrOff, udword udNrOfElementsInArray, void *pArray ) {
ReturnType rRetVal = Flash_Success; /* Return Value: Initially optimistic */
uCPUBusType *ucpArrayPointer; /* Use an uCPUBusType to access the array */
udword udLastAddrOff; /* Holds the last offset t... |
functions | ReturnType FlashProtectionRegisterProgram( udword udProtectionRegisterAddrOff,
uCPUBusType ucProtectionRegisterVal ) {
ReturnType rRetVal; /* Return Value */
uCPUBusType ucStatus; /* Holds the Status Register reads */
/* Step 1: Check whether the ad... |
functions | ReturnType FlashReadCfi( uword uwCfiFunc, uCPUBusType *ucpCfiValue ) {
ReturnType rRetVal = Flash_Success; /* Holds the return value */
udword udCfiAddr; /* Holds CFI address */
/* Step 1: Send the Read CFI Instruction */
FlashWrite( ANY_ADDR, CMD(0x0098) );
/* Step 2: Check that the CFI... |
functions | ReturnType FlashReadDeviceId(uCPUBusType *ucpDeviceId) {
uCPUBusType ucAlgId;
/* Step 1: Send the Read CFI Instruction */
FlashWrite( 0x0055, CMD(0x0098) );
/* Step 2: Check that the CFI interface is operable */
if( ((FlashRead( 0x0010 ) & CMD(0x00FF)) != CMD(0x0051)) ||
((FlashRead( 0x... |
functions | ReturnType FlashReadManufacturerCode(uCPUBusType *ucpManufacturerCode) {
uCPUBusType ucAlgId;
/* Step 1: Send the Read CFI Instruction */
FlashWrite( 0x0055, CMD(0x0098) );
/* Step 2: Check that the CFI interface is operable */
if( ((FlashRead( 0x0010 ) & CMD(0x00FF)) != CMD(0x0051)) ||
... |
functions | ReturnType FlashReadProtectionRegister( udword udProtectionRegisterAddrOff, uCPUBusType *ucpValue ) {
/* Step 1: Check whether the address offset to be read are within the Protection Register Memory Map */
if ( (udProtectionRegisterAddrOff < 0x80) || (udProtectionRegisterAddrOff > 0x8C) )
return Fl... |
functions | uCPUBusType FlashReadStatusRegister(void) {
uCPUBusType ucStatus;
/* Step 1: Send the Read Status Register command */
FlashWrite( ANY_ADDR, CMD(0x0070) );
/* Step 2: Read the Status Register */
ucStatus = FlashRead( ANY_ADDR );
/* Step 3: Return to Read Array mode */
FlashRese... |
functions | ReturnType FlashReset( void ) {
/* Step 1: Write the read memory array command */
FlashWrite( ANY_ADDR, CMD(0x00FF) );
/* Step 2: Return Flash_Success */
return Flash_Success;
} |
functions | ReturnType FlashResponseIntegrityCheck(uCPUBusType *ucpFlashResponse) {
ubyte a;
union {
uCPUBusType ucFlashResponse;
ubyte ubBytes[sizeof(uCPUBusType)];
} |
functions | ReturnType FlashResume( void ) {
uCPUBusType ucStatus; /* Status Register */
/* Step 1: Check Status Register */
FlashWrite( ANY_ADDR, CMD(0x0070) ); /* Read Status Register */
ucStatus = FlashRead( ANY_ADDR );
/* Step 2: Resume Erase, if needed */
if ((ucStatus & CMD(0x0044)) != 0)... |
functions | ReturnType FlashSingleProgram( udword udAddrOff, uCPUBusType ucVal ) {
ReturnType rRetVal; /* Return Value: Initially optimistic */
uCPUBusType ucStatus; /* Holds the Status Register reads */
/* Step 1: Check whether the data to be programmed are are within the Flash memory space */
if( ud... |
functions | ReturnType FlashSuspend( void ) {
uCPUBusType ucStatus; /* Status Register */
/* Step 1: Clear Status Register */
FlashWrite( ANY_ADDR, CMD(0x0050) );
/* NOTE ! CSR also clears bit 1 BPS as well as bits 3, 4 and 5 */
/* Step 2: Issue Suspend Command */
FlashWrite( ANY_ADDR, CMD(0x00B0)... |
functions | Timer
While(1) {
...
If (FlashTimeOut(5) == Flash_OperationTimeOut) break;
// The loop is executed for 5 Seconds before leaving it
} |
functions | ReturnType FlashTimeOut(udword udSeconds){
static clock_t clkReset,clkCount;
if (udSeconds == 0) { /* Set Timeout to 0 */
clkReset=clock();
} |
functions | ReturnType FlashTimeOut(udword udSeconds) {
static udword udCounter;
if (udSeconds == 0) { /* Set Timeout to 0 */
udCounter = 0;
} |
functions | ReturnType MyFlashBlockErase(uBlockType blockNumber)
{
FlashWrite(ANY_ADDR, 0x20);
FlashWrite(BlockOffset[blockNumber], 0xD0);
uCPUBusType status;
do {
status = FlashRead(ANY_ADDR);
} |
includes |
#include <linux/videodev2.h> |
includes | #include <linux/i2c.h> |
includes | #include <linux/platform_device.h> |
includes | #include <linux/delay.h> |
includes | #include <linux/cdev.h> |
includes | #include <linux/uaccess.h> |
includes | #include <linux/fs.h> |
includes | #include <asm/atomic.h> |
defines |
#define OV3640YUV_DEBUG |
defines | #define SENSORDB printk |
defines | #define SENSORDB(x,...) |
defines | #define OV3640_write_cmos_sensor(addr, para) iWriteReg((u16) addr , (u32) para ,1,OV3640_WRITE_ID) |
defines | #define OV3640_write_cmos_sensor_2(addr, para, bytes) iWriteReg((u16) addr , (u32) para ,bytes,OV3640_WRITE_ID) |
defines | #define WINMO_USE 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.