20 #ifndef MBED_PWMOUT_API_H 21 #define MBED_PWMOUT_API_H void pwmout_period_us(pwmout_t *obj, int us)
Set the PWM period specified in microseconds, keeping the duty cycle the same.
void pwmout_pulsewidth_ms(pwmout_t *obj, int ms)
Set the PWM pulsewidth specified in miliseconds, keeping the period the same.
void pwmout_init_direct(pwmout_t *obj, const PinMap *pinmap)
Initialize the pwm out peripheral and configure the pin.
void pwmout_write(pwmout_t *obj, float percent)
Set the output duty-cycle in range <0.0f, 1.0f>
void pwmout_pulsewidth_us(pwmout_t *obj, int us)
Set the PWM pulsewidth specified in microseconds, keeping the period the same.
int pwmout_read_period_us(pwmout_t *obj)
Read the PWM period specified in microseconds.
void pwmout_period(pwmout_t *obj, float seconds)
Set the PWM period specified in seconds, keeping the duty cycle the same.
const PinMap * pwmout_pinmap(void)
Get the pins that support PWM.
void pwmout_init(pwmout_t *obj, PinName pin)
Initialize the pwm out peripheral and configure the pin.
void pwmout_period_ms(pwmout_t *obj, int ms)
Set the PWM period specified in miliseconds, keeping the duty cycle the same.
float pwmout_read(pwmout_t *obj)
Read the current float-point output duty-cycle.
struct pwmout_s pwmout_t
Pwmout hal structure.
int pwmout_read_pulsewidth_us(pwmout_t *obj)
Read the PWM pulsewidth specified in microseconds.
void pwmout_pulsewidth(pwmout_t *obj, float seconds)
Set the PWM pulsewidth specified in seconds, keeping the period the same.
void pwmout_free(pwmout_t *obj)
Deinitialize the pwmout object.