|
InPlay API
|
HAL_GLOBAL. More...
Functions | |
| void | hal_global_pre_init (void) |
| Globally initialize system (such as clock...) before OS starting. More... | |
| void | hal_global_post_init (void) |
| Globally initialize system (such as debug, RTC...) after OS starting. More... | |
| void | hal_global_suspend (void) |
| Globally save system (such as system tick...) registers before deep sleep. More... | |
| void | hal_global_resume (void) |
| Globally resume system (such as system tick...) registers after wake up. More... | |
| void | hal_global_cpu_reset (void) |
| Reset the CPU (cold boot) More... | |
| void | hal_global_sys_reset (void) |
| Reset the system (cold boot) More... | |
| void | hal_global_close_sys_uart (void) |
| Close debug uart. More... | |
| int | hal_bod_enable (int bod_thrd_mv, void *arg, void(*callback)(void *arg)) |
| Enable BOD , set a bod_thrd_mv will return a closest value. Detail please see: <<IN602F0 reference manual.docx>> in chapter 17: Brown-out Detector the hardware accuracy about 25mv. More... | |
| void | hal_bod_disable (void) |
| Disable BOD. More... | |
| int | RTC_timer_start (void) |
| Start the RTC timer. More... | |
| void | RTC_timer_stop (void) |
| Stop the RTC timer. More... | |
| uint64_t | RTC_timer_get_tick (void) |
| Get the RTC timer ticks (64 bits) More... | |
| uint64_t | RTC_timer_get_time (void) |
| Get the RTC timer in micro second. More... | |
| uint64_t | RTC_timer_diff (uint64_t s_tick, uint64_t e_tick) |
| Calculate tick difference convert to time. More... | |
| uint32_t | RTC_timer_get_tick_low (void) |
| Get the RTC timer ticks low part. More... | |
| uint32_t | RTC_timer_diff_low (uint32_t s_tick, uint32_t e_tick) |
| Calculate tick difference convert to time. More... | |
| void | hal_ble_isr_register (void *arg, void(*callback)(void *)) |
| Register BLE interupt. More... | |
| void | hal_ble_isr_deregister (void) |
| Deregister BLE interupt. More... | |
| void | hal_glb_isr_register (int irq_id, int prio, void *arg, void(*callback)(void *)) |
| Globally manage shared interupts. More... | |
| void | hal_glb_isr_deregister (int irq_id) |
| Deregister global shared interupts. More... | |
| int | hal_swi_int_prio (int prio) |
| Set Software interrupt priority. There are max 4 SWI. More... | |
| int | hal_swi_register (void *arg, void(*callback)(void *)) |
| Register a Software interrupt index. There are max 4 SWI. More... | |
| void | hal_swi_deregister (int index) |
| Deregister a Software interrupt index. More... | |
| void | hal_swi_set (int index) |
| Trigger a Software interrupt. More... | |
| void | hal_osc_xo_isr_register (int irq_id, int prio, void *arg, void(*callback)(void *)) |
| Register Osc and XO shared interupts. More... | |
| void | hal_osc_xo_isr_deregister (int irq_id) |
| Deregister an Osc and XO shared interupt. More... | |
| void | hal_nmi_register (int irq_id, void *arg, void(*callback)(void *)) |
| Register a NMI interrupt. More... | |
| void | hal_nmi_deregister (int irq_id) |
| Deregister a NMI interrupt. More... | |
| void * | hal_sys_uart_hdl (void) |
| Enable/disable external PA. More... | |
| void RAM_PM | delay_us (uint32_t us) |
| Delay in tight loop. More... | |
HAL_GLOBAL.
| void RAM_PM delay_us | ( | uint32_t | us | ) |
Delay in tight loop.
| [in] | us | delay time in microsecond unit |
| void hal_ble_isr_deregister | ( | void | ) |
Deregister BLE interupt.
| void hal_ble_isr_register | ( | void * | arg, |
| void(*)(void *) | callback | ||
| ) |
Register BLE interupt.
| [in] | arg | Call back argument from user |
| [in] | callback | ISR call back |
| void hal_bod_disable | ( | void | ) |
Disable BOD.
| [in] | bod_id | BOD id select, |
| int hal_bod_enable | ( | int | bod_thrd_mv, |
| void * | arg, | ||
| void(*)(void *arg) | callback | ||
| ) |
Enable BOD , set a bod_thrd_mv will return a closest value. Detail please see: <<IN602F0 reference manual.docx>> in chapter 17: Brown-out Detector the hardware accuracy about 25mv.
| [in] | bod_thrd_mv | BOD threshold, rang: 1600 to 1800 unit:mv |
| [in] | arg | Pointer to the user's provided parameter for the BOD ISR call back |
| [in] | callback | BOD ISR call back: if the Vbat smaller than the bod_thrd_mv arg: The provided pointer, |
| void hal_glb_isr_deregister | ( | int | irq_id | ) |
Deregister global shared interupts.
| [in] | irq_id | The ID of interrupt source, |
| void hal_glb_isr_register | ( | int | irq_id, |
| int | prio, | ||
| void * | arg, | ||
| void(*)(void *) | callback | ||
| ) |
Globally manage shared interupts.
| [in] | irq_id | The ID of interrupt source, |
| [in] | prio | Interrupt priority, |
| [in] | arg | Call back argument from user |
| [in] | callback | ISR call back |
| void hal_global_close_sys_uart | ( | void | ) |
Close debug uart.
| void hal_global_cpu_reset | ( | void | ) |
Reset the CPU (cold boot)
| void hal_global_post_init | ( | void | ) |
Globally initialize system (such as debug, RTC...) after OS starting.
| void hal_global_pre_init | ( | void | ) |
Globally initialize system (such as clock...) before OS starting.
| void hal_global_resume | ( | void | ) |
Globally resume system (such as system tick...) registers after wake up.
| void hal_global_suspend | ( | void | ) |
Globally save system (such as system tick...) registers before deep sleep.
| void hal_global_sys_reset | ( | void | ) |
Reset the system (cold boot)
| void hal_nmi_deregister | ( | int | irq_id | ) |
Deregister a NMI interrupt.
| [in] | irq_id | The ID of interrupt source, |
| void hal_nmi_register | ( | int | irq_id, |
| void * | arg, | ||
| void(*)(void *) | callback | ||
| ) |
Register a NMI interrupt.
| [in] | irq_id | The ID of interrupt source, |
| [in] | arg | Call back argument from user |
| [in] | callback | ISR call back |
| void hal_osc_xo_isr_deregister | ( | int | irq_id | ) |
Deregister an Osc and XO shared interupt.
| [in] | irq_id | The ID of interrupt source, |
| void hal_osc_xo_isr_register | ( | int | irq_id, |
| int | prio, | ||
| void * | arg, | ||
| void(*)(void *) | callback | ||
| ) |
Register Osc and XO shared interupts.
| [in] | irq_id | The ID of interrupt source, |
| [in] | prio | Interrupt priority, |
| [in] | arg | Call back argument from user |
| [in] | callback | ISR call back |
| void hal_swi_deregister | ( | int | index | ) |
Deregister a Software interrupt index.
| [in] | index | Index from SWI register API calls |
| int hal_swi_int_prio | ( | int | prio | ) |
Set Software interrupt priority. There are max 4 SWI.
| [in] | prio | Interrupt priority, |
| int hal_swi_register | ( | void * | arg, |
| void(*)(void *) | callback | ||
| ) |
Register a Software interrupt index. There are max 4 SWI.
| [in] | arg | Call back argument from user |
| [in] | callback | SWI ISR call back |
| void hal_swi_set | ( | int | index | ) |
Trigger a Software interrupt.
| [in] | index | Index from SWI register API calls |
| void* hal_sys_uart_hdl | ( | void | ) |
Enable/disable external PA.
| [in] | bias_port | PA bias pin port |
| [in] | bias_pin | PA bias pin pin |
| [in] | en_port | PA EN pin port. When use one pin mode, set en_port same as bias_port |
| [in] | en_pin | PA EN pin pin. When use one pin mode, set en_pin same as biad_pin |
| uint64_t RTC_timer_diff | ( | uint64_t | s_tick, |
| uint64_t | e_tick | ||
| ) |
Calculate tick difference convert to time.
| [in] | s_tick | Start ticks |
| [in] | e_tick | End ticks |
| uint32_t RTC_timer_diff_low | ( | uint32_t | s_tick, |
| uint32_t | e_tick | ||
| ) |
Calculate tick difference convert to time.
| [in] | s_tick | Start ticks |
| [in] | e_tick | End ticks |
| uint64_t RTC_timer_get_tick | ( | void | ) |
Get the RTC timer ticks (64 bits)
| uint32_t RTC_timer_get_tick_low | ( | void | ) |
Get the RTC timer ticks low part.
| uint64_t RTC_timer_get_time | ( | void | ) |
Get the RTC timer in micro second.
| int RTC_timer_start | ( | void | ) |
Start the RTC timer.
| void RTC_timer_stop | ( | void | ) |
Stop the RTC timer.