WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
UTILS

宏定义

#define THREAD_MODE_PRIORITY   4
 
#define __return_address()   ((uintptr_t)0)
 
#define NON_OS_NMI_CWDT_INT_FLAG   BIT(NMI_CWDT)
 
#define NON_OS_NMI_XIP_CTRL_INT_FLAG   BIT(NMI_XIP_CTRL)
 
#define NON_OS_NMI_XIP_CACHE_INT_FLAG   BIT(NMI_XIP_CACHE)
 
#define NON_OS_NMI_MDMA_INT_FLAG   BIT(NMI_MDMA)
 
#define NON_OS_NMI_SMDMAINT_FLAG   BIT(NMI_SMDMA)
 
#define NON_OS_BT_NMI_MASK_REG   0x59000300
 
#define NON_OS_BT_NMI_STATUS_REG   0x59000304
 
#define NON_OS_BNMI_BT_INT_FLAG   BIT(BNMI_BT_INT)
 
#define NON_OS_BNMI_BLE_INT_FLAG   BIT(BNMI_BLE_INT)
 
#define NON_OS_BNMI_BWDT_INT_FLAG   BIT(BNMI_BWDT)
 

类型定义

typedef enum AON_INIT_BIT_E aon_init_bit_e
 
typedef void(* critical_statistic_handler) (critical_statistic_mode_e mode, uint32_t address)
 hook function type for crititcal interval statisitic tool
 
typedef void(* critical_record_handler) (critical_statistic_mode_e mode, uint32_t address, uint16_t nestings)
 hook function type for crititcal interval record tool
 

枚举

enum  driver_init_bit_e {
  DRIVER_INIT_WATCHDOG = 0 , DRIVER_INIT_RTC , DRIVER_INIT_TIMER , DRIVER_INIT_GPIO ,
  DRIVER_INIT_IPC , DRIVER_INIT_SYS_STATUS , DRIVER_INIT_IPC_FLASH , DRIVER_INIT_UART ,
  DRIVER_INIT_REBOOT , DRIVER_INIT_LPC , DRIVER_INIT_SPI , DRIVER_INIT_QSPI ,
  DRIVER_INIT_PWM , DRIVER_INIT_DMA , DRIVER_INIT_TSENSOR , DRIVER_INIT_ADC ,
  DRIVER_INIT_IFLASH , DRIVER_INIT_IFLASH_CONFIG , DRIVER_INIT_FLASH , DRIVER_INIT_MEMORY ,
  DRIVER_INIT_OTP , DRIVER_INIT_IPC_FLASH_BT , DRIVER_INIT_PMU , DRIVER_INIT_LOG_MEMORY ,
  DRIVER_INIT_KV , DRIVER_INIT_TCXO , DRIVER_INIT_PLL , DRIVER_INIT_SEC_TRNG ,
  DRIVER_INIT_PATCH , DRIVER_INTI_AP_COMMU , DRIVER_INIT_I2C , DRIVER_INIT_CAP_SENSOR ,
  DRIVER_INIT_PSRAM , DRIVER_INIT_MX25U32 , DRIVER_INIT_SEC_KEY_DRIV , DRIVER_INIT_SEC_TRNG1 ,
  DRIVER_INIT_SEC_SHA , DRIVER_INIT_SEC_AES , DRIVER_INIT_SEC_RSA , DRIVER_INIT_SEC_TRNG2 ,
  DRIVER_INIT_CLOCKS_CORE , DRIVER_INIT_FLASH_TO_QSPI , DRIVER_INIT_RGB888 , DRIVER_INIT_UICC ,
  DRIVER_INIT_MAX_VALUE
}
 
enum  AON_INIT_BIT_E {
  AON_FLASH_QSPI = 0 , AON_XIP = 1 , AON_DEBUG_MODE = 2 , AON_ROMLOADER_DOWNLOAD_KEY_MODE = 3 ,
  AON_FLASH_BACKUP_MODE = 4
}
 
enum  critical_statistic_mode_e { CRITICAL_ENTER = 0 , CRITICAL_EXIT = 1 }
 flag mark the mode if enter or exit critical when call critical statistic hook function 更多...
 
enum  nmi_types_e {
  NMI_GWDT = 0 , NMI_CWDT = 1 , NMI_BWDT = 2 , NMI_XIP_CTRL = 2 ,
  NMI_XIP_CACHE = 3 , NMI_MDMA = 4 , NMI_SMDMA = 5 , NMI_NONE = 6
}
 
enum  bnmi_types_e { BNMI_BT_INT = 0 , BNMI_BLE_INT = 1 , BNMI_BWDT = 2 }
 

函数

 cassert (DRIVER_INIT_MAX_VALUE<=64, NON_OS_H_)
 
void non_os_enter_critical (void)
 Enter in a critical section.
 
void non_os_exit_critical (void)
 Exit a critical section.
 
bool non_os_is_in_critical_section (void)
 Checks if the system is running on a critical section.
 
void non_os_critical_section_init (void)
 Ensures interrupts are enabled and the interrupt nested counter is reset.
 
