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:
@@ -56,9 +56,7 @@ __STATIC_INLINE__ void ring_q_item_decrease(k_ring_q_t *ring_q)
|
||||
ring_q->item_cnt = item_cnt;
|
||||
|
||||
TOS_OBJ_INIT(ring_q, KNL_OBJ_TYPE_RING_QUEUE);
|
||||
#if TOS_CFG_MMHEAP_EN > 0u
|
||||
knl_object_alloc_set_static(&ring_q->knl_obj);
|
||||
#endif
|
||||
|
||||
return K_ERR_NONE;
|
||||
}
|
||||
@@ -68,11 +66,9 @@ __API__ k_err_t tos_ring_q_destroy(k_ring_q_t *ring_q)
|
||||
TOS_PTR_SANITY_CHECK(ring_q);
|
||||
TOS_OBJ_VERIFY(ring_q, KNL_OBJ_TYPE_RING_QUEUE);
|
||||
|
||||
#if TOS_CFG_MMHEAP_EN > 0u
|
||||
if (!knl_object_alloc_is_static(&ring_q->knl_obj)) {
|
||||
return K_ERR_OBJ_INVALID_ALLOC_TYPE;
|
||||
}
|
||||
#endif
|
||||
|
||||
ring_q->head = 0u;
|
||||
ring_q->tail = 0u;
|
||||
@@ -83,15 +79,11 @@ __API__ k_err_t tos_ring_q_destroy(k_ring_q_t *ring_q)
|
||||
ring_q->item_cnt = 0u;
|
||||
|
||||
TOS_OBJ_DEINIT(ring_q);
|
||||
#if TOS_CFG_MMHEAP_EN > 0u
|
||||
knl_object_alloc_reset(&ring_q->knl_obj);
|
||||
#endif
|
||||
|
||||
return K_ERR_NONE;
|
||||
}
|
||||
|
||||
#if TOS_CFG_MMHEAP_EN > 0u
|
||||
|
||||
__API__ k_err_t tos_ring_q_create_dyn(k_ring_q_t *ring_q, size_t item_cnt, size_t item_size)
|
||||
{
|
||||
void *pool;
|
||||
@@ -142,8 +134,6 @@ __API__ k_err_t tos_ring_q_destroy_dyn(k_ring_q_t *ring_q)
|
||||
return K_ERR_NONE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
__API__ k_err_t tos_ring_q_enqueue(k_ring_q_t *ring_q, void *item, size_t item_size)
|
||||
{
|
||||
TOS_CPU_CPSR_ALLOC();
|
||||
|
Reference in New Issue
Block a user