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

LED 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 57 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 58 of file platform/driver/leddrv/inc/sl_pwm_led.h

channel#

uint8_t sl_led_pwm_t::channel

TIMER channel.


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

port#

GPIO_Port_TypeDef sl_led_pwm_t::port

LED port.


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

pin#

uint8_t sl_led_pwm_t::pin

GPIO pin.


Definition at line 68 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 69 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 70 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 71 of file platform/driver/leddrv/inc/sl_pwm_led.h

timer#

TIMER_TypeDef* sl_led_pwm_t::timer

TIMER instance.


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

frequency#

uint32_t sl_led_pwm_t::frequency

PWM frequency.


Definition at line 73 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 74 of file platform/driver/leddrv/inc/sl_pwm_led.h