Nordic Thingy:52 v2.2.0
|
Sx150x LED driver register calculation API. More...
Enumerations | |
enum | { SX150x_LED_DRC_CALC_STATUS_CODE_SUCCESS, SX150x_LED_DRV_CALC_STATUS_CODE_INACCURATE, SX150x_LED_DRV_CALC_STATUS_CODE_INVALID_PARAM, SX150x_LED_DRV_CALC_STATUS_CODE_NULL, SX150x_LED_DRV_CALC_STATUS_CODE_NOT_INIT } |
The SX150x led driver calc status codes. More... | |
Functions | |
ret_code_t | sx150x_led_drv_calc_convert (uint16_t port_mask, drv_ext_light_sequence_t *const real_vals, sx150x_led_drv_regs_vals_t *const reg_vals) |
Converts from real values (intensity (0x00-0xFF and time in milliseconds) to register values. More... | |
bool | sx150x_led_drv_calc_fade_supp (uint16_t port_mask) |
Checks if all the supplied pins in port_mask supports fade. More... | |
void | sx150x_led_drv_calc_init (uint16_t fade_supported_port_mask, uint32_t clkx_tics_pr_sec) |
Initializes the SX150x led driver register calculation module. More... | |
Sx150x LED driver register calculation API.
anonymous enum |
The SX150x led driver calc status codes.
ret_code_t sx150x_led_drv_calc_convert | ( | uint16_t | port_mask, |
drv_ext_light_sequence_t *const | real_vals, | ||
sx150x_led_drv_regs_vals_t *const | reg_vals | ||
) |
Converts from real values (intensity (0x00-0xFF and time in milliseconds) to register values.
[in] | port_mask | 16-bit port mask |
[in,out] | real_vals | The requested values. Will contain the actual set values after processing |
[out] | reg_vals | Register values set as close as possible to achieve the requested values |
bool sx150x_led_drv_calc_fade_supp | ( | uint16_t | port_mask | ) |
Checks if all the supplied pins in port_mask supports fade.
[in] | port_mask | 16-bit port mask. |
void sx150x_led_drv_calc_init | ( | uint16_t | fade_supported_port_mask, |
uint32_t | clkx_tics_pr_sec | ||
) |
Initializes the SX150x led driver register calculation module.
[in] | fade_supported_port_mask | 16-bit port mask holding "1" in positions corresponding to pins which supports fading. |
[in] | clkx_tics_pr_sec | Number of ticks / sec for the internal ioext oscillatior after division. |