bool non_os_is_driver_initialised (driver_init_bit_e driver)
 Gets the value of the drivers flag bit, then converts into a bool
 
void non_os_set_driver_initalised (driver_init_bit_e driver, bool value)
 Sets the value of the specified bit
 
bool non_os_is_aon_flag_initialised (aon_init_bit_e driver)
 check aon flag is set flag save on aon only rst when all rst(not only cpu reset)
 
void non_os_set_aon_flag_initalised (aon_init_bit_e driver, bool value)
 set aon flag flag save on aon only rst when all rst(not only cpu reset)
 
void non_os_register_critical_statistic (critical_statistic_handler handler)
 register critical statistic hook function
 
void non_os_unregister_critical_statistic (void)
 unregister critical statistic hook function
 
void non_os_register_critical_record (critical_record_handler handler)
 register critical record hook function
 
void non_os_unregister_critical_record (void)
 unregister critical record hook function
 
void non_os_nmi_config (nmi_types_e nmi, bool on)
 Config the nmi.
 
uint16_t non_os_get_nmi_mask_status (void)
 Get NMI interrupt status after mask.
 
uint16_t non_os_get_nmi_raw_status (void)
 get NMI raw interrupt status.
 
nmi_types_e non_os_get_nmi_type (void)
 get NMI mask interrupt type.
 
const char * non_os_get_bt_rom_version (void)
 get bt rom version.
 
bool non_os_is_dcache_enabled (void)
 Checks if the DCache is enabled.
 

详细描述

宏定义说明

◆ __return_address

#define __return_address ( )    ((uintptr_t)0)

◆ NON_OS_BNMI_BLE_INT_FLAG

#define NON_OS_BNMI_BLE_INT_FLAG   BIT(BNMI_BLE_INT)

◆ NON_OS_BNMI_BT_INT_FLAG

#define NON_OS_BNMI_BT_INT_FLAG   BIT(BNMI_BT_INT)

◆ NON_OS_BNMI_BWDT_INT_FLAG

#define NON_OS_BNMI_BWDT_INT_FLAG   BIT(BNMI_BWDT)

◆ NON_OS_BT_NMI_MASK_REG

#define NON_OS_BT_NMI_MASK_REG   0x59000300

◆ NON_OS_BT_NMI_STATUS_REG

#define NON_OS_BT_NMI_STATUS_REG   0x59000304

◆ NON_OS_NMI_CWDT_INT_FLAG

#define NON_OS_NMI_CWDT_INT_FLAG   BIT(NMI_CWDT)

◆ NON_OS_NMI_MDMA_INT_FLAG

#define NON_OS_NMI_MDMA_INT_FLAG   BIT(NMI_MDMA)

◆ NON_OS_NMI_SMDMAINT_FLAG

#define NON_OS_NMI_SMDMAINT_FLAG   BIT(NMI_SMDMA)

◆ NON_OS_NMI_XIP_CACHE_INT_FLAG

#define NON_OS_NMI_XIP_CACHE_INT_FLAG   BIT(NMI_XIP_CACHE)

◆ NON_OS_NMI_XIP_CTRL_INT_FLAG

#define NON_OS_NMI_XIP_CTRL_INT_FLAG   BIT(NMI_XIP_CTRL)

◆ THREAD_MODE_PRIORITY

#define THREAD_MODE_PRIORITY   4

类型定义说明

◆ aon_init_bit_e

flag save on aon only rst when all rst(not only cpu reset)

◆ critical_record_handler

typedef void(* critical_record_handler) (critical_statistic_mode_e mode, uint32_t address, uint16_t nestings)

hook function type for crititcal interval record tool

参数
modeMark the mode if enter or exit critical
addressRecord LR address for locating which function entered critical
nestingsthe nesting number of enter critical.

◆ critical_statistic_handler

typedef void(* critical_statistic_handler) (critical_statistic_mode_e mode, uint32_t address)

hook function type for crititcal interval statisitic tool

参数
modeMark the mode if enter or exit critical
addressRecord LR address for locating which function entered critical

枚举类型说明

◆ AON_INIT_BIT_E

flag save on aon only rst when all rst(not only cpu reset)

枚举值
AON_FLASH_QSPI 
AON_XIP 
AON_DEBUG_MODE 
AON_ROMLOADER_DOWNLOAD_KEY_MODE 
AON_FLASH_BACKUP_MODE 

◆ bnmi_types_e

枚举值
BNMI_BT_INT 
BNMI_BLE_INT 
BNMI_BWDT 

◆ critical_statistic_mode_e

flag mark the mode if enter or exit critical when call critical statistic hook function

枚举值
CRITICAL_ENTER 
CRITICAL_EXIT 

◆ driver_init_bit_e

