A Simple PWM LED.

Public Attributes#

void(*

Member function to set color of PWM LED.

void(*

Member function to get color of PWM LED.

uint8_t

TIMER channel.

GPIO_Port_TypeDef

GPIO port.

uint8_t

GPIO pin.

uint16_t

PWM duty cycle [0-65535].

uint8_t

GPIO polarity (active high/low)

Current state (ON/OFF)

TIMER_TypeDef *

TIMER instance.

uint32_t

PWM frequency.

uint32_t

PWM resolution (dimming steps)

Public Attribute Documentation#

set_color#

void(* sl_led_pwm_t::set_color) (void *context, uint16_t color)

Member function to set color of PWM LED.


Definition at line 43 of file platform/driver/leddrv/inc/sl_pwm_led.h

get_color#

void(* sl_led_pwm_t::get_color) (void *context, uint16_t *color)

Member function to get color of PWM LED.


Definition at line 44 of file platform/driver/leddrv/inc/sl_pwm_led.h

channel#

uint8_t sl_led_pwm_t::channel

TIMER channel.


Definition at line 46 of file platform/driver/leddrv/inc/sl_pwm_led.h

port#

GPIO_Port_TypeDef sl_led_pwm_t::port

GPIO port.


Definition at line 47 of file platform/driver/leddrv/inc/sl_pwm_led.h

pin#

uint8_t sl_led_pwm_t::pin

GPIO pin.


Definition at line 48 of file platform/driver/leddrv/inc/sl_pwm_led.h

level#

uint16_t sl_led_pwm_t::level

PWM duty cycle [0-65535].


Definition at line 52 of file platform/driver/leddrv/inc/sl_pwm_led.h

polarity#

uint8_t sl_led_pwm_t::polarity

GPIO polarity (active high/low)


Definition at line 53 of file platform/driver/leddrv/inc/sl_pwm_led.h

state#

sl_led_state_t sl_led_pwm_t::state

Current state (ON/OFF)


Definition at line 54 of file platform/driver/leddrv/inc/sl_pwm_led.h

timer#

TIMER_TypeDef* sl_led_pwm_t::timer

TIMER instance.


Definition at line 55 of file platform/driver/leddrv/inc/sl_pwm_led.h

frequency#

uint32_t sl_led_pwm_t::frequency

PWM frequency.


Definition at line 56 of file platform/driver/leddrv/inc/sl_pwm_led.h

resolution#

uint32_t sl_led_pwm_t::resolution

PWM resolution (dimming steps)


Definition at line 57 of file platform/driver/leddrv/inc/sl_pwm_led.h