/btstack/port/samv71-xplained-atwilc3000/ASF/sam/utils/preprocessor/ |
H A D | mrepeat.h | 75 #define MREPEAT(count, macro, data) TPASTE2(MREPEAT, count)(macro, data) argument 77 #define MREPEAT0( macro, data) argument 78 #define MREPEAT1( macro, data) MREPEAT0( macro, data) macro( 0, data) argument 79 #define MREPEAT2( macro, data) MREPEAT1( macro, data) macro( 1, data) argument 80 #define MREPEAT3( macro, data) MREPEAT2( macro, data) macro( 2, data) argument 81 #define MREPEAT4( macro, data) MREPEAT3( macro, data) macro( 3, data) argument 82 #define MREPEAT5( macro, data) MREPEAT4( macro, data) macro( 4, data) argument 83 #define MREPEAT6( macro, data) MREPEAT5( macro, data) macro( 5, data) argument 84 #define MREPEAT7( macro, data) MREPEAT6( macro, data) macro( 6, data) argument 85 #define MREPEAT8( macro, data) MREPEAT7( macro, data) macro( 7, data) argument [all …]
|
/btstack/port/max32630-fthr/board/ |
H A D | max14690n.c | 61 uint8_t data[2]; in MAX14690N_Init() local 71 if (I2CM_Read(MAX14690_I2CM, MAX14690_I2C_ADDR, &addr, 1, data, 2) != 2) { in MAX14690N_Init() 77 data[0] = MAX14690_REG_LDO2_VSET; in MAX14690N_Init() 78 data[1] = (10 * ldo2v) - 8; in MAX14690N_Init() 79 if (I2CM_Write(MAX14690_I2CM, MAX14690_I2C_ADDR, NULL, 0, data, 2) != 2) { in MAX14690N_Init() 83 data[0] = MAX14690_REG_LDO2_CFG; in MAX14690N_Init() 84 data[1] = ldo2en; in MAX14690N_Init() 85 if (I2CM_Write(MAX14690_I2CM, MAX14690_I2C_ADDR, NULL, 0, data, 2) != 2) { in MAX14690N_Init() 91 data[0] = MAX14690_REG_LDO3_VSET; in MAX14690N_Init() 92 data[1] = (10 * ldo3v) - 8; in MAX14690N_Init() [all …]
|
/btstack/3rd-party/lwip/core/src/apps/snmp/ |
H A D | snmp_asn1.c | 59 u8_t data; in snmp_ans1_enc_tlv() local 99 data = 0x80 | length_bytes_required; /* extended length definition, 1 length byte follows */ in snmp_ans1_enc_tlv() 101 PBUF_OP_EXEC(snmp_pbuf_stream_write(pbuf_stream, data)); in snmp_ans1_enc_tlv() 106 data = (u8_t)(tlv->value_len >> 8); in snmp_ans1_enc_tlv() 109 data = 0x00; in snmp_ans1_enc_tlv() 112 PBUF_OP_EXEC(snmp_pbuf_stream_write(pbuf_stream, data)); in snmp_ans1_enc_tlv() 118 data = (u8_t)(tlv->value_len & 0xFF); in snmp_ans1_enc_tlv() 119 PBUF_OP_EXEC(snmp_pbuf_stream_write(pbuf_stream, data)); in snmp_ans1_enc_tlv() 358 u8_t data; in snmp_asn1_dec_tlv() local 361 PBUF_OP_EXEC(snmp_pbuf_stream_read(pbuf_stream, &data)); in snmp_asn1_dec_tlv() [all …]
|
/btstack/test/sbc/ |
H A D | Makefile | 52 data_sine_stereo_sbc.h: data/sine-stereo.sbc 55 data_fanfare_8sb_stereo_sbc.h: data/fanfare-8sb-stereo.sbc 60 ./sbc_decoder_test data/avdtp_sink sbc 0 0 66 ./sbc_decoder_test.py data/sine-4sb-mono.sbc data/sine-4sb-decoded-mono.wav 67 ./sbc_decoder_test.py data/sine-8sb-mono.sbc data/sine-8sb-decoded-mono.wav 68 ./sbc_decoder_test.py data/sine-4sb-stereo.sbc data/sine-4sb-decoded-stereo.wav 69 ./sbc_decoder_test.py data/sine-8sb-stereo.sbc data/sine-8sb-decoded-stereo.wav 71 ./sbc_encoder_test.py data/sine-mono.wav 16 4 31 0 data/sine-4sb-mono.sbc 72 ./sbc_encoder_test.py data/sine-mono.wav 16 8 64 0 data/sine-8sb-mono.sbc 73 ./sbc_encoder_test.py data/sine-stereo.wav 16 4 30 1 2 data/sine-4sb-stereo.sbc [all …]
|
/btstack/platform/daemon/binding/python/btstack/ |
H A D | btstack_types.py | 10 def unpack24(data): argument 11 (upper, ) = struct.unpack("<H", data[1:]) 12 return data[0] | (upper << 8) 32 data = bytearray(self.addr) 33 data.reverse() 34 return data 63 data = bytearray(self.uuid) 64 data.reverse() 65 return data 81 def __init__(self, data): argument [all …]
|
/btstack/src/mesh/ |
H A D | mesh.c | 348 mesh_persistent_foundation_t data; in mesh_foundation_state_load() local 350 …get_tag(btstack_tlv_singleton_context, mesh_foundation_state_tag, (uint8_t *) &data, sizeof(data)); in mesh_foundation_state_load() 351 if (foundation_state_len != sizeof(data)) return; in mesh_foundation_state_load() 353 mesh_foundation_gatt_proxy_set(data.gatt_proxy); in mesh_foundation_state_load() 354 mesh_foundation_beacon_set(data.beacon); in mesh_foundation_state_load() 355 mesh_foundation_default_ttl_set(data.default_ttl); in mesh_foundation_state_load() 356 mesh_foundation_friend_set(data.friend); in mesh_foundation_state_load() 357 mesh_foundation_network_transmit_set(data.network_transmit); in mesh_foundation_state_load() 358 mesh_foundation_relay_set(data.relay); in mesh_foundation_state_load() 359 mesh_foundation_relay_retransmit_set(data.relay_retransmit); in mesh_foundation_state_load() [all …]
|
H A D | mesh_network.c | 157 uint8_t ivi = network_pdu->data[0] >> 7; in mesh_network_cache_hash() 158 uint16_t seq = big_endian_read_16(network_pdu->data, 3); in mesh_network_cache_hash() 159 uint16_t src = big_endian_read_16(network_pdu->data, 5); in mesh_network_cache_hash() 244 (void)memcpy(&nonce[pos], &pdu->data[1], 6); in mesh_network_create_nonce() 255 (void)memcpy(&nonce[pos], &pdu->data[2], 5); in mesh_proxy_create_nonce() 286 outgoing_pdu->data[1+i] ^= obfuscation_block[i]; in mesh_network_send_c() 291 printf_hexdump(outgoing_pdu->data, outgoing_pdu->len); in mesh_network_send_c() 309 printf_hexdump(network_pdu->data, network_pdu->len); in mesh_network_send_c() 329 uint8_t net_mic_len = outgoing_pdu->data[1] & 0x80 ? 8 : 4; in mesh_network_send_b() 330 (void)memcpy(&outgoing_pdu->data[outgoing_pdu->len], net_mic, net_mic_len); in mesh_network_send_b() [all …]
|
/btstack/test/tlv_posix/ |
H A D | tlv_test.cpp | 53 uint8_t data = 7; in TEST() local 54 uint8_t buffer = data; in TEST() 59 CHECK_EQUAL(buffer, data); in TEST() 64 uint8_t data = 7; in TEST() local 65 uint8_t buffer = data; in TEST() 67 data++; in TEST() 68 buffer = data; in TEST() 73 CHECK_EQUAL(buffer, data); in TEST() 79 uint8_t data = 7; in TEST() local 80 uint8_t buffer = data; in TEST() [all …]
|
/btstack/3rd-party/lc3-google/src/ |
H A D | sns.c | 775 const float *eb, bool att, struct lc3_sns_data *data, in lc3_sns_analyze() argument 790 resolve_codebooks(scf, &data->lfcb, &data->hfcb); in lc3_sns_analyze() 792 quantize(scf, data->lfcb, data->hfcb, in lc3_sns_analyze() 793 c, cn, &data->shape, &data->gain); in lc3_sns_analyze() 795 unquantize(data->lfcb, data->hfcb, in lc3_sns_analyze() 796 cn[data->shape], data->shape, data->gain, scf); in lc3_sns_analyze() 798 enumerate(data->shape, c[data->shape], in lc3_sns_analyze() 799 &data->idx_a, &data->ls_a, &data->idx_b, &data->ls_b); in lc3_sns_analyze() 809 const lc3_sns_data_t *data, const float *x, float *y) in lc3_sns_synthesize() argument 814 deenumerate(data->shape, in lc3_sns_synthesize() [all …]
|
H A D | tns.c | 388 bool nn_flag, int nbytes, struct lc3_tns_data *data, float *x) in lc3_tns_analyze() argument 400 data->lpc_weighting = resolve_lpc_weighting(dt, nbytes); in lc3_tns_analyze() 401 data->nfilters = 1 + (dt >= LC3_DT_5M && bw >= LC3_BANDWIDTH_SWB); in lc3_tns_analyze() 406 for (int f = 0; f < data->nfilters; f++) { in lc3_tns_analyze() 408 data->rc_order[f] = 0; in lc3_tns_analyze() 412 if (data->lpc_weighting && pred_gain[f] < 2.f) in lc3_tns_analyze() 417 quantize_rc(rc[f], maxorder, &data->rc_order[f], data->rc[f]); in lc3_tns_analyze() 418 unquantize_rc(data->rc[f], data->rc_order[f], rc[f]); in lc3_tns_analyze() 421 forward_filtering(dt, bw, data->rc_order, rc, x); in lc3_tns_analyze() 428 const struct lc3_tns_data *data, float *x) in lc3_tns_synthesize() argument [all …]
|
/btstack/test/fuzz/ |
H A D | fuzz_gatt_client.c | 53 void set_gatt_service_uuid16(gatt_client_service_t * service, const uint8_t *data, size_t size){ in set_gatt_service_uuid16() argument 57 service->uuid16 = big_endian_read_16(data, 0); in set_gatt_service_uuid16() 60 void set_gatt_service_uuid128(gatt_client_service_t * service, const uint8_t *data, size_t size){ in set_gatt_service_uuid128() argument 64 memcpy(service->uuid128, data, 16); in set_gatt_service_uuid128() 67 …acteristic_uuid16(gatt_client_characteristic_t * characteristic, const uint8_t *data, size_t size){ in set_gatt_characteristic_uuid16() argument 71 characteristic->uuid16 = big_endian_read_16(data, 0); in set_gatt_characteristic_uuid16() 75 …cteristic_uuid128(gatt_client_characteristic_t * characteristic, const uint8_t *data, size_t size){ in set_gatt_characteristic_uuid128() argument 80 memcpy(characteristic->uuid128, data, 16); in set_gatt_characteristic_uuid128() 83 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { in LLVMFuzzerTestOneInput() argument 103 uint8_t cmd_type = (data[0] & 0x1F); in LLVMFuzzerTestOneInput() [all …]
|
/btstack/3rd-party/lwip/core/src/netif/ppp/ |
H A D | demand.c | 71 unsigned char data[1]; member 303 memcpy(pkt->data, frame, len); 338 if (PPP_PROTOCOL(pkt->data) == proto) { 342 iphdr = (pkt->data[4] & 15) << 2; 343 checksum = *((unsigned short *) (pkt->data+14)); 349 if (pkt->data[13] == 17) { 350 pkt_checksum = *((unsigned short *) (pkt->data+10+iphdr)); 362 if (pkt->data[13] == 6) { 363 pkt_checksum = *((unsigned short *) (pkt->data+20+iphdr)); 371 checksum -= *((unsigned short *) (pkt->data+16)) ^ 0xFFFF; [all …]
|
/btstack/example/ |
H A D | gap_le_advertisements.c | 144 const uint8_t * data = ad_iterator_get_data(&context); in dump_advertisement_data() local 156 if (data[0] & (1<<i)){ in dump_advertisement_data() 165 printf("%04X ", little_endian_read_16(data, i)); in dump_advertisement_data() 172 printf("%04"PRIX32, little_endian_read_32(data, i)); in dump_advertisement_data() 178 reverse_128(data, uuid_128); in dump_advertisement_data() 184 printf("%c", (char)(data[i])); in dump_advertisement_data() 188 printf("%d dBm", *(int8_t*)data); in dump_advertisement_data() 191 …erval Min = %u ms, Max = %u ms", little_endian_read_16(data, 0) * 5/4, little_endian_read_16(data,… in dump_advertisement_data() 195 printf("%02X ", data[i]); in dump_advertisement_data() 200 reverse_bd_addr(data, address); in dump_advertisement_data() [all …]
|
/btstack/test/avdtp/ |
H A D | portaudio_test.c | 72 static void write_wav_data(int16_t * data, int num_frames, int num_channels, int sample_rate){ in write_wav_data() argument 74 wav_writer_write_int16(num_frames*num_channels, data); in write_wav_data() 80 paTestData *data = (paTestData*)userData; in fill_ring_buffer() local 84 *(int16_t*)&write_data[0] = data->sine[data->left_phase]; in fill_ring_buffer() 85 *(int16_t*)&write_data[2] = data->sine[data->right_phase]; in fill_ring_buffer() 90 data->left_phase += 1; in fill_ring_buffer() 91 if (data->left_phase >= TABLE_SIZE){ in fill_ring_buffer() 92 data->left_phase -= TABLE_SIZE; in fill_ring_buffer() 94 data->right_phase += 2; /* higher pitch so we can distinguish left and right. */ in fill_ring_buffer() 95 if (data->right_phase >= TABLE_SIZE){ in fill_ring_buffer() [all …]
|
H A D | sine_encode_decode_test.c | 79 static void handle_pcm_data(int16_t * data, int num_samples, int num_channels, int sample_rate, voi… in handle_pcm_data() argument 82 wav_writer_write_int16(num_samples*num_channels, data); in handle_pcm_data() 86 paTestData *data = (paTestData*)userData; in fill_sine_frame() local 91 *(int16_t*)&write_data[0] = data->source[data->left_phase]; in fill_sine_frame() 92 *(int16_t*)&write_data[2] = data->source[data->right_phase]; in fill_sine_frame() 98 data->left_phase += 1; in fill_sine_frame() 99 if (data->left_phase >= TABLE_SIZE_441HZ){ in fill_sine_frame() 100 data->left_phase -= TABLE_SIZE_441HZ; in fill_sine_frame() 102 data->right_phase += 1; in fill_sine_frame() 103 if (data->right_phase >= TABLE_SIZE_441HZ){ in fill_sine_frame() [all …]
|
H A D | sine_encode_decode_performance_test.c | 73 static void handle_pcm_data(int16_t * data, int num_samples, int num_channels, int sample_rate, voi… in handle_pcm_data() argument 76 UNUSED(data); in handle_pcm_data() 82 paTestData *data = (paTestData*)userData; in fill_sine_frame() local 87 *(int16_t*)&write_data[0] = data->source[data->left_phase]; in fill_sine_frame() 88 *(int16_t*)&write_data[2] = data->source[data->right_phase]; in fill_sine_frame() 94 data->left_phase += 1; in fill_sine_frame() 95 if (data->left_phase >= TABLE_SIZE_441HZ){ in fill_sine_frame() 96 data->left_phase -= TABLE_SIZE_441HZ; in fill_sine_frame() 98 data->right_phase += 1; in fill_sine_frame() 99 if (data->right_phase >= TABLE_SIZE_441HZ){ in fill_sine_frame() [all …]
|
/btstack/test/mesh/ |
H A D | dump_mesh_pklg.py | 145 data = f.read(4) 146 if len(data) < 4: 148 return struct.unpack('>I', data)[0] 150 def as_hex(data): argument 151 return ''.join(["{0:02x} ".format(byte) for byte in data]) 156 def read_net_16(data): argument 157 return struct.unpack('>H', data)[0] 159 def read_net_24(data): argument 160 return data[0] << 16 | struct.unpack('>H', data[1:3])[0] 162 def read_net_32(data): argument [all …]
|
H A D | sniffer.c | 151 const uint8_t * data = ad_iterator_get_data(&context); in dump_advertisement_data() local 163 if (data[0] & (1<<i)){ in dump_advertisement_data() 173 printf("%02X ", little_endian_read_16(data, i)); in dump_advertisement_data() 180 printf("%04"PRIX32, little_endian_read_32(data, i)); in dump_advertisement_data() 186 reverse_128(data, uuid_128); in dump_advertisement_data() 192 printf("%c", (char)(data[i])); in dump_advertisement_data() 196 printf("%d dBm", *(int8_t*)data); in dump_advertisement_data() 199 …erval Min = %u ms, Max = %u ms", little_endian_read_16(data, 0) * 5/4, little_endian_read_16(data,… in dump_advertisement_data() 202 printf_hexdump(data, size); in dump_advertisement_data() 206 reverse_bd_addr(data, address); in dump_advertisement_data() [all …]
|
/btstack/src/ble/gatt-service/ |
H A D | device_information_service_server.c | 82 uint8_t * data; member 97 device_information_fields[field_id].data = (uint8_t*) text; in set_string() 105 …mation_fields[i].value_handle == attribute_handle) && (device_information_fields[i].data != NULL)){ in device_information_service_read_callback() 106 …return att_read_callback_handle_blob(device_information_fields[i].data, device_information_fields[… in device_information_service_read_callback() 136 device_information_fields[SYSTEM_ID].data = device_information_system_id; in device_information_service_server_init() 138 …device_information_fields[IEEE_REGULATORY_CERTIFICATION].data = device_information_ieee_regulatory… in device_information_service_server_init() 140 device_information_fields[PNP_ID].data = device_information_pnp_id; in device_information_service_server_init() 143 …device_information_fields[UDI_FOR_MEDICAL_DEVICES].data = device_information_udi_for_medical_devic… in device_information_service_server_init() 241 uint8_t * data = device_information_fields[UDI_FOR_MEDICAL_DEVICES].data; in device_information_service_server_set_udi_for_medical_devices() local 245 data[pos++] = 0; // reserved for flags in device_information_service_server_set_udi_for_medical_devices() [all …]
|
/btstack/src/classic/ |
H A D | sdp_client.c | 75 void sdp_parser_handle_chunk(uint8_t * data, uint16_t size); 79 void sdp_parser_handle_service_search(uint8_t * data, uint16_t total_count, uint16_t record_handle_… 84 static uint16_t sdp_client_setup_service_search_attribute_request(uint8_t * data); 86 static uint16_t sdp_client_setup_service_search_request(uint8_t * data); 87 static uint16_t sdp_client_setup_service_attribute_request(uint8_t * data); 313 void sdp_parser_handle_chunk(uint8_t * data, uint16_t size){ in sdp_parser_handle_chunk() argument 316 sdp_parser_process_byte(data[i]); in sdp_parser_handle_chunk() 334 void sdp_parser_handle_service_search(uint8_t * data, uint16_t total_count, uint16_t record_handle_… in sdp_parser_handle_service_search() argument 337 sdp_client_record_handle = big_endian_read_32(data, i * 4); in sdp_parser_handle_service_search() 390 uint8_t * data = l2cap_get_outgoing_buffer(); in sdp_client_send_request() local [all …]
|
/btstack/test/gatt-service-client/ |
H A D | ancs_client_test.cpp | 211 const uint8_t data[] = {}; in TEST() local 212 mock_gatt_client_send_notification(ancs_notification_source_characteristic, data, sizeof(data)); in TEST() 228 const uint8_t data[] = { 0, 0,0,0,0, 1, 1, 0, 'a', 2, 0, 0}; in TEST() local 229 mock_gatt_client_send_notification(ancs_data_source_characteristic, data, sizeof(data)); in TEST() 246 const uint8_t data[] = { 0, 0,0,0,0, 1, 1, 0, 'a', 2, 0, 0}; in TEST() local 247 mock_gatt_client_send_notification(ancs_data_source_characteristic, data, sizeof(data)); in TEST() 254 const uint8_t data[] = {}; in TEST() local 255 …send_notification_with_handle(ancs_notification_source_characteristic, 0x0001, data, sizeof(data)); in TEST() 262 const uint8_t data[] = {}; in TEST() local 263 …t_send_indication_with_handle(ancs_notification_source_characteristic, 0x0001, data, sizeof(data)); in TEST() [all …]
|
/btstack/test/hfp/ |
H A D | mock.c | 99 char * data = (char *)(&get_rfcomm_payload()[hfp_command_start_index + start_command_offset]); in get_next_hfp_command() local 105 if ( *(data+i) == '\r' || *(data+i) == '\n' ) { in get_next_hfp_command() 106 data[i]=0; in get_next_hfp_command() 110 return data; in get_next_hfp_command() 117 void print_without_newlines(uint8_t *data, uint16_t len); 118 void print_without_newlines(uint8_t *data, uint16_t len){ in print_without_newlines() argument 123 if (data[i] == '\r' || data[i] == '\n'){ in print_without_newlines() 127 printf("%c", data[i]); in print_without_newlines() 140 uint8_t rfcomm_send(uint16_t rfcomm_cid, uint8_t *data, uint16_t len){ in rfcomm_send() argument 148 if (strncmp((char*)data, "AT", 2) == 0){ in rfcomm_send() [all …]
|
/btstack/platform/daemon/binding/java/src/com/bluekitchen/btstack/ |
H A D | GATTService.java | 15 byte data[] = new byte[LEN]; field in GATTService 18 return data; in getBytes() 21 public GATTService(byte data[]){ in GATTService() argument 22 if (data.length != LEN) return; in GATTService() 23 System.arraycopy(data, 0, this.data, 0, LEN); in GATTService() 27 return Util.readBt16(data, 0); in getStartGroupHandle() 31 return Util.readBt16(data, 2); in getEndGroupHandle() 35 return new BT_UUID(Arrays.copyOfRange(data, 4, 4 + 16)); in getUUID()
|
/btstack/tool/ |
H A D | dump_gatt.py | 10 def as_hex(data): argument 12 for byte in data: 16 def as_bd_addr(data): argument 18 for byte in data: 29 def uuid16_at_offset(data, offset): argument 30 return "%04x" % struct.unpack_from("<H", data, offset)[0] 32 def uuid128_at_offset(data, offset): argument 33 uuid128 = bytes(reversed(data[offset:offset+16])) 36 def handle_at_offset(data, offset): argument 37 return struct.unpack_from("<H", data, offset)[0]; [all …]
|
/btstack/port/mtk/docs/scripts/ |
H A D | plot_scan.py | 15 def histplot(data,labels, colors, x_label, y_label, title, fig_name, cdf): argument 18 …n, bins, patches = ax.hist(data, 20, weights=None, histtype='step', normed=True, cumulative=True, … 23 … n, bins, patches = ax.hist( data, 20, weights=None, histtype='bar', label= labels, color = colors) 45 def accplot(data, labels, colors, x_label, y_label, title, fig_name, annotation): argument 46 mean = np.zeros(len(data)) 47 for i in range(len(data)): 48 if len(data[i]) > 0: 49 mean[i] = len(data[i]) /(1.0*max(data[i])) 54 for i in range(len(data)): 55 if len(data[i]) > 0: [all …]
|