Home
last modified time | relevance | path

Searched refs:buf_len (Results 1 – 25 of 110) sorted by relevance

12345

/AliOS-Things-master/components/amp/services/amp_boot/
A Damp_boot_ymodem.c109 for (i = 0; i < buf_len; buf++, i++) { in ymodem_str2int()
155 unsigned int buf_len = 0; in ymodem_data_head_parse() local
162 buffer = amp_malloc(buf_len); in ymodem_data_head_parse()
163 memset(buffer, 0, buf_len); in ymodem_data_head_parse()
174 if (((crc >> 8) != buffer[buf_len - 2]) || ((crc & 0xFF) != buffer[buf_len - 1])) { in ymodem_data_head_parse()
179 for(i = 2; i < buf_len - 2; i++) { in ymodem_data_head_parse()
200 for (i = 2; i < buf_len - 4; i ++) { in ymodem_data_head_parse()
215 unsigned int buf_len = 0; in ymodem_data_parse() local
221 buffer = amp_malloc(buf_len); in ymodem_data_parse()
222 memset(buffer, 0, buf_len); in ymodem_data_parse()
[all …]
/AliOS-Things-master/components/ota/2ndboot/
A Dymodem.c92 unsigned int buf_len = 0; in ymodem_data_head_parse() local
98 buffer = malloc(buf_len); in ymodem_data_head_parse()
99 memset(buffer, 0, buf_len); in ymodem_data_head_parse()
108 if (((crc >> 8) != buffer[buf_len - 2]) || ((crc & 0xFF) != buffer[buf_len - 1])) { in ymodem_data_head_parse()
112 for(i = 2; i < buf_len - 2; i++) { in ymodem_data_head_parse()
159 unsigned int buf_len = 0; in ymodem_data_parse() local
165 buffer = malloc(buf_len); in ymodem_data_parse()
166 memset(buffer, 0, buf_len); in ymodem_data_parse()
172 value = ymodem_recv_bytes(buffer, buf_len, UART_RECV_TIMEOUT * (buf_len / SOH_DATA_LEN)); in ymodem_data_parse()
179 if (((crc >> 8) != buffer[buf_len - 2]) || ((crc & 0xFF) != buffer[buf_len - 1])) { in ymodem_data_parse()
[all …]
/AliOS-Things-master/components/py_engine/external/amp_boot/
A Damp_boot_ymodem.c116 for (i = 0; i < buf_len; buf++, i++) { in pyamp_ymodem_str2int()
161 unsigned int buf_len = 0; in pyamp_ymodem_data_head_parse() local
171 buffer = aos_malloc(buf_len); in pyamp_ymodem_data_head_parse()
172 memset(buffer, 0, buf_len); in pyamp_ymodem_data_head_parse()
185 if (((crc >> 8) != buffer[buf_len - 2]) || ((crc & 0xFF) != buffer[buf_len - 1])) { in pyamp_ymodem_data_head_parse()
190 for (i = 2; i < buf_len - 2; i++) { in pyamp_ymodem_data_head_parse()
218 for (i = 2; i < buf_len - 4; i++) { in pyamp_ymodem_data_head_parse()
242 unsigned int buf_len = 0; in pyamp_ymodem_data_parse() local
248 buffer = aos_malloc(buf_len); in pyamp_ymodem_data_parse()
249 memset(buffer, 0, buf_len); in pyamp_ymodem_data_parse()
[all …]
A Damp_boot_file_transfer.c213 int pyamp_ymodem_save_transfer_file(uint8_t *buf, int32_t buf_len, AMP_FILE_RECEVIE_FLAG flag) in pyamp_ymodem_save_transfer_file() argument
224 recevie_filename = aos_malloc(buf_len); in pyamp_ymodem_save_transfer_file()
225 memset(recevie_filename, 0, buf_len); in pyamp_ymodem_save_transfer_file()
226 memcpy(recevie_filename, buf, buf_len); in pyamp_ymodem_save_transfer_file()
231 recevie_file_size = buf_len; in pyamp_ymodem_save_transfer_file()
243 receive_file_offset += buf_len; in pyamp_ymodem_save_transfer_file()
246 for (i = buf_len - 1; i > 0; i--) { in pyamp_ymodem_save_transfer_file()
258 write_buf_len = buf_len; in pyamp_ymodem_save_transfer_file()
261 write_buf_len = buf_len; in pyamp_ymodem_save_transfer_file()
264 if (buf_len > 0) { in pyamp_ymodem_save_transfer_file()
A Damp_boot.c182 unsigned int buf_len = 0; in pyamp_boot_cli_receive_path() local
187 buf_len = 256; in pyamp_boot_cli_receive_path()
188 buffer = aos_malloc(buf_len); in pyamp_boot_cli_receive_path()
189 memset(buffer, 0, buf_len); in pyamp_boot_cli_receive_path()
208 value = pyamp_ymodem_recv_bytes(buffer, buf_len, 500000); in pyamp_boot_cli_receive_path()
307 unsigned int buf_len = 0; in pyamp_boot_cli_in() local
312 buf_len = 32; in pyamp_boot_cli_in()
313 buffer = aos_malloc(buf_len); in pyamp_boot_cli_in()
314 memset(buffer, 0, buf_len); in pyamp_boot_cli_in()
317 value = pyamp_ymodem_recv_bytes(buffer, buf_len, 300000); in pyamp_boot_cli_in()
/AliOS-Things-master/components/mbedtls/library/
A Dplatform.c245 int mbedtls_platform_std_nv_seed_read( unsigned char *buf, size_t buf_len ) in mbedtls_platform_std_nv_seed_read() argument
253 if( ( n = fread( buf, 1, buf_len, file ) ) != buf_len ) in mbedtls_platform_std_nv_seed_read()
256 mbedtls_platform_zeroize( buf, buf_len ); in mbedtls_platform_std_nv_seed_read()
264 int mbedtls_platform_std_nv_seed_write( unsigned char *buf, size_t buf_len ) in mbedtls_platform_std_nv_seed_write() argument
272 if( ( n = fwrite( buf, 1, buf_len, file ) ) != buf_len ) in mbedtls_platform_std_nv_seed_write()
291 ((void) buf_len); in platform_nv_seed_read_uninit()
305 ((void) buf_len); in platform_nv_seed_write_uninit()
312 int (*mbedtls_nv_seed_read)( unsigned char *buf, size_t buf_len ) =
314 int (*mbedtls_nv_seed_write)( unsigned char *buf, size_t buf_len ) =
318 int (*nv_seed_read_func)( unsigned char *buf, size_t buf_len ), in mbedtls_platform_set_nv_seed() argument
[all …]
/AliOS-Things-master/hardware/chip/rtl872xd/sdk/component/common/api/wifi/
A Dwifi_ind.c43 message.buf_len = buf_len; in rtw_send_event_to_worker()
44 if(buf_len){ in rtw_send_event_to_worker()
45 local_buf = (char*)pvPortMalloc(buf_len); in rtw_send_event_to_worker()
48 memcpy(local_buf, buf, buf_len); in rtw_send_event_to_worker()
79 handle(buf, buf_len, flags, event_callback_list[event_cmd][i].handler_user_data); in rtw_indicate_event_handle()
108 if(buf != NULL && buf_len == 6) in wifi_indication()
119 if(buf_len == strlen(IW_EXT_STR_FOURWAY_DONE)) in wifi_indication()
137 if(buf_len == strlen(IW_EXT_STR_RECONNECTION_FAIL)) in wifi_indication()
218 inic_indicate_event(event, buf, buf_len, flags); in wifi_indication()
222 rtw_send_event_to_worker(event, buf, buf_len, flags); in wifi_indication()
[all …]
A Dwifi_util.h57 int wext_set_scan(const char *ifname, char *buf, __u16 buf_len, __u16 flags);
58 int wext_get_scan(const char *ifname, char *buf, __u16 buf_len);
97 int wext_mailbox_to_wifi(const char *ifname, char *buf, __u16 buf_len);
107 int wext_send_mgnt(const char *ifname, char *buf, __u16 buf_len, __u16 flags);
108 int wext_send_eapol(const char *ifname, char *buf, __u16 buf_len, __u16 flags);
109 int wext_set_gen_ie(const char *ifname, char *buf, __u16 buf_len, __u16 flags);
A Dwifi_ind.h39 typedef void (*rtw_event_handler_t)(char *buf, int buf_len, int flags, void* handler_user_data );
70 extern void wifi_indication( rtw_event_indicate_t event, char *buf, int buf_len, int flags);
/AliOS-Things-master/components/amp/engine/quickjs_engine/startup/
A Dquickjs_module_load.c15 extern JSValue js_load_binary_module(JSContext *ctx, const uint8_t *buf, size_t buf_len);
54 size_t buf_len = 0; in quickjs_module_loader() local
65 buf_len = strlen(AMP_FS_ROOT_DIR) + 1 + strlen(module_name) + 1; in quickjs_module_loader()
66 path = aos_malloc(buf_len); in quickjs_module_loader()
67 memset(path, 0, buf_len); in quickjs_module_loader()
68 snprintf(path, buf_len, "%s/%s", AMP_FS_ROOT_DIR, module_name); in quickjs_module_loader()
71 buf_len = strlen(module_name) + 1; in quickjs_module_loader()
74 buf = js_load_file(ctx, &buf_len, path); in quickjs_module_loader()
84 func_val = JS_Eval(ctx, (char *) buf, buf_len, module_name, in quickjs_module_loader()
/AliOS-Things-master/components/lwip/lwip2.0.0/netif/ppp/
A Dmagic.c162 void magic_random_bytes(unsigned char *buf, u32_t buf_len) { in magic_random_bytes() argument
167 while (buf_len > 0) { in magic_random_bytes()
175 n = LWIP_MIN(buf_len, MD5_HASH_SIZE); in magic_random_bytes()
178 buf_len -= n; in magic_random_bytes()
274 void magic_random_bytes(unsigned char *buf, u32_t buf_len) { in magic_random_bytes() argument
277 while (buf_len > 0) { in magic_random_bytes()
279 n = LWIP_MIN(buf_len, sizeof(new_rand)); in magic_random_bytes()
282 buf_len -= n; in magic_random_bytes()
/AliOS-Things-master/hardware/chip/haas1000/drivers/services/bt_app/
A Dapp_bt.h216 uint32_t app_bt_save_a2dp_app_ctx(btif_remote_device_t *rem_dev, uint8_t *buf, uint32_t buf_len);
217 uint32_t app_bt_restore_a2dp_app_ctx(uint8_t *buf, uint32_t buf_len);
218 uint32_t app_bt_save_avrcp_app_ctx(btif_remote_device_t *rem_dev, uint8_t *buf, uint32_t buf_len);
219 uint32_t app_bt_restore_avrcp_app_ctx(uint8_t *buf, uint32_t buf_len);
220 uint32_t app_bt_save_hfp_app_ctx(btif_remote_device_t *rem_dev, uint8_t *buf, uint32_t buf_len);
221 uint32_t app_bt_restore_hfp_app_ctx(uint8_t *buf, uint32_t buf_len);
222 …bt_save_spp_app_ctx(uint32_t app_id,btif_remote_device_t *rem_dev, uint8_t *buf, uint32_t buf_len);
223 uint32_t app_bt_restore_spp_app_ctx(uint8_t *buf, uint32_t buf_len, uint32_t *app_id);
225 uint32_t app_bt_save_map_app_ctx(btif_remote_device_t *rem_dev, uint8_t *buf, uint32_t buf_len);
226 uint32_t app_bt_restore_map_app_ctx(uint8_t *buf, uint32_t buf_len);
/AliOS-Things-master/components/linkkit/ota/
A Dota_lib.c33 void otalib_MD5Update(void *md5, const char *buf, size_t buf_len) in otalib_MD5Update() argument
35 utils_md5_update(md5, (unsigned char *)buf, buf_len); in otalib_MD5Update()
71 void otalib_Sha256Update(void *sha256, const char *buf, size_t buf_len) in otalib_Sha256Update() argument
73 utils_sha256_update(sha256, (unsigned char *)buf, buf_len); in otalib_Sha256Update()
243 int otalib_GenInfoMsg(char *buf, size_t buf_len, uint32_t id, in otalib_GenInfoMsg() argument
247 ret = HAL_Snprintf(buf, buf_len, in otalib_GenInfoMsg()
262 int otalib_GenReportMsg(char *buf, size_t buf_len, uint32_t id, int progress, in otalib_GenReportMsg() argument
268 buf, buf_len, in otalib_GenReportMsg()
273 buf, buf_len, in otalib_GenReportMsg()
281 } else if (ret >= buf_len) { in otalib_GenReportMsg()
A Diotx_ota_internal.h96 void otalib_MD5Update(void *md5, const char *buf, size_t buf_len);
100 void otalib_Sha256Update(void *sha256, const char *buf, size_t buf_len);
112 int otalib_GenInfoMsg(char *buf, size_t buf_len, uint32_t id,
114 int otalib_GenReportMsg(char *buf, size_t buf_len, uint32_t id, int progress,
118 int32_t ofc_Fetch(void *handle, char *buf, uint32_t buf_len,
A Diotx_ota.c630 int IOT_OTA_FetchYield(void *handle, char *buf, uint32_t buf_len, in IOT_OTA_FetchYield() argument
636 if ((NULL == handle) || (NULL == buf) || (0 == buf_len)) { in IOT_OTA_FetchYield()
675 ret = ofc_Fetch(h_ota->ch_fetch, buf, buf_len, timeout_s); in IOT_OTA_FetchYield()
716 if ((NULL == handle) || (NULL == buf) || (0 == buf_len)) { in IOT_OTA_Ioctl()
847 if ((4 != buf_len) || (0 != ((unsigned long)buf & 0x3))) { in IOT_OTA_Ioctl()
857 if ((4 != buf_len) || (0 != ((unsigned long)buf & 0x3))) { in IOT_OTA_Ioctl()
868 strncpy(buf, h_ota->version, buf_len); in IOT_OTA_Ioctl()
869 ((char *)buf)[buf_len - 1] = '\0'; in IOT_OTA_Ioctl()
874 strncpy(buf, h_ota->md5sum, buf_len); in IOT_OTA_Ioctl()
875 ((char *)buf)[buf_len - 1] = '\0'; in IOT_OTA_Ioctl()
[all …]
A Dota_fetch.c123 int32_t ofc_Fetch(void *handle, char *buf, uint32_t buf_len, uint32_t timeout_s) in ofc_Fetch() argument
127 int http_recv_maxlen = buf_len; in ofc_Fetch()
132 memset(buf, 0, buf_len); in ofc_Fetch()
134 response.payload_len = buf_len; in ofc_Fetch()
/AliOS-Things-master/components/http/src/
A Dhttp_formdata.c64 int buf_len; in httpclient_formdata_addtext() local
116buf_len = strlen(TEXT_FORMAT) - 6 + strlen(content_disposition) + strlen(name) + strlen(data) + 1; in httpclient_formdata_addtext()
119buf_len = strlen(TEXT_CONTENT_TYPE_FORMAT) - 8 + strlen(content_disposition) + strlen(name) + strl… in httpclient_formdata_addtext()
121 current->data = (char*)malloc(buf_len+1); in httpclient_formdata_addtext()
134 memset(current->data, 0, sizeof(buf_len)); in httpclient_formdata_addtext()
136 snprintf(current->data, buf_len, TEXT_FORMAT, content_disposition, name, data); in httpclient_formdata_addtext()
140 …snprintf(current->data, buf_len, TEXT_CONTENT_TYPE_FORMAT, content_disposition, name, content_type… in httpclient_formdata_addtext()
191 int buf_len; in httpclient_formdata_addfile() local
244 current->data = (char*)malloc(buf_len + 1); in httpclient_formdata_addfile()
255 memset(current->data, 0, sizeof(buf_len)); in httpclient_formdata_addfile()
[all …]
/AliOS-Things-master/solutions/tflite_micro_speech_demo/micro_speech/
A Dringbuf.c114 while (buf_len) { in rb_read()
115 if (rb->fill_cnt < buf_len) { in rb_read()
118 read_size = buf_len; in rb_read()
135 buf_len -= read_size; in rb_read()
144 if (buf_len == 0) { in rb_read()
184 int rb_write(ringbuf_t* rb, const uint8_t* buf, int buf_len, in rb_write() argument
203 while (buf_len) { in rb_write()
204 if ((rb->size - rb->fill_cnt) < buf_len) { in rb_write()
207 write_size = buf_len; in rb_write()
220 buf_len -= write_size; in rb_write()
[all …]
/AliOS-Things-master/hardware/chip/rtl872xd/sdk/component/common/drivers/wlan/realtek/src/core/option/
A Drtw_opt_crypto_ssl.c211 unsigned int buf_len; in rtw_crypto_ecc_point_read_bignum() local
221 buf_len = 2*prime_len + 1; in rtw_crypto_ecc_point_read_bignum()
223 buf = rtw_zmalloc(buf_len); in rtw_crypto_ecc_point_read_bignum()
242 ret = mbedtls_ecp_point_read_binary(ecc,p,buf,buf_len); in rtw_crypto_ecc_point_read_bignum()
247 rtw_mfree(buf,buf_len); in rtw_crypto_ecc_point_read_bignum()
267 unsigned int buf_len; in rtw_crypto_ecc_point_write_bignum() local
279 buf_len = 2*prime_len + 1; in rtw_crypto_ecc_point_write_bignum()
281 buf = rtw_zmalloc(buf_len); in rtw_crypto_ecc_point_write_bignum()
307 rtw_mfree(buf,buf_len); in rtw_crypto_ecc_point_write_bignum()
553 MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(X,buf,buf_len)); in rtw_crypto_bignum_read_binary()
[all …]
/AliOS-Things-master/components/mbedtls/include/mbedtls/
A Dplatform.h288 int mbedtls_platform_std_nv_seed_read( unsigned char *buf, size_t buf_len );
289 int mbedtls_platform_std_nv_seed_write( unsigned char *buf, size_t buf_len );
293 extern int (*mbedtls_nv_seed_read)( unsigned char *buf, size_t buf_len );
294 extern int (*mbedtls_nv_seed_write)( unsigned char *buf, size_t buf_len );
306 int (*nv_seed_read_func)( unsigned char *buf, size_t buf_len ),
307 int (*nv_seed_write_func)( unsigned char *buf, size_t buf_len )
/AliOS-Things-master/components/lwip/lwip2.0.0/apps/snmp/
A Dsnmp_pbuf_stream.c80 snmp_pbuf_stream_writebuf(struct snmp_pbuf_stream* pbuf_stream, const void* buf, u16_t buf_len) in snmp_pbuf_stream_writebuf() argument
82 if (pbuf_stream->length < buf_len) { in snmp_pbuf_stream_writebuf()
86 if (pbuf_take_at(pbuf_stream->pbuf, buf, buf_len, pbuf_stream->offset) != ERR_OK) { in snmp_pbuf_stream_writebuf()
90 pbuf_stream->offset += buf_len; in snmp_pbuf_stream_writebuf()
91 pbuf_stream->length -= buf_len; in snmp_pbuf_stream_writebuf()
/AliOS-Things-master/components/amp/services/app_mgr/
A Dapp_mgr.h15 int32_t buf_len, int32_t complete);
19 int32_t offset, uint8_t *buf, int32_t buf_len,
33 typedef int (*download_js_cb_t)(uint8_t *buf, int32_t buf_len);
A Dapp_mgr.c91 uint8_t *buf, int32_t buf_len) in jspackoutput() argument
101 amp_md5_update(&g_ctx, buf, buf_len); in jspackoutput()
103 if (buf_len > 0) { in jspackoutput()
104 outsize = buf_len; in jspackoutput()
110 buf_len -= outsize; in jspackoutput()
600 if (buf_len > 0) { in write_app_pack()
601 ret = aos_write(app_fp, buf, buf_len); in write_app_pack()
604 if ((offset + buf_len) == file_size) { in write_app_pack()
626 int download_apppack(uint8_t *buf, int32_t buf_len) in download_apppack() argument
629 apppack_update(buf, buf_len); in download_apppack()
[all …]
/AliOS-Things-master/components/linkkit/wifi_provision/dev_bind/
A Dawss_utils.h41 #define utils_hex_to_str(buf, buf_len, str, str_buf_len) \ argument
42 LITE_hexbuf_convert(buf, str, buf_len, 1)
/AliOS-Things-master/components/lwip/lwip2.0.0/apps/lsfd/
A Dlsfd_cli.c10 static void lsfd_command(char *buffer, int32_t buf_len, int32_t argc, char **argv);
30 static void lsfd_command(char *buffer, int32_t buf_len, int32_t argc, char **argv) in lsfd_command() argument

Completed in 28 milliseconds

12345