add ota algorithm for device
1. effective "Differential Upgrade" patch algorithm with high compression rate 2. effective recovery algorithm support recovery firmware in blocks which has low memory consumption and wear-leveling strategies, especially suitable for embeded devices with low RAM. 3. add sample ota bootloader project, see: board\TencentOS_tiny_EVB_MX_Plus\KEIL\ota\ota_bootloader_recovery 4. add sample application project for download firmware through http, see: board\TencentOS_tiny_EVB_MX_Plus\KEIL\ota\ota_application_download_through_http 5. add sample application project for download firmware through qcloud explorer console, see: board\TencentOS_tiny_EVB_MX_Plus\KEIL\ota\ota_application_download_through_qcloud_iot_explorer 6. an OTA markdown document is pending
This commit is contained in:
@@ -30,9 +30,7 @@ __API__ k_err_t tos_chr_fifo_create(k_chr_fifo_t *chr_fifo, void *buffer, size_t
|
||||
}
|
||||
|
||||
TOS_OBJ_INIT(chr_fifo, KNL_OBJ_TYPE_CHAR_FIFO);
|
||||
#if TOS_CFG_MMHEAP_EN > 0u
|
||||
knl_object_alloc_set_static(&chr_fifo->knl_obj);
|
||||
#endif
|
||||
|
||||
return K_ERR_NONE;
|
||||
}
|
||||
@@ -44,11 +42,9 @@ __API__ k_err_t tos_chr_fifo_destroy(k_chr_fifo_t *chr_fifo)
|
||||
TOS_PTR_SANITY_CHECK(chr_fifo);
|
||||
TOS_OBJ_VERIFY(chr_fifo, KNL_OBJ_TYPE_CHAR_FIFO);
|
||||
|
||||
#if TOS_CFG_MMHEAP_EN > 0u
|
||||
if (!knl_object_alloc_is_static(&chr_fifo->knl_obj)) {
|
||||
return K_ERR_OBJ_INVALID_ALLOC_TYPE;
|
||||
}
|
||||
#endif
|
||||
|
||||
err = tos_ring_q_destroy(&chr_fifo->ring_q);
|
||||
if (err != K_ERR_NONE) {
|
||||
@@ -56,15 +52,11 @@ __API__ k_err_t tos_chr_fifo_destroy(k_chr_fifo_t *chr_fifo)
|
||||
}
|
||||
|
||||
TOS_OBJ_DEINIT(chr_fifo);
|
||||
#if TOS_CFG_MMHEAP_EN > 0u
|
||||
knl_object_alloc_reset(&chr_fifo->knl_obj);
|
||||
#endif
|
||||
|
||||
return K_ERR_NONE;
|
||||
}
|
||||
|
||||
#if TOS_CFG_MMHEAP_EN > 0u
|
||||
|
||||
__API__ k_err_t tos_chr_fifo_create_dyn(k_chr_fifo_t *chr_fifo, size_t fifo_size)
|
||||
{
|
||||
k_err_t err;
|
||||
@@ -104,8 +96,6 @@ __API__ k_err_t tos_chr_fifo_destroy_dyn(k_chr_fifo_t *chr_fifo)
|
||||
return K_ERR_NONE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
__API__ k_err_t tos_chr_fifo_push(k_chr_fifo_t *chr_fifo, uint8_t data)
|
||||
{
|
||||
TOS_PTR_SANITY_CHECK(chr_fifo);
|
||||
|
Reference in New Issue
Block a user