InPlay API
|
HAL_COUNTER. More...
Enumerations | |
enum | cnt_int_pin |
Counter internal pin. | |
Functions | |
cnt_dev_t * | hal_cnt_open (int id, cnt_init_t *init) |
Open counter device. More... | |
void | hal_cnt_close (cnt_dev_t *dev) |
Close counter device. More... | |
int | hal_cnt_sync (cnt_dev_t *dev, uint32_t mask) |
Synchronize status registers manually. Will block until register finish update. More... | |
int | hal_cnt_intr_mask (cnt_dev_t *dev) |
Set interrupt mask. More... | |
int | hal_cnt_intr_unmask (cnt_dev_t *dev) |
Set interrupt unmask. More... | |
int | hal_cnt_pin_mux_en (int port, int pin, int en) |
Set pin mux. More... | |
int | hal_cnt_internal_din_pinmux (int inner_pin, int ext_port, int ext_pin) |
Set din pin mux. More... | |
int | hal_cnt_internal_dout_pinmux (int inner_pin, int ext_port, int ext_pin) |
Set dout pin mux. More... | |
int | hal_cnt_enable (cnt_dev_t *dev) |
Enable counter. More... | |
int | hal_cnt_disable (cnt_dev_t *dev) |
Disable counter. More... | |
uint32_t | hal_cnt_get_clk (cnt_dev_t *dev) |
Get counter clock frequency. More... | |
int | hal_cnt_pin_chk (int port, int pin) |
Check counter pinmux. More... | |
void | hal_cnt_set_handler (cnt_dev_t *dev, CNT_ISR_FUN fun, void *arg) |
Set ISR handler. More... | |
HAL_COUNTER.
void hal_cnt_close | ( | cnt_dev_t * | dev | ) |
Close counter device.
[in] | dev | Counter device struct |
int hal_cnt_disable | ( | cnt_dev_t * | dev | ) |
Disable counter.
[in] | dev | Counter device struct |
int hal_cnt_enable | ( | cnt_dev_t * | dev | ) |
Enable counter.
[in] | dev | Counter device struct |
uint32_t hal_cnt_get_clk | ( | cnt_dev_t * | dev | ) |
Get counter clock frequency.
[in] | dev | Counter device struct |
int hal_cnt_internal_din_pinmux | ( | int | inner_pin, |
int | ext_port, | ||
int | ext_pin | ||
) |
Set din pin mux.
[in] | inner_pin | internal pin id |
[in] | ext_port | external port |
[in] | ext_pin | external pin |
int hal_cnt_internal_dout_pinmux | ( | int | inner_pin, |
int | ext_port, | ||
int | ext_pin | ||
) |
Set dout pin mux.
[in] | inner_pin | internal pin id |
[in] | ext_port | external port |
[in] | ext_pin | external pin |
int hal_cnt_intr_mask | ( | cnt_dev_t * | dev | ) |
Set interrupt mask.
[in] | dev | Counter device struct |
int hal_cnt_intr_unmask | ( | cnt_dev_t * | dev | ) |
Set interrupt unmask.
[in] | dev | Counter device struct |
cnt_dev_t* hal_cnt_open | ( | int | id, |
cnt_init_t * | init | ||
) |
Open counter device.
[in] | id | Counter ID |
[in] | init | init paramter, |
int hal_cnt_pin_chk | ( | int | port, |
int | pin | ||
) |
Check counter pinmux.
[in] | port | port |
[in] | pin | pin |
int hal_cnt_pin_mux_en | ( | int | port, |
int | pin, | ||
int | en | ||
) |
Set pin mux.
[in] | port | port |
[in] | pin | pin |
[in] | en | enable or disable pin |
void hal_cnt_set_handler | ( | cnt_dev_t * | dev, |
CNT_ISR_FUN | fun, | ||
void * | arg | ||
) |
Set ISR handler.
[in] | dev | Counter device struct. |
[in] | fun | Callback function. |
[in] | arg | Callback fucntion arguments. |
int hal_cnt_sync | ( | cnt_dev_t * | dev, |
uint32_t | mask | ||
) |
Synchronize status registers manually. Will block until register finish update.
[in] | dev | Counter device struct |
[in] | mask | Register mask |