枚举值
DRIVER_INIT_WATCHDOG 
DRIVER_INIT_RTC 
DRIVER_INIT_TIMER 
DRIVER_INIT_GPIO 
DRIVER_INIT_IPC 
DRIVER_INIT_SYS_STATUS 
DRIVER_INIT_IPC_FLASH 
DRIVER_INIT_UART 
DRIVER_INIT_REBOOT 
DRIVER_INIT_LPC 
DRIVER_INIT_SPI 
DRIVER_INIT_QSPI 
DRIVER_INIT_PWM 
DRIVER_INIT_DMA 
DRIVER_INIT_TSENSOR 
DRIVER_INIT_ADC 
DRIVER_INIT_IFLASH 
DRIVER_INIT_IFLASH_CONFIG 
DRIVER_INIT_FLASH 
DRIVER_INIT_MEMORY 
DRIVER_INIT_OTP 
DRIVER_INIT_IPC_FLASH_BT 
DRIVER_INIT_PMU 
DRIVER_INIT_LOG_MEMORY 
DRIVER_INIT_KV 
DRIVER_INIT_TCXO 
DRIVER_INIT_PLL 
DRIVER_INIT_SEC_TRNG 
DRIVER_INIT_PATCH 
DRIVER_INTI_AP_COMMU 
DRIVER_INIT_I2C 
DRIVER_INIT_CAP_SENSOR 
DRIVER_INIT_PSRAM 
DRIVER_INIT_MX25U32 
DRIVER_INIT_SEC_KEY_DRIV 
DRIVER_INIT_SEC_TRNG1 
DRIVER_INIT_SEC_SHA 
DRIVER_INIT_SEC_AES 
DRIVER_INIT_SEC_RSA 
DRIVER_INIT_SEC_TRNG2 
DRIVER_INIT_CLOCKS_CORE 
DRIVER_INIT_FLASH_TO_QSPI 
DRIVER_INIT_RGB888 
DRIVER_INIT_UICC 
DRIVER_INIT_MAX_VALUE 

◆ nmi_types_e

枚举值
NMI_GWDT 
NMI_CWDT 
NMI_BWDT 
NMI_XIP_CTRL 
NMI_XIP_CACHE 
NMI_MDMA 
NMI_SMDMA 
NMI_NONE 

函数说明

◆ cassert()

cassert ( DRIVER_INIT_MAX_VALUE<=  64,
NON_OS_H_   
)

◆ non_os_critical_section_init()

void non_os_critical_section_init ( void  )

Ensures interrupts are enabled and the interrupt nested counter is reset.

◆ non_os_enter_critical()

void non_os_enter_critical ( void  )

Enter in a critical section.

◆ non_os_exit_critical()

void non_os_exit_critical ( void  )

Exit a critical section.

◆ non_os_get_bt_rom_version()

const char * non_os_get_bt_rom_version ( void  )

get bt rom version.

◆ non_os_get_nmi_mask_status()

uint16_t non_os_get_nmi_mask_status ( void  )

Get NMI interrupt status after mask.

◆ non_os_get_nmi_raw_status()

uint16_t non_os_get_nmi_raw_status ( void  )

get NMI raw interrupt status.

◆ non_os_get_nmi_type()

nmi_types_e non_os_get_nmi_type ( void  )

get NMI mask interrupt type.

◆ non_os_is_aon_flag_initialised()

bool non_os_is_aon_flag_initialised ( aon_init_bit_e  driver)

check aon flag is set flag save on aon only rst when all rst(not only cpu reset)

返回
true set already false not set

check aon flag is set flag save on aon only rst when all rst(not only cpu reset)

返回
true set already false not set

◆ non_os_is_dcache_enabled()

bool non_os_is_dcache_enabled ( void  )

Checks if the DCache is enabled.

返回
true if the DCache is enabled.

◆ non_os_is_driver_initialised()

bool non_os_is_driver_initialised ( driver_init_bit_e  driver)

Gets the value of the drivers flag bit, then converts into a bool

参数
driverThe driver that you wish to check is initialised
返回
True if it has

◆ non_os_is_in_critical_section()

bool non_os_is_in_critical_section ( void  )

Checks if the system is running on a critical section.

返回
true if the system is running in a critical section.

◆ non_os_nmi_config()

void non_os_nmi_config ( nmi_types_e  nmi,
bool  on 
)

Config the nmi.

参数
nmiTypes of the nmi.
onTrue for on, false for off.

◆ non_os_register_critical_record()

void non_os_register_critical_record ( critical_record_handler  handler)

register critical record hook function

参数
handlerFunction pointer of critical record

◆ non_os_register_critical_statistic()

void non_os_register_critical_statistic ( critical_statistic_handler  handler)

register critical statistic hook function

参数
handlerFunction pointer of critical statistic

◆ non_os_set_aon_flag_initalised()

void non_os_set_aon_flag_initalised ( aon_init_bit_e  driver,
bool  value 
)

set aon flag flag save on aon only rst when all rst(not only cpu reset)

返回
NULL

set aon flag flag save on aon only rst when all rst(not only cpu reset)

返回
NULL

◆ non_os_set_driver_initalised()

void non_os_set_driver_initalised ( driver_init_bit_e  driver,
bool  value 
)

Sets the value of the specified bit

参数
driverThe driver whose bit you wish to set
valueThe value to set the bit to

◆ non_os_unregister_critical_record()

void non_os_unregister_critical_record ( void  )

unregister critical record hook function

◆ non_os_unregister_critical_statistic()

void non_os_unregister_critical_statistic ( void  )

unregister critical statistic hook function