InPlay API
Counter PWM driver

HAL_CNT_PWM. More...

Functions

void * hal_cnt_pwm_open (int id, int port, int pin, int prio)
 Open counter PWM. More...
 
void hal_cnt_pwm_close (void *hdl)
 Close counter PWM. More...
 
int hal_cnt_pwm_enable (void *hdl, uint32_t period_usec, uint32_t high_usec)
 Enable PWM. More...
 
int hal_cnt_pwm_disable (void *hdl)
 Disable PWM. More...
 

Detailed Description

HAL_CNT_PWM.

Function Documentation

◆ hal_cnt_pwm_close()

void hal_cnt_pwm_close ( void *  hdl)

Close counter PWM.

Parameters
[in]hdlCounter PWM device handle.
Returns
None.

◆ hal_cnt_pwm_disable()

int hal_cnt_pwm_disable ( void *  hdl)

Disable PWM.

Parameters
[in]hdlCounter PWM device handle.
Returns
Driver error return code,
See also
enum cnt_pwm_err

◆ hal_cnt_pwm_enable()

int hal_cnt_pwm_enable ( void *  hdl,
uint32_t  period_usec,
uint32_t  high_usec 
)

Enable PWM.

Parameters
[in]hdlCounter PWM device handle.
[in]period_usecPWM period
[in]high_usecPWM high time
Returns
Driver error return code,
See also
enum cnt_pwm_err

◆ hal_cnt_pwm_open()

void* hal_cnt_pwm_open ( int  id,
int  port,
int  pin,
int  prio 
)

Open counter PWM.

Parameters
[in]idTimer id
See also
enum cnt_pwm_id_t.
Parameters
[in]portPWM output port,
See also
enum gpio_port_t.
Parameters
[in]pinPWM output pin,
See also
enum gpio_pin_t.
Parameters
[in]prioCounter interrupt priority.
Returns
Counter PWM device handle, NULL if failed.