type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
functions | void
pvname_svc (const char *pname, const char *vnum)
{
f_print (fout, "%s_%s_svc", locase (pname), vnum);
} |
functions | void
pvname (const char *pname, const char *vnum)
{
f_print (fout, "%s_%s", locase (pname), vnum);
} |
functions | void
error (const char *msg)
{
printwhere ();
f_print (stderr, "%s, line %d: ", infilename, linenum);
f_print (stderr, "%s\n", msg);
crash ();
} |
functions | void
crash (void)
{
int i;
for (i = 0; i < nfiles; i++)
{
unlink (outfiles[i]);
} |
functions | void
record_open (const char *file)
{
if (nfiles < NFILES)
{
outfiles[nfiles++] = file;
} |
functions | void
expected1 (tok_kind exp1)
{
s_print (expectbuf, "expected '%s'",
toktostr (exp1));
error (expectbuf);
} |
functions | void
expected2 (tok_kind exp1, tok_kind exp2)
{
s_print (expectbuf, "expected '%s' or '%s'",
toktostr (exp1),
toktostr (exp2));
error (expectbuf);
} |
functions | void
expected3 (tok_kind exp1, tok_kind exp2, tok_kind exp3)
{
s_print (expectbuf, "expected '%s', '%s' or '%s'",
toktostr (exp1),
toktostr (exp2),
toktostr (exp3));
error (expectbuf);
} |
functions | void
tabify (FILE * f, int tab)
{
while (tab--)
{
(void) fputc ('\t', f);
} |
functions | void
printbuf (void)
{
char c;
int i;
int cnt;
for (i = 0; (c = curline[i]) != 0; i++)
{
if (c == '\t')
{
cnt = 8 - (i % TABSIZE);
c = ' ';
} |
functions | void
printwhere (void)
{
int i;
char c;
int cnt;
printbuf ();
for (i = 0; i < where - curline; i++)
{
c = curline[i];
if (c == '\t')
{
cnt = 8 - (i % TABSIZE);
} |
functions | void
add_type (int len, const char *type)
{
bas_type *ptr;
if ((ptr = malloc (sizeof (bas_type))) == NULL)
{
fprintf (stderr, "failed in malloc");
exit (1);
} |
includes |
#include <stdlib.h> |
includes | #include <string.h> |
functions | void clear_field()
{
memset(field1, 0, video_area);
} |
functions | int start()
{
image_set_threshold_y(40);
field1 = field;
field2 = field + video_area;
clear_field();
stat = 1;
return 0;
} |
functions | int stop()
{
stat = 0;
return 0;
} |
functions | int draw(RGB32 *src, RGB32 *dest)
{
int x, y;
unsigned char *p, *q, v;
unsigned char sum, sum1, sum2, sum3;
int width;
RGB32 pix;
width = video_width;
p = image_diff_filter(image_bgsubtract_update_y(src));
for(x=0; x<video_area; x++) {
field1[x] |= p[x];
} |
functions | int event(SDL_Event *event)
{
if(event->type == SDL_KEYDOWN) {
switch(event->key.keysym.sym) {
case SDLK_SPACE:
clear_field();
break;
default:
break;
} |
includes |
#include <linux/module.h> |
includes | #include <linux/i2c.h> |
includes | #include <linux/slab.h> |
includes | #include <linux/rtc.h> |
includes | #include <linux/platform_device.h> |
includes | #include <linux/mfd/max8907c.h> |
defines |
#define RTC_DEBUG 0 |
defines | #define DBG(fmt, arg...) bprintk("[RTC] : %s : " fmt "\n", __func__, ## arg) |
defines | #define DBG(fmt, arg...) do {} while (0) |
defines |
#define TIME_NUM 8 |
defines | #define ALARM_1SEC (1 << 7) |
defines | #define HOUR_12 (1 << 7) |
defines | #define HOUR_AM_PM (1 << 5) |
defines | #define ALARM0_IRQ (1 << 3) |
defines | #define ALARM1_IRQ (1 << 2) |
defines | #define ALARM0_STATUS (1 << 2) |
defines | #define ALARM1_STATUS (1 << 1) |
structs | struct max8907c_rtc_info {
struct rtc_device *rtc_dev;
struct i2c_client *i2c;
struct max8907c *chip;
}; |
functions | irqreturn_t rtc_update_handler(int irq, void *data)
{
struct max8907c_rtc_info *info = (struct max8907c_rtc_info *)data;
/* disable ALARM0 except for 1SEC alarm */
max8907c_set_bits(info->i2c, MAX8907C_REG_ALARM0_CNTL, 0x7f, 0);
rtc_update_irq(info->rtc_dev, 1, RTC_IRQF | RTC_AF);
return IRQ_HANDLED;
} |
functions | int tm_calc(struct rtc_time *tm, u8 *buf, int len)
{
if (len < TIME_NUM)
return -EINVAL;
tm->tm_year = (buf[RTC_YEAR2] >> 4) * 1000
+ (buf[RTC_YEAR2] & 0xf) * 100
+ (buf[RTC_YEAR1] >> 4) * 10
+ (buf[RTC_YEAR1] & 0xf);
tm->tm_year -= 1900;
tm->tm_mon = ((buf[RTC_MONTH] >> 4) & 0x01) * 10
+ (buf[RTC_MON... |
functions | int data_calc(u8 *buf, struct rtc_time *tm, int len)
{
u8 high, low;
if (len < TIME_NUM)
return -EINVAL;
high = (tm->tm_year + 1900) / 1000;
low = (tm->tm_year + 1900) / 100;
low = low - high * 10;
buf[RTC_YEAR2] = (high << 4) + low;
high = (tm->tm_year + 1900) / 10;
low = tm->tm_year + 1900;
low = low - h... |
functions | int max8907c_rtc_read_time(struct device *dev, struct rtc_time *tm)
{
struct max8907c_rtc_info *info = dev_get_drvdata(dev);
u8 buf[TIME_NUM];
int ret;
ret = max8907c_reg_bulk_read(info->i2c, MAX8907C_REG_RTC_SEC, TIME_NUM, buf);
if (ret < 0)
return ret;
ret = tm_calc(tm, buf, TIME_NUM);
return ret;
} |
functions | int max8907c_rtc_set_time(struct device *dev, struct rtc_time *tm)
{
struct max8907c_rtc_info *info = dev_get_drvdata(dev);
u8 buf[TIME_NUM];
int ret;
ret = data_calc(buf, tm, TIME_NUM);
if (ret < 0)
return ret;
ret = max8907c_reg_bulk_write(info->i2c, MAX8907C_REG_RTC_SEC, TIME_NUM, buf);
return ret;
} |
functions | int max8907c_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{
struct max8907c_rtc_info *info = dev_get_drvdata(dev);
unsigned char buf[TIME_NUM];
int ret;
ret = max8907c_reg_bulk_read(info->i2c, MAX8907C_REG_ALARM0_SEC, TIME_NUM, buf);
if (ret < 0)
return ret;
ret = tm_calc(&alrm->time, buf, TIME_... |
functions | int max8907c_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{
struct max8907c_rtc_info *info = dev_get_drvdata(dev);
unsigned char buf[TIME_NUM];
int ret;
ret = data_calc(buf, &alrm->time, TIME_NUM);
if (ret < 0)
return ret;
ret = max8907c_reg_bulk_write(info->i2c, MAX8907C_REG_ALARM0_SEC, TIME_NUM... |
functions | int max8907c_rtc_count_read(unsigned int *count)
{
struct rtc_time tm;
unsigned char buf[TIME_NUM];
int ret;
if (!rtc_info)
return 0;
ret = max8907c_reg_bulk_read(rtc_info->i2c, MAX8907C_REG_RTC_SEC, TIME_NUM, buf);
if(ret < 0)
return ret;
/* Calculate */
ret = tm_calc(&tm, buf, TIME_NUM);
if(ret < 0)
... |
functions | int max8907c_rtc_alarm_count_read(unsigned int *count)
{
struct rtc_wkalrm alrm;
unsigned char buf[TIME_NUM];
int ret;
if (!rtc_info)
return 0;
ret = max8907c_reg_bulk_read(rtc_info->i2c, MAX8907C_REG_ALARM0_SEC, TIME_NUM, buf);
if (ret < 0)
return ret;
/* Calculate */
ret = tm_calc(&alrm.time, buf, TI... |
functions | int max8907c_rtc_count_write(unsigned int count)
{
struct rtc_time tm;
unsigned char buf[TIME_NUM];
int ret;
if (!rtc_info)
return 0;
/* Count to tm */
rtc_time_to_tm(count, &tm);
/* Fill Buffer */
ret = data_calc(buf, &tm, TIME_NUM);
if (ret < 0)
return ret;
ret = max8907c_reg_bulk_write(rtc_info->i2... |
functions | int max8907c_rtc_alarm_write(unsigned int count)
{
struct rtc_time tm;
unsigned char buf[TIME_NUM];
int ret;
if (!rtc_info)
return 0;
/* Count to tm */
rtc_time_to_tm(count, &tm);
/* Fill Buffer */
ret = data_calc(buf, &tm, TIME_NUM);
if (ret < 0)
return ret;
ret = max8907c_reg_bulk_write(rtc_info->... |
functions | ssize_t max8907c_rtc_show_smplcount(struct device *dev,
struct device_attribute *attr, char *buf)
{
char smplcount = 0;
lge_nvdata_read(LGE_NVDATA_SMPL_COUNT_OFFSET, &smplcount,1);
return sprintf(buf, "%d\n", smplcount);
} |
functions | ssize_t max8907c_rtc_store_smplcount(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
unsigned long val = simple_strtoul(buf, NULL, 10);
if(val == 0)
{
char smplcount = 0;
lge_nvdata_write(LGE_NVDATA_SMPL_COUNT_OFFSET, &smplcount,1);
} |
functions | __devinit max8907c_rtc_probe(struct platform_device *pdev)
{
struct max8907c *chip = dev_get_drvdata(pdev->dev.parent);
struct max8907c_rtc_info *info;
int irq, ret;
info = kzalloc(sizeof(struct max8907c_rtc_info), GFP_KERNEL);
if (!info)
return -ENOMEM;
info->i2c = chip->i2c_rtc;
info->chip = chip;
irq = c... |
functions | __devexit max8907c_rtc_remove(struct platform_device *pdev)
{
struct max8907c_rtc_info *info = platform_get_drvdata(pdev);
if (info) {
free_irq(info->chip->irq_base + MAX8907C_IRQ_RTC_ALARM0, info);
rtc_device_unregister(info->rtc_dev);
kfree(info);
} |
functions | int max8907c_rtc_suspend(struct platform_device *pdev, pm_message_t state)
{
struct device *dev=&pdev->dev;
struct max8907c_rtc_info *info = platform_get_drvdata(pdev);
if (device_may_wakeup(dev))
enable_irq_wake(info->chip->irq_base + MAX8907C_IRQ_RTC_ALARM0);
return 0;
} |
functions | int max8907c_rtc_resume(struct platform_device *pdev)
{
struct device *dev=&pdev->dev;
struct max8907c_rtc_info *info = platform_get_drvdata(pdev);
if (device_may_wakeup(dev))
disable_irq_wake(info->chip->irq_base + MAX8907C_IRQ_RTC_ALARM0);
return 0;
} |
functions | __init max8907c_rtc_init(void)
{
return platform_driver_register(&max8907c_rtc_driver);
} |
functions | __exit max8907c_rtc_exit(void)
{
platform_driver_unregister(&max8907c_rtc_driver);
} |
includes |
#include <wlioctl.h> |
includes |
#include <typedefs.h> |
includes | #include <linuxver.h> |
includes | #include <osl.h> |
includes |
#include <bcmutils.h> |
includes | #include <bcmendian.h> |
includes | #include <proto/ethernet.h> |
includes |
#include <linux/if_arp.h> |
includes | #include <asm/uaccess.h> |
includes |
#include <dngl_stats.h> |
includes | #include <dhd.h> |
includes | #include <dhdioctl.h> |
includes | #include <wlioctl.h> |
includes |
#include <proto/ethernet.h> |
includes | #include <dngl_stats.h> |
includes | #include <dhd.h> |
includes |
#include <wl_iw.h> |
includes |
#include <linux/rtnetlink.h> |
includes |
#include <bcmsdbus.h> |
defines | #define WL_ERROR(x) printf x |
defines | #define WL_TRACE(x) |
defines | #define WL_ASSOC(x) |
defines | #define WL_INFORM(x) |
defines | #define WL_WSEC(x) |
defines | #define WL_SCAN(x) |
defines | #define WL_PNO(x) printf x |
defines | #define WL_PNO(x) |
defines |
#define JF2MS ((((jiffies / HZ) * 1000) + ((jiffies % HZ) * 1000) / HZ)) |
defines | #define WL_TRACE_COEX(x) printf("TS:%lu ", JF2MS); \ |
defines | #define WL_TRACE_COEX(x) |
defines | #define WL_TRACE_SCAN(x) printf("TS:%lu ", JF2MS); \ |
defines | #define WL_TRACE_SCAN(x) |
defines |
#define IW_WSEC_ENABLED(wsec) ((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED)) |
defines |
#define WL_IW_USE_ISCAN 1 |
defines | #define ENABLE_ACTIVE_PASSIVE_SCAN_SUPPRESS 1 |
defines | #define WL_SOFTAP(x) |
defines |
#define WL_IW_IOCTL_CALL(func_call) \ |
defines |
#define RETURN_IF_EXTRA_NULL(extra) \ |
defines |
#define DHD_OS_MUTEX_INIT(a) mutex_init(a) |
defines | #define DHD_OS_MUTEX_LOCK(a) mutex_lock(a) |
defines | #define DHD_OS_MUTEX_UNLOCK(a) mutex_unlock(a) |
defines |
#define DHD_OS_MUTEX_INIT(a) |
defines | #define DHD_OS_MUTEX_LOCK(a) |
defines | #define DHD_OS_MUTEX_UNLOCK(a) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.