type
stringclasses
5 values
content
stringlengths
9
163k
functions
UINT8 gatt_act_send_browse(tGATT_TCB *p_tcb, UINT16 index, UINT8 op, UINT16 s_handle, UINT16 e_handle, tBT_UUID uuid) { tGATT_CL_MSG msg; msg.browse.s_handle = s_handle; msg.browse.e_handle = e_handle; memcpy(&msg.browse.uuid, &uuid, sizeof(tBT_UUID)); /* write by ...
functions
void gatt_end_operation(tGATT_CLCB *p_clcb, tGATT_STATUS status, void *p_data) { tGATT_CL_COMPLETE cb_data; tGATT_CMPL_CBACK *p_cmpl_cb = (p_clcb->p_reg) ? p_clcb->p_reg->app_cb.p_cmpl_cb : NULL; UINT8 op = p_clcb->operation, disc_type = GATT_DISC_MAX; tGATT_DISC_CMPL_CB *p_disc_cmpl...
functions
else if (p_cmpl_cb && op) { (*p_cmpl_cb)(conn_id, op, status, &cb_data); }
functions
void gatt_cleanup_upon_disc(BD_ADDR bda, UINT16 reason, tBT_TRANSPORT transport) { tGATT_TCB *p_tcb = NULL; tGATT_CLCB *p_clcb; UINT8 i; UINT16 conn_id; tGATT_REG *p_reg = NULL; GATT_TRACE_DEBUG ("gatt_cleanup_upon_disc "); if ((p_tcb = gatt_find_tcb_b...
functions
void gatt_dbg_display_uuid(tBT_UUID bt_uuid) { char str_buf[50]; int x = 0; if (bt_uuid.len == LEN_UUID_16) { sprintf(str_buf, "0x%04x", bt_uuid.uu.uuid16); }
functions
else if (bt_uuid.len == LEN_UUID_32) { sprintf(str_buf, "0x%08x", (unsigned int)bt_uuid.uu.uuid32); }
functions
else if (bt_uuid.len == LEN_UUID_128) { x += sprintf(&str_buf[x], "0x%02x%02x%02x%02x%02x%02x%02x%02x", bt_uuid.uu.uuid128[15], bt_uuid.uu.uuid128[14], bt_uuid.uu.uuid128[13], bt_uuid.uu.uuid128[12], bt_uuid.uu.uuid128[11], bt_uuid.uu.uuid128[10], ...
functions
BOOLEAN gatt_is_bg_dev_for_app(tGATT_BG_CONN_DEV *p_dev, tGATT_IF gatt_if) { UINT8 i; for (i = 0; i < GATT_MAX_APPS; i ++ ) { if (p_dev->in_use && (p_dev->gatt_if[i] == gatt_if)) { return TRUE; }
functions
BOOLEAN gatt_add_bg_dev_list(tGATT_REG *p_reg, BD_ADDR bd_addr, BOOLEAN is_initator) { tGATT_IF gatt_if = p_reg->gatt_if; tGATT_BG_CONN_DEV *p_dev = NULL; UINT8 i; BOOLEAN ret = FALSE; if ((p_dev = gatt_find_bg_dev(bd_addr)) == NULL) { p_dev = gatt_alloc_bg_dev(bd_addr); ...
functions
else if (p_dev->gatt_if[i] == 0) { p_dev->gatt_if[i] = gatt_if; if (i == 0) { ret = BTM_BleUpdateBgConnDev(TRUE, bd_addr); }
functions
else if (p_dev->listen_gif[i] == 0) { if (p_reg->listening == GATT_LISTEN_TO_ALL) { p_reg->listening = GATT_LISTEN_TO_NONE; }
functions
BOOLEAN gatt_remove_bg_dev_for_app(tGATT_IF gatt_if, BD_ADDR bd_addr) { tGATT_TCB *p_tcb = gatt_find_tcb_by_addr(bd_addr, BT_TRANSPORT_LE); BOOLEAN status; if (p_tcb) { gatt_update_app_use_link_flag(gatt_if, p_tcb, FALSE, FALSE); }
functions
UINT8 gatt_get_num_apps_for_bg_dev(BD_ADDR bd_addr) { tGATT_BG_CONN_DEV *p_dev = NULL; UINT8 i; UINT8 cnt = 0; if ((p_dev = gatt_find_bg_dev(bd_addr)) != NULL) { for (i = 0; i < GATT_MAX_APPS; i ++) { if (p_dev->gatt_if[i]) { cnt++; }
functions
BOOLEAN gatt_find_app_for_bg_dev(BD_ADDR bd_addr, tGATT_IF *p_gatt_if) { tGATT_BG_CONN_DEV *p_dev = NULL; UINT8 i; BOOLEAN ret = FALSE; if ((p_dev = gatt_find_bg_dev(bd_addr)) == NULL) { return ret; }
functions
BOOLEAN gatt_remove_bg_dev_from_list(tGATT_REG *p_reg, BD_ADDR bd_addr, BOOLEAN is_initiator) { tGATT_IF gatt_if = p_reg->gatt_if; tGATT_BG_CONN_DEV *p_dev = NULL; UINT8 i, j; BOOLEAN ret = FALSE; if ((p_dev = gatt_find_bg_dev(bd_addr)) == NULL) { return ret; }
functions
void gatt_deregister_bgdev_list(tGATT_IF gatt_if) { tGATT_BG_CONN_DEV *p_dev_list = &gatt_cb.bgconn_dev[0]; UINT8 i , j, k; tGATT_REG *p_reg = gatt_get_regcb(gatt_if); /* update the BG conn device list */ for (i = 0 ; i < GATT_MAX_BG_CONN_DEV; i ++, p_dev_list ++ ) { if (p_dev_list...
functions
void gatt_reset_bgdev_list(void) { memset(&gatt_cb.bgconn_dev, 0 , sizeof(tGATT_BG_CONN_DEV)*GATT_MAX_BG_CONN_DEV); }
functions
BOOLEAN gatt_update_auto_connect_dev (tGATT_IF gatt_if, BOOLEAN add, BD_ADDR bd_addr, BOOLEAN is_initator) { BOOLEAN ret = FALSE; tGATT_REG *p_reg; tGATT_TCB *p_tcb = gatt_find_tcb_by_addr(bd_addr, BT_TRANSPORT_LE); GATT_TRACE_API ("gatt_update_auto_connect_dev "); /* Make sure...
functions
BOOLEAN gatt_update_listen_mode(void) { UINT8 ii = 0; tGATT_REG *p_reg = &gatt_cb.cl_rcb[0]; UINT8 listening = 0; UINT16 connectability, window, interval; BOOLEAN rt = TRUE; for (; ii < GATT_MAX_APPS; ii ++, p_reg ++) { if ( p_reg->in_use && p_...
defines
#define ZLIB_INTERNAL
defines
#define BASE 65521UL /* largest prime smaller than 65536 */
defines
#define NMAX 5552
defines
#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;}
defines
#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
defines
#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
defines
#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
defines
#define DO16(buf) DO8(buf,0); DO8(buf,8);
includes
#include <common.h>
includes
#include <command.h>
includes
#include <image.h>
includes
#include <u-boot/zlib.h>
includes
#include <asm/byteorder.h>
includes
#include <fdt.h>
includes
#include <libfdt.h>
includes
#include <fdt_support.h>
includes
#include <fastboot.h>
includes
#include <asm/arch/clock.h>
includes
#include <asm/arch/boot_type.h>
functions
void arch_lmb_reserve(struct lmb *lmb) { ulong sp; /* * Booting a (Linux) kernel image * * Allocate space for command line and board info - the * address should be as high as possible within the reach of * the kernel (see CONFIG_SYS_BOOTMAPSZ settings), but in unused * memory, which means far enough belo...
functions
void announce_and_cleanup(void) { printf("\nStarting kernel ...\n\n"); #ifdef CONFIG_USB_DEVICE { extern void udc_disconnect(void); udc_disconnect(); }
functions
int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) { bd_t *bd = gd->bd; char *s; int machid = bd->bi_arch_number; void (*kernel_entry)(int zero, int arch, uint params); #ifdef CONFIG_CMDLINE_TAG char *commandline = getenv ("bootargs"); #endif if ((flag != 0) && (flag != BOOTM_STATE_OS...
functions
int do_boota_linux (struct fastboot_boot_img_hdr *hdr) { ulong initrd_start, initrd_end; void (*kernel_entry)(int zero, int arch, uint params); bd_t *bd = gd->bd; #ifdef DEBUG printf("do_boota_linux storage_type = %d\n", storage_type); #endif kernel_entry = (void (*)(int, int, uint))(hdr->kernel_addr); #ifdef CON...
functions
int fixup_memory_node(void *blob) { bd_t *bd = gd->bd; int bank; u64 start[CONFIG_NR_DRAM_BANKS]; u64 size[CONFIG_NR_DRAM_BANKS]; for (bank = 0; bank < CONFIG_NR_DRAM_BANKS; bank++) { start[bank] = bd->bi_dram[bank].start; size[bank] = bd->bi_dram[bank].size; }
functions
int bootm_linux_fdt(int machid, bootm_headers_t *images) { ulong rd_len; void (*kernel_entry)(int zero, int dt_machid, void *dtblob); ulong of_size = images->ft_len; char **of_flat_tree = &images->ft_addr; ulong *initrd_start = &images->initrd_start; ulong *initrd_end = &images->initrd_end; struct lmb *lmb = &im...
functions
void setup_start_tag (bd_t *bd) { params = (struct tag *) bd->bi_boot_params; params->hdr.tag = ATAG_CORE; params->hdr.size = tag_size (tag_core); params->u.core.flags = 0; params->u.core.pagesize = 0; params->u.core.rootdev = 0; params = tag_next (params); }
functions
void setup_memory_tags (bd_t *bd) { int i; for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { params->hdr.tag = ATAG_MEM; params->hdr.size = tag_size (tag_mem32); params->u.mem.start = bd->bi_dram[i].start; params->u.mem.size = bd->bi_dram[i].size; params = tag_next (params); }
functions
void setup_commandline_tag (bd_t *bd, char *commandline) { char *p; if (!commandline) return; /* eat leading white space */ for (p = commandline; *p == ' '; p++); /* skip non-existent command lines so the kernel will still * use its default command line. */ if (*p == '\0') return; params->hdr.tag = A...
functions
void setup_initrd_tag (bd_t *bd, ulong initrd_start, ulong initrd_end) { /* an ATAG_INITRD node tells the kernel where the compressed * ramdisk can be found. ATAG_RDIMG is a better name, actually. */ params->hdr.tag = ATAG_INITRD2; params->hdr.size = tag_size (tag_initrd); params->u.initrd.start = initrd_start...
functions
void setup_serial_tag (struct tag **tmp) { struct tag *params = *tmp; struct tag_serialnr serialnr; void get_board_serial(struct tag_serialnr *serialnr); get_board_serial(&serialnr); params->hdr.tag = ATAG_SERIAL; params->hdr.size = tag_size (tag_serialnr); params->u.serialnr.low = serialnr.low; params->u.seri...
functions
void setup_revision_tag(struct tag **in_params) { u32 rev = 0; u32 get_board_rev(void); rev = get_board_rev(); params->hdr.tag = ATAG_REVISION; params->hdr.size = tag_size (tag_revision); params->u.revision.rev = rev; params = tag_next (params); }
functions
void setup_end_tag (bd_t *bd) { params->hdr.tag = ATAG_NONE; params->hdr.size = 0; }
functions
ulong get_sp(void) { ulong ret; asm("mov %0, sp" : "=r"(ret) : ); return ret; }
defines
#define CFP_LUCY
defines
#define C_LUCY_DOCREADER
defines
#define C_LUCY_DEFAULTDOCREADER
functions
void icu_lld_serve_interrupt(ICUDriver *icup) { uint32_t gfr = icup->emiosp->GFR.R; if (gfr & (1 << icup->ch_number)) { uint32_t sr = icup->emiosp->CH[icup->ch_number].CSR.R; if((sr & EMIOSS_OVFL) && (icup->config->overflow_cb != NULL)) { icup->emiosp->CH[icup->ch_number].CSR.R |= EMIOSS_OVFL...
functions
else if (icup->config->mode == ICU_INPUT_ACTIVE_LOW) { if ((icup->emiosp->CH[icup->ch_number].CSR.B.UCIN == 1U) && \ (icup->config->width_cb != NULL)) { A2_2 = icup->emiosp->CH[icup->ch_number].CADR.R; width = A2_2 - A2_1; _icu_isr_invoke_width_cb(icup); ...
functions
void icu_lld_init(void) { /* Initialize A2 temp registers.*/ A2_1 = 0U; A2_2 = 0U; A2_3 = 0U; /* eMIOSx channels initially all not in use.*/ #if SPC5_HAS_EMIOS0 reset_emios0_active_channels(); #endif #if SPC5_HAS_EMIOS1 reset_emios1_active_channels(); #endif #if SPC5_ICU_USE_EMIOS0_CH0 ...
functions
void icu_lld_start(ICUDriver *icup) { #if SPC5_HAS_EMIOS0 osalDbgAssert(get_emios0_active_channels() < 25, "too many channels"); #endif #if SPC5_HAS_EMIOS1 osalDbgAssert(get_emios1_active_channels() < 25, "too many channels"); #endif if (icup->state == ICU_STOP) { /* Enables the peripheral.*/ #...
functions
void icu_lld_stop(ICUDriver *icup) { #if SPC5_HAS_EMIOS0 osalDbgAssert(get_emios0_active_channels() < 25, "too many channels"); #endif #if SPC5_HAS_EMIOS1 osalDbgAssert(get_emios1_active_channels() < 25, "too many channels"); #endif if (icup->state == ICU_READY) { /* Disables the peripheral.*/ ...
functions
SPC5_ICU_USE_EMIOS0_CH1 if (&ICUD2 == icup) { /* Reset UC Control Register.*/ icup->emiosp->CH[icup->ch_number].CCR.R = 0; decrease_emios0_active_channels(); }
functions
SPC5_ICU_USE_EMIOS0_CH2 if (&ICUD3 == icup) { /* Reset UC Control Register.*/ icup->emiosp->CH[icup->ch_number].CCR.R = 0; decrease_emios0_active_channels(); }
functions
SPC5_ICU_USE_EMIOS0_CH3 if (&ICUD4 == icup) { /* Reset UC Control Register.*/ icup->emiosp->CH[icup->ch_number].CCR.R = 0; decrease_emios0_active_channels(); }
functions
SPC5_ICU_USE_EMIOS0_CH4 if (&ICUD5 == icup) { /* Reset UC Control Register.*/ icup->emiosp->CH[icup->ch_number].CCR.R = 0; decrease_emios0_active_channels(); }
functions
SPC5_ICU_USE_EMIOS0_CH5 if (&ICUD6 == icup) { /* Reset UC Control Register.*/ icup->emiosp->CH[icup->ch_number].CCR.R = 0; decrease_emios0_active_channels(); }
functions
SPC5_ICU_USE_EMIOS0_CH6 if (&ICUD7 == icup) { /* Reset UC Control Register.*/ icup->emiosp->CH[icup->ch_number].CCR.R = 0; decrease_emios0_active_channels(); }
functions
SPC5_ICU_USE_EMIOS0_CH7 if (&ICUD8 == icup) { /* Reset UC Control Register.*/ icup->emiosp->CH[icup->ch_number].CCR.R = 0; decrease_emios0_active_channels(); }
functions
SPC5_ICU_USE_EMIOS0_CH24 if (&ICUD9 == icup) { /* Reset UC Control Register.*/ icup->emiosp->CH[icup->ch_number].CCR.R = 0; decrease_emios0_active_channels(); }
functions
SPC5_ICU_USE_EMIOS1_CH24 if (&ICUD10 == icup) { /* Reset UC Control Register.*/ icup->emiosp->CH[icup->ch_number].CCR.R = 0; decrease_emios1_active_channels(); }
functions
void icu_lld_enable(ICUDriver *icup) { /* Channel enables.*/ /* if (!(icup->emiosp->UCDIS.R && (1 << icup->ch_number))) { icup->emiosp->UCDIS.R &= ~(1 << icup->ch_number); }
functions
void icu_lld_disable(ICUDriver *icup) { /* Clear pending IRQs (if any).*/ icup->emiosp->CH[icup->ch_number].CSR.R = EMIOSS_OVRC | EMIOSS_OVFLC | EMIOSS_FLAGC; /* Disable interrupts.*/ icup->emiosp->CH[icup->ch_number].CCR.B.FEN = 0; /* Channel disables.*/ icup->emiosp->UCDIS.R |= (1 << ...
includes
#include <string.h>
includes
#include <curses.h>
functions
void textgfx_init() { if (textgfx_flags & CYGWIN) textgfx_flags |= ASCII; initscr(); set_input_mode(); curs_set(0); if (!_MONOCHROME && start_color() != ERR && COLOR_PAIRS >= 16) { #ifdef NCURSES_VERSION use_default_colors(); #endif init_color_pairs(); }
functions
void init_color_pairs() { int i; for (i = 0; i < 6; i++) initpair(i+1, COLOR_1_6(i), COLOR_1_6(i)); if (_WHITE_BG) initpair(7, COLOR_BLACK, COLOR_BLACK); else initpair(7, COLOR_WHITE, COLOR_WHITE); init_pair(MAGENTA_FG, COLOR_MAGENTA, COLOR_DEFAULT_BG); initpair(WHITE_ON_BLUE, COLOR_WHITE, COLOR_BLUE); i =...
functions
void initpair(short pair, short f, short b) { if (_TT_BLOCKS || f==b && textgfx_flags & BLACK_BRACKETS) b = COLOR_DEFAULT_BG; init_pair(pair, f, b); }
functions
void textgfx_end() { int x, y; delwins(); if (!isendwin()) { getmaxyx(stdscr, y, x); move(y-1, 0); clrtobot(); refresh(); endwin(); }
functions
void delwins() { int i; for (i = 0; i < 6; i++) if (wins[i]) { delwin(wins[i]); wins[i] = NULL; }
functions
void setcurs(int x, int y) { if (window == stdscr) x += margin_x; else if (x < 0) { margin_x = x; x = 0; }
functions
void movefwd(int n) { int x, y; getyx(window, y, x); x += n; if (margin_x < 0) setcurs(x+margin_x, y); else wmove(window, y, x); }
functions
void newln(int x) { int d, y; getyx(window, y, d); setcurs(x, y+1); }
functions
void setcurs_end() { move(term_height-1, 0); refresh(); window = stdscr; }
functions
int is_outside_screen(int x, int y) { int xmax, ymax; if (window == stdscr) x += margin_x; getmaxyx(window, ymax, xmax); return x >= xmax || y >= ymax; }
functions
void get_xy(int *x, int *y) { getyx(window, *y, *x); }
functions
void cleartoeol() { wclrtoeol(window); }
functions
void setfgcolor(int clr) { int pairs[6] = {RED_FG, 15, 16, BOARD_FRAME_COLOR, MAGENTA_FG, 17}
functions
void set_color_pair(int pair) { int attrs; if (_MONOCHROME) { if (pair == MAGENTA_FG) setattr_bold(); return; }
functions
else if (pair & 16) { setfgcolor(pair); return; }
functions
void setattr_normal() { wattrset(window, A_NORMAL); }
functions
void setattr_standout() { wstandout(window); }
functions
void setattr_bold() { if ((textgfx_flags & TT_MONO) != TT_MONO) wattron(window, A_BOLD); }
functions
void setattr_underline() { wattron(window, A_UNDERLINE); }
functions
int putch_acs1(int ch) { chtype c; switch (ch) { case TEXTURE1: c = ACS_CKBOARD; break; case BULLET: c = ACS_BULLET; break; case UPARROW: c = ACS_UARROW; break; default: return 0; }
functions
int putch_acs(int ch) { int x, y; int i; if (putch_acs1(ch)) return 1; if (ch >= TEXTURE2 && ch <= VLINE) { i = ch-0x100-'h'; if (acs_chars[i]) { getyx(window, y, x); waddch(window, acs_chars[i]); if (is_outside_screen(x+1, 0)) wmove(window, y, x); return 1; }
functions
void put_ch(int ch) { if (!(ch & 0x100)) waddch(window, ch); else if (_ASCII || ch == (' '|0x100) || ch == TEXTURE2 && textgfx_flags & (XTERM | TT_BLOCKS | BLACK_BRACKETS)) putch_ascii(ch); else if (!putch_acs(ch)) waddch(window, ch & ~0x100); }
functions
int printstr(const char *str) { int x, y, w; int n = strlen(str); getyx(window, y, x); getmaxyx(window, y, w); if (x+n >= w) n = w-x-1; waddnstr(window, str, n); return n; }
functions
void printint(const char *fmt, int d) { wprintw(window, fmt, d); }
functions
void printlong(const char *fmt, long d) { wprintw(window, fmt, d); }
functions
int default_bgdot() { return _XTERM ? BULLET : '.'; }
defines
#define EVAS_ARRAY_SET(E, Array) \