leddriver16 2.1.0.0
|
API for configuring and manipulating LED Driver 16 Click driver. More...
Topics | |
LED Driver 16 Registers List | |
List of registers of LED Driver 16 Click driver. | |
LED Driver 16 Registers Settings | |
Settings for registers of LED Driver 16 Click driver. | |
LED Driver 16 MikroBUS Map | |
MikroBUS pin mapping of LED Driver 16 Click driver. | |
Functions | |
void | leddriver16_cfg_setup (leddriver16_cfg_t *cfg) |
LED Driver 16 configuration object setup function. | |
err_t | leddriver16_init (leddriver16_t *ctx, leddriver16_cfg_t *cfg) |
LED Driver 16 initialization function. | |
err_t | leddriver16_default_cfg (leddriver16_t *ctx) |
LED Driver 16 default configuration function. | |
err_t | leddriver16_write_register (leddriver16_t *ctx, uint8_t reg, uint8_t data_in) |
LED Driver 16 write register function. | |
err_t | leddriver16_read_register (leddriver16_t *ctx, uint8_t reg, uint8_t *data_out) |
LED Driver 16 read register function. | |
void | leddriver16_disable_device (leddriver16_t *ctx) |
LED Driver 16 disable device function. | |
void | leddriver16_enable_device (leddriver16_t *ctx) |
LED Driver 16 enable device function. | |
void | leddriver16_disable_output (leddriver16_t *ctx) |
LED Driver 16 disable output function. | |
void | leddriver16_enable_output (leddriver16_t *ctx) |
LED Driver 16 enable output function. | |
err_t | leddriver16_clear_errors (leddriver16_t *ctx) |
LED Driver 16 clear errors function. | |
err_t | leddriver16_set_led_state (leddriver16_t *ctx, uint16_t led_ch_mask, uint8_t state) |
LED Driver 16 set led state function. | |
err_t | leddriver16_set_led_pwm (leddriver16_t *ctx, uint16_t led_ch_mask, uint8_t duty_cycle) |
LED Driver 16 set led pwm function. | |
err_t | leddriver16_set_led_iref (leddriver16_t *ctx, uint16_t led_ch_mask, uint8_t iref) |
LED Driver 16 set led iref function. | |
API for configuring and manipulating LED Driver 16 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void leddriver16_cfg_setup | ( | leddriver16_cfg_t * | cfg | ) |
LED Driver 16 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See leddriver16_cfg_t object definition for detailed explanation. |
err_t leddriver16_clear_errors | ( | leddriver16_t * | ctx | ) |
LED Driver 16 clear errors function.
This function clears all error status bits in EFLAGn register and ERROR (bit 6).
[in] | ctx | : Click context object. See leddriver16_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver16_default_cfg | ( | leddriver16_t * | ctx | ) |
LED Driver 16 default configuration function.
This function executes a default configuration of LED Driver 16 click board.
[in] | ctx | : Click context object. See leddriver16_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void leddriver16_disable_device | ( | leddriver16_t * | ctx | ) |
LED Driver 16 disable device function.
This function disables device by setting the RST pin to low logic state.
[in] | ctx | : Click context object. See leddriver16_t object definition for detailed explanation. |
void leddriver16_disable_output | ( | leddriver16_t * | ctx | ) |
LED Driver 16 disable output function.
This function disables output by setting the OE pin to high logic state.
[in] | ctx | : Click context object. See leddriver16_t object definition for detailed explanation. |
void leddriver16_enable_device | ( | leddriver16_t * | ctx | ) |
LED Driver 16 enable device function.
This function enables device by setting the RST pin to high logic state.
[in] | ctx | : Click context object. See leddriver16_t object definition for detailed explanation. |
void leddriver16_enable_output | ( | leddriver16_t * | ctx | ) |
LED Driver 16 enable output function.
This function enables output by setting the OE pin to low logic state.
[in] | ctx | : Click context object. See leddriver16_t object definition for detailed explanation. |
err_t leddriver16_init | ( | leddriver16_t * | ctx, |
leddriver16_cfg_t * | cfg ) |
LED Driver 16 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See leddriver16_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See leddriver16_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver16_read_register | ( | leddriver16_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
LED Driver 16 read register function.
This function reads data from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See leddriver16_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver16_set_led_iref | ( | leddriver16_t * | ctx, |
uint16_t | led_ch_mask, | ||
uint8_t | iref ) |
LED Driver 16 set led iref function.
This function sets the gain settings for output current for the specified LEDs.
[in] | ctx | : Click context object. See leddriver16_t object definition for detailed explanation. |
[in] | led_ch_mask | : LED channel mask (16-bit). See the LED channel setting macros definition. |
[in] | iref | : Output current setting with steps of 225uA. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver16_set_led_pwm | ( | leddriver16_t * | ctx, |
uint16_t | led_ch_mask, | ||
uint8_t | duty_cycle ) |
LED Driver 16 set led pwm function.
This function sets the PWM duty cycle for the specified LEDs.
[in] | ctx | : Click context object. See leddriver16_t object definition for detailed explanation. |
[in] | led_ch_mask | : LED channel mask (16-bit). See the LED channel setting macros definition. |
[in] | duty_cycle | : PWM duty cycle. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver16_set_led_state | ( | leddriver16_t * | ctx, |
uint16_t | led_ch_mask, | ||
uint8_t | state ) |
LED Driver 16 set led state function.
This function sets the output state for the specified LEDs.
[in] | ctx | : Click context object. See leddriver16_t object definition for detailed explanation. |
[in] | led_ch_mask | : LED channel mask (16-bit). See the LED channel setting macros definition. |
[in] | state | : LED output state
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t leddriver16_write_register | ( | leddriver16_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
LED Driver 16 write register function.
This function writes data to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See leddriver16_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.