Documentation

Documentation

Includes

tuya_os_adapter.h

#include "tuya_os_adapter.h"
#include "tuya_os_adapter.h"

tuya_cloud_types.h

#include "tuya_cloud_types.h"
#include "tuya_cloud_types.h"

Macros

Marco __TUYA_HAL_MEMORY_H__

#define __TUYA_HAL_MEMORY_H__

      

Functions

Func tuya_hal_system_malloc

VOID_T *tuya_hal_system_malloc(CONST SIZE_T size);
/**
* @brief Alloc memory of system
*
* @param[in] size: memory size
*
* @note This API is used to alloc memory of system.
*
* @return OPRT_OK on success. Others on error, please refer to tuya_error_code.h
*/

Func tuya_hal_system_free

VOID_T tuya_hal_system_free(VOID_T* ptr);
/**
* @brief Free memory of system
*
* @param[in] ptr: memory point
*
* @note This API is used to free memory of system.
*
* @return OPRT_OK on success. Others on error, please refer to tuya_error_code.h
*/

Func tuya_hal_system_calloc

VOID_T *tuya_hal_system_calloc(size_t nitems, size_t size);
/**
 * @brief tuya_hal_system_calloc 用于分配并清除干净内存
 * 
 * @param[in]       nitems      需要分配内存块的数量
 * @param[in]       size        需要分配块的内存大小
 */

Func tuya_hal_system_realloc

VOID_T *tuya_hal_system_realloc(VOID_T* ptr, size_t size);
/**
 * @brief tuya_hal_system_realloc 重新调整内存大小
 * 
 * @param[in]       nitems      源内存指针
 * @param[in]       size        调整后的大小
 */

Func tuya_os_memory_intf_init

VOID_T tuya_os_memory_intf_init(VOID_T);
/* add begin: by sunkz, interface regist */

Vars

Consts

Types

Typedefs