|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|
#include <stdio.h>#include "securec.h"#include "non_os.h"#include "panic.h"#include "debug_print.h"
结构体 | |
| struct | conn_mem_subpool_stru |
| struct | conn_mem_subpool_cfg_stru |
| struct | conn_mem_pool_cfg_stru |
| struct | conn_mem_stru_tag |
| struct | conn_mem_pool_stru |
宏定义 | |
| #define | CONN_DOG_TAG_SIZE 4 |
| #define | CONN_DOG_TAG 0xdeadbeaf |
| #define | conn_irq_disable non_os_enter_critical |
| #define | conn_irq_enable non_os_exit_critical |
| #define | CONN_IO_PRINT PRINT |
| #define | conn_likely(_expr) (_expr) |
| #define | conn_unlikely(_expr) (_expr) |
| #define | conn_bug_on(cond) |
| #define | CONN_MEM_INFO_SIZE 4 /* sizeof(ptr) */ |
| #define | WLAN_MEM_MAX_SUBPOOL_NUM 32 /* Maximum memory sub-pool size supported by each memory pool */ |
| #define | conn_get_4byte_align_value(_ul_size) (((_ul_size) + 0x03) & (~0x03)) |
| #define | conn_array_size(_ast_array) (sizeof(_ast_array) / sizeof((_ast_array)[0])) |
| #define | _PRE_MEM_DEBUG_MODE |
类型定义 | |
| typedef struct conn_mem_stru_tag | conn_mem_stru |
枚举 | |
| enum | conn_mem_state_enum { CONN_MEM_STATE_FREE = 0 , CONN_MEM_STATE_ALLOC , CONN_MEM_STATE_BUTT } |
| enum | conn_mem_pool_id_enum { CONN_MEM_POOL_ID_LOCAL = 0 , CONN_MEM_POOL_ID_BUTT } |
函数 | |
| int | conn_mem_init_pool (unsigned char *start, unsigned int size) |
| Prototype : conn_mem_init_pool Description : mem pool init function, only call once Input : void* start the pool start base address, start must aligned to 4 bytes unsigned int size pool total size, aligned to 4 bytes Return Value : 0 means succ, others failed | |
| void | conn_mem_print_pool_info (void) |
| void * | conn_mem_alloc_enhanced (unsigned long return_addr, unsigned int us_len) |
| Prototype : conn_mem_alloc_enhanced Description : mem alloc function, Input : unsigned long return_addr call function's address for debug unsigned int us_len request mem length Return Value : void* NULL means failed, others succ, alloc mem aligned to 4 bytes | |
| void | conn_mem_free_enhanced (const void *free_mem) |
| Prototype : conn_mem_free_enhanced Description : mem free function, can't free the mem repeat, Input : void* free_mem , free the alloc mem, if zero, do nothing Return Value : void | |
| void * | conn_mem_realloc_enhanced (unsigned long return_addr, const void *mem, unsigned int us_len) |
| Prototype : conn_mem_realloc_enhanced Description : mem realloc function Input : unsigned long return_addr call function's address for debug void* mem the old mem unsigned int us_len request mem length Return Value : void* NULL means failed, others succ, alloc mem aligned to 4 bytes | |
| #define _PRE_MEM_DEBUG_MODE |
| #define conn_array_size | ( | _ast_array | ) | (sizeof(_ast_array) / sizeof((_ast_array)[0])) |
| #define conn_bug_on | ( | cond | ) |
| #define CONN_DOG_TAG 0xdeadbeaf |
| #define CONN_DOG_TAG_SIZE 4 |
Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2022. All rights reserved.
Description: Mem Pool Driver Header.
History:
2018-10-15, Create file.
| #define conn_get_4byte_align_value | ( | _ul_size | ) | (((_ul_size) + 0x03) & (~0x03)) |
| #define CONN_IO_PRINT PRINT |
| #define conn_irq_disable non_os_enter_critical |
| #define conn_irq_enable non_os_exit_critical |
| #define conn_likely | ( | _expr | ) | (_expr) |
| #define CONN_MEM_INFO_SIZE 4 /* sizeof(ptr) */ |
| #define conn_unlikely | ( | _expr | ) | (_expr) |
| #define WLAN_MEM_MAX_SUBPOOL_NUM 32 /* Maximum memory sub-pool size supported by each memory pool */ |
| typedef struct conn_mem_stru_tag conn_mem_stru |
| enum conn_mem_state_enum |
| void * conn_mem_alloc_enhanced | ( | unsigned long | return_addr, |
| unsigned int | us_len | ||
| ) |
Prototype : conn_mem_alloc_enhanced Description : mem alloc function, Input : unsigned long return_addr call function's address for debug unsigned int us_len request mem length Return Value : void* NULL means failed, others succ, alloc mem aligned to 4 bytes
| void conn_mem_free_enhanced | ( | const void * | free_mem | ) |
Prototype : conn_mem_free_enhanced Description : mem free function, can't free the mem repeat, Input : void* free_mem , free the alloc mem, if zero, do nothing Return Value : void
| int conn_mem_init_pool | ( | unsigned char * | start, |
| unsigned int | size | ||
| ) |
Prototype : conn_mem_init_pool Description : mem pool init function, only call once Input : void* start the pool start base address, start must aligned to 4 bytes unsigned int size pool total size, aligned to 4 bytes Return Value : 0 means succ, others failed
| void conn_mem_print_pool_info | ( | void | ) |
| void * conn_mem_realloc_enhanced | ( | unsigned long | return_addr, |
| const void * | mem, | ||
| unsigned int | us_len | ||
| ) |
Prototype : conn_mem_realloc_enhanced Description : mem realloc function Input : unsigned long return_addr call function's address for debug void* mem the old mem unsigned int us_len request mem length Return Value : void* NULL means failed, others succ, alloc mem aligned to 4 bytes