Functions | |
void * | sys_malloc (uint32_t size) |
Malloc size memery. More... | |
void | sys_free (void *mem_ptr) |
free memery. More... | |
void | sys_app_printf (const char *format,...) |
Output debug logs. More... | |
void | delay_us (uint32_t us) |
Delay the function execution. More... | |
void | delay_ms (uint32_t ms) |
Delay the function execution. More... | |
void | sys_signal_handler_register (callback_t isr_handler) |
Register signal handler. More... | |
void | sys_sdk_verison_get (sdk_version_t *p_version) |
Get SDK version. More... | |
void | sys_context_save (void) |
Save system context. More... | |
void | restore_sys_context (void) |
Load system context. More... | |
void | sys_security_data_use_present (uint32_t addr, uint8_t *input, uint32_t size, uint8_t *output) |
Encrypt and decrypt data using Present. More... | |
uint16_t | sys_rf_trim_get (rf_trim_info_t *p_rf_trim) |
Get the RF trim information. More... | |
uint16_t | sys_adc_trim_get (adc_trim_info_t *p_adc_trim) |
Get the ADC trim information. More... | |
uint16_t | sys_pmu_trim_get (pmu_trim_info_t *p_pmu_trim) |
Get the PMU trim information. More... | |
uint16_t | sys_crystal_trim_get (uint16_t *p_crystal_trim) |
Get the crystal trim information. More... | |
uint16_t | sys_trim_sum_get (uint16_t *p_trim_sum) |
Get the trim checksum. More... | |
uint16_t | sys_device_addr_get (uint8_t *p_device_addr) |
Get the device address information. More... | |
uint16_t | sys_hw_version_get (hw_version_type_t *p_hw_version) |
Get the HW version information. More... | |
uint16_t | sys_device_uid_get (uint8_t *p_device_uid) |
Get the device UID information. More... | |
uint16_t | sys_device_lp_gain_offset_2m_get (uint8_t *p_offset) |
Get the LP gain offset 2M information. More... | |
uint16_t | sys_device_sram_get (sram_size_t *p_sram_size) |
Get the RAM size information. More... | |
uint16_t | sys_device_package_get (package_type_t *p_package_type) |
Get the chip's package type. More... | |
void | sys_lpclk_set (uint32_t user_lpclk) |
Set low power CLK frequency. More... | |
uint32_t | sys_us_2_lpcycles (uint32_t us) |
Convert a duration in μs into a duration in lp cycles. More... | |
uint32_t | sys_lpcycles_2_hus (uint32_t lpcycles, uint32_t *error_corr) |
Convert a duration in lp cycles into a duration in half μs. More... | |
uint16_t | sys_ble_heartbeat_period_set (uint32_t period_hus) |
Set BLE Sleep HeartBeat Period. More... | |
uint16_t | sys_ble_heartbeat_period_get (uint32_t *p_period_hus) |
Get BLE Sleep HeartBeat Period. More... | |
void | sys_max_msg_usage_ratio_set (uint8_t usage_ratio) |
Set system maximum usage ratio of message heap. More... | |
void | sys_lld_max_msg_usage_ratio_set (uint8_t usage_ratio) |
Set system lld layer maximum usage ratio of message heap. More... | |
uint8_t | sys_msg_usage_ratio_get (void) |
Get system message heap usage ratio. More... | |
uint8_t | sys_env_usage_ratio_get (void) |
Get system environment heap usage ratio. More... | |
uint8_t | sys_attdb_usage_ratio_get (void) |
Get system attriute database heap usage ratio. More... | |
uint8_t | sys_nonret_usage_ratio_get (void) |
Get system non retention heap usage ratio. More... | |
uint32_t | sys_lpclk_get (void) |
Get low power CLK frequency. More... | |
uint32_t | sys_lpper_get (void) |
Get low power CLK period. More... | |
void | sys_assert_cb_register (sys_assert_cb_t *p_assert_cb) |
Register assert callbacks. More... | |
bool | sys_ke_sleep_check (void) |
Get status of ke_event list. More... | |
void | sys_swd_enable (void) |
Enable swd function. More... | |
void | sys_swd_disable (void) |
Diable swd function. More... | |
void | set_io_ldo_use_3p3_v (bool flag) |
Set g_io_ldo_use_3p3_v function. More... | |
void | ble_stack_em_base_init (uint32_t address) |
Set ble exchange memory base address. More... | |
void | ble_em_addr_offset_set (uint16_t offset) |
Set ble exchange memory buffer address common offset. More... | |
uint8_t | sys_sdk_ultra_conn_update (uint8_t conn_idx, uint16_t interval, uint16_t latency, uint16_t superv_to) |
Register the callback function of the extended llcp process. More... | |
void | sys_firmware_jump (uint32_t fw_addr, uint32_t fw_bin_size) |
jump to app firmware. More... | |
void ble_em_addr_offset_set | ( | uint16_t | offset | ) |
Set ble exchange memory buffer address common offset.
[in] | offset | Offset of ble exchange memory buffer. |
void ble_stack_em_base_init | ( | uint32_t | address | ) |
Set ble exchange memory base address.
[in] | address | base address of ble exchange memory buffer. |
void delay_ms | ( | uint32_t | ms | ) |
Delay the function execution.
[in] | ms | Millisecond. |
void delay_us | ( | uint32_t | us | ) |
Delay the function execution.
[in] | us | Microsecond. |
void restore_sys_context | ( | void | ) |
Load system context.
void set_io_ldo_use_3p3_v | ( | bool | flag | ) |
Set g_io_ldo_use_3p3_v function.
uint16_t sys_adc_trim_get | ( | adc_trim_info_t * | p_adc_trim | ) |
Get the ADC trim information.
[out] | p_adc_trim | The pointer to struct of adc_trim_info_t. |
void sys_app_printf | ( | const char * | format, |
... | |||
) |
Output debug logs.
[in] | format | Pointer to the log information. |
void sys_assert_cb_register | ( | sys_assert_cb_t * | p_assert_cb | ) |
Register assert callbacks.
[in] | p_assert_cb | Pointer to assert callbacks. |
uint8_t sys_attdb_usage_ratio_get | ( | void | ) |
Get system attriute database heap usage ratio.
The function will used to get attriute database ratio of attriute database heap. This ratio is heap used percent in full attriute database size.
uint16_t sys_ble_heartbeat_period_get | ( | uint32_t * | p_period_hus | ) |
Get BLE Sleep HeartBeat Period.
[in] | p_period_hus | Pointer to the wake up duration. Range 0x00000000-0xFFFFFFFF (in unit of μs). |
uint16_t sys_ble_heartbeat_period_set | ( | uint32_t | period_hus | ) |
Set BLE Sleep HeartBeat Period.
[in] | period_hus | The wake up duration of BLE when BLE is IDEL. Range 0x00000000-0xFFFFFFFF (in unit of μs). |
void sys_context_save | ( | void | ) |
Save system context.
uint16_t sys_crystal_trim_get | ( | uint16_t * | p_crystal_trim | ) |
Get the crystal trim information.
[out] | p_crystal_trim | offset information for crystal. |
uint16_t sys_device_addr_get | ( | uint8_t * | p_device_addr | ) |
Get the device address information.
[out] | p_device_addr | Bluetooth address by default. |
uint16_t sys_device_lp_gain_offset_2m_get | ( | uint8_t * | p_offset | ) |
Get the LP gain offset 2M information.
[out] | p_offset | the offset of LP gain. |
uint16_t sys_device_package_get | ( | package_type_t * | p_package_type | ) |
Get the chip's package type.
[out] | p_package_type | The pointer to enumeration of package_type_t. |
uint16_t sys_device_sram_get | ( | sram_size_t * | p_sram_size | ) |
Get the RAM size information.
[out] | p_sram_size | The pointer to enumeration of sram_size_t. |
uint16_t sys_device_uid_get | ( | uint8_t * | p_device_uid | ) |
Get the device UID information.
[out] | p_device_uid | Device chip UID. |
uint8_t sys_env_usage_ratio_get | ( | void | ) |
Get system environment heap usage ratio.
The function will used to get environment ratio of environment heap. This ratio is heap used percent in full environment size.
void sys_firmware_jump | ( | uint32_t | fw_addr, |
uint32_t | fw_bin_size | ||
) |
jump to app firmware.
[in] | fw_addr | Firmware run address |
[in] | fw_bin_size | Firmware bin size |
void sys_free | ( | void * | mem_ptr | ) |
free memery.
[in] | mem_ptr | memery to be free. |
uint16_t sys_hw_version_get | ( | hw_version_type_t * | p_hw_version | ) |
Get the HW version information.
[out] | p_hw_version | The pointer to the buffer for hw version. |
bool sys_ke_sleep_check | ( | void | ) |
Get status of ke_event list.
void sys_lld_max_msg_usage_ratio_set | ( | uint8_t | usage_ratio | ) |
Set system lld layer maximum usage ratio of message heap.
The function will used to set message ratio of message heap. Valid ratio range is 50 - 100 percent in full message size.
[in] | usage_ratio | Usage ratio of message heap size. |
uint32_t sys_lpclk_get | ( | void | ) |
Get low power CLK frequency.
This function is used to get the low power clock frequency.
void sys_lpclk_set | ( | uint32_t | user_lpclk | ) |
Set low power CLK frequency.
[in] | user_lpclk | CLK frequency. |
uint32_t sys_lpcycles_2_hus | ( | uint32_t | lpcycles, |
uint32_t * | error_corr | ||
) |
Convert a duration in lp cycles into a duration in half μs.
The function converts a duration in lp cycles into a duration in half μs, according to the low power clock frequency (32768Hz or 32000Hz).
[in] | lpcycles | Duration in lp cycles. |
[in,out] | error_corr | Insert and retrieve error created by truncating the LP Cycle Time to a half μs (in half μs). |
uint32_t sys_lpper_get | ( | void | ) |
Get low power CLK period.
This function is used to get the low power CLK period.
void* sys_malloc | ( | uint32_t | size | ) |
Malloc size memery.
[in] | size | memery size. |
void sys_max_msg_usage_ratio_set | ( | uint8_t | usage_ratio | ) |
Set system maximum usage ratio of message heap.
The function will used to set message ratio of message heap. Valid ratio range is 50 - 100 percent in full message size.
[in] | usage_ratio | Usage ratio of message heap size. |
uint8_t sys_msg_usage_ratio_get | ( | void | ) |
Get system message heap usage ratio.
The function will used to get message ratio of message heap. This ratio is heap used percent in full message size.
uint8_t sys_nonret_usage_ratio_get | ( | void | ) |
Get system non retention heap usage ratio.
The function will used to get non retention ratio of non retention heap. This ratio is heap used percent in full non retention size.
uint16_t sys_pmu_trim_get | ( | pmu_trim_info_t * | p_pmu_trim | ) |
Get the PMU trim information.
[out] | p_pmu_trim | The pointer to struct of pmu_trim_info_t. |
uint16_t sys_rf_trim_get | ( | rf_trim_info_t * | p_rf_trim | ) |
Get the RF trim information.
[out] | p_rf_trim | The pointer to struct of rf_trim_info_t. |
uint8_t sys_sdk_ultra_conn_update | ( | uint8_t | conn_idx, |
uint16_t | interval, | ||
uint16_t | latency, | ||
uint16_t | superv_to | ||
) |
Register the callback function of the extended llcp process.
[in] | conn_idx | Connect index. |
[in] | interval | Connect interval (unit: 312.5 us) |
[in] | latency | Connect latency (unit of connection event) |
[in] | superv_to | Link supervision timeout (unit of 10 ms) |
void sys_sdk_verison_get | ( | sdk_version_t * | p_version | ) |
Get SDK version.
[out] | p_version | The pointer to struct of sdk_version_t. |
void sys_security_data_use_present | ( | uint32_t | addr, |
uint8_t * | input, | ||
uint32_t | size, | ||
uint8_t * | output | ||
) |
Encrypt and decrypt data using Present.
[in] | addr | Operation address (Flash address minus Flash start address). |
[in] | input | Data before encryption and decryption. |
[in] | size | Data size. |
[out] | output | Data after encryption and decryption. |
void sys_signal_handler_register | ( | callback_t | isr_handler | ) |
Register signal handler.
void sys_swd_disable | ( | void | ) |
Diable swd function.
void sys_swd_enable | ( | void | ) |
Enable swd function.
uint16_t sys_trim_sum_get | ( | uint16_t * | p_trim_sum | ) |
Get the trim checksum.
[out] | p_trim_sum | The pointer to the buffer for trim checksum. |
uint32_t sys_us_2_lpcycles | ( | uint32_t | us | ) |
Convert a duration in μs into a duration in lp cycles.
The function converts a duration in μs into a duration in lp cycles, according to the low power clock frequency (32768Hz or 32000Hz).
[in] | us | Duration in μs. |