![]() |
no-OS
|
Header file of LTC3208 Driver. More...
Classes | |
| struct | ltc3208_options_cfg |
| struct | ltc3208_dev |
| struct | ltc3208_init_param |
Macros | |
| #define | __LTC3208_H__ |
| #define | LTC3208_REG_RED_GREEN 0x01 |
| #define | LTC3208_REG_BLUE_AUX 0x02 |
| #define | LTC3208_REG_MAIN 0x03 |
| #define | LTC3208_REG_SUB 0X04 |
| #define | LTC3208_REG_AUX_DAC_SEL 0x05 |
| #define | LTC3208_REG_CAM_HIGH_LOW 0x06 |
| #define | LTC3208_REG_OPTIONS 0x07 |
| #define | LTC3208_8_BIT_MASK NO_OS_GENMASK(7,0) |
| #define | LTC3208_4_BIT_HIGH_MASK NO_OS_GENMASK(7,4) |
| #define | LTC3208_4_BIT_LOW_MASK NO_OS_GENMASK(3,0) |
| #define | LTC3208_AUX4_MASK NO_OS_GENMASK(7,6) |
| #define | LTC3208_AUX3_MASK NO_OS_GENMASK(5,4) |
| #define | LTC3208_AUX2_MASK NO_OS_GENMASK(3,2) |
| #define | LTC3208_AUX1_MASK NO_OS_GENMASK(1,0) |
| #define | LTC3208_CPO_2X_BIT NO_OS_BIT(7) |
| #define | LTC3208_CPO_1P5X_BIT NO_OS_BIT(6) |
| #define | LTC3208_TEST_HOOK_1_MASK NO_OS_BIT(5) |
| #define | LTC3208_TEST_HOOK_2_MASK NO_OS_BIT(4) |
| #define | LTC3208_DROPOUT_BIT NO_OS_BIT(3) |
| #define | LTC3208_CAM_BIT NO_OS_BIT(2) |
| #define | LTC3208_RGB_BIT NO_OS_BIT(1) |
Enumerations | |
| enum | dac_options { AUX , MAIN , SUB , CAM } |
| enum | reg_options { GREEN_RED_REG , AUX_BLUE_REG , MAIN_REG , SUB_REG , CAM_REG } |
Functions | |
| int | ltc3208_init (struct ltc3208_dev **device, struct ltc3208_init_param init_param) |
| Initializes the LTC3208 device structure. | |
| int | ltc3208_remove (struct ltc3208_dev *device) |
| Deallocates the resources for the device structure. | |
| int | ltc3208_reg_write (struct ltc3208_dev *device, uint8_t reg_addr, uint8_t reg_data) |
| Writes to the selected register on the device. | |
| int | ltc3208_reset (struct ltc3208_dev *device) |
| Resets all register of the device. | |
| int | ltc3208_set_8_bit_dac (struct ltc3208_dev *device, enum reg_options reg_selected, uint8_t current_level) |
| Sets the selected 8 bit LED register's current strength. | |
| int | ltc3208_set_4_bit_dac (struct ltc3208_dev *device, enum reg_options reg_selected, uint8_t current_level_high, uint8_t current_level_low) |
| Sets the selected 4 bit LED register's current strength. | |
| int | ltc3208_set_all_aux_led_dac (struct ltc3208_dev *device, enum dac_options aux_dac_1, enum dac_options aux_dac_2, enum dac_options aux_dac_3, enum dac_options aux_dac_4) |
| Sets the DAC settings for each AUX LED. | |
| int | ltc3208_set_aux_led_dac (struct ltc3208_dev *device, enum dac_options aux_dac, int aux_index) |
| Sets the DAC settings for a specific AUX LED. | |
| int | ltc3208_update_options (struct ltc3208_dev *device, bool is_force_2x, bool is_force_1p5x, bool is_dropout_disable, bool is_cam_high_enable, bool is_sub_enable) |
| Updates the options set on the device. | |
| int | ltc3208_set_cpo_2x (struct ltc3208_dev *device, bool is_force_2x) |
| Sets the device's charge pump to output 2x of operating voltage. | |
| int | ltc3208_set_1p5x (struct ltc3208_dev *device, bool is_force_1p5x) |
| Sets the device's charge pump to output 1.5x of operating voltage. | |
| int | ltc3208_set_droupout_disable (struct ltc3208_dev *device, bool is_dropout_disable) |
| Enables RGB and AUX4 dropout signals. | |
| int | ltc3208_set_cam_high (struct ltc3208_dev *device, bool is_cam_high_enable) |
| Selects which CAM register to use. | |
| int | ltc3208_set_sub_enable (struct ltc3208_dev *device, bool is_sub_enable) |
| Selects if RGB or SUB is controled by ENRGBS pin. | |
Header file of LTC3208 Driver.
Copyright 2025(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
| #define __LTC3208_H__ |
| #define LTC3208_4_BIT_HIGH_MASK NO_OS_GENMASK(7,4) |
| #define LTC3208_4_BIT_LOW_MASK NO_OS_GENMASK(3,0) |
| #define LTC3208_8_BIT_MASK NO_OS_GENMASK(7,0) |
| #define LTC3208_AUX1_MASK NO_OS_GENMASK(1,0) |
| #define LTC3208_AUX2_MASK NO_OS_GENMASK(3,2) |
| #define LTC3208_AUX3_MASK NO_OS_GENMASK(5,4) |
| #define LTC3208_AUX4_MASK NO_OS_GENMASK(7,6) |
| #define LTC3208_CAM_BIT NO_OS_BIT(2) |
| #define LTC3208_CPO_1P5X_BIT NO_OS_BIT(6) |
| #define LTC3208_CPO_2X_BIT NO_OS_BIT(7) |
| #define LTC3208_DROPOUT_BIT NO_OS_BIT(3) |
| #define LTC3208_REG_AUX_DAC_SEL 0x05 |
| #define LTC3208_REG_BLUE_AUX 0x02 |
| #define LTC3208_REG_CAM_HIGH_LOW 0x06 |
| #define LTC3208_REG_MAIN 0x03 |
| #define LTC3208_REG_OPTIONS 0x07 |
| #define LTC3208_REG_RED_GREEN 0x01 |
| #define LTC3208_REG_SUB 0X04 |
| #define LTC3208_RGB_BIT NO_OS_BIT(1) |
| #define LTC3208_TEST_HOOK_1_MASK NO_OS_BIT(5) |
| #define LTC3208_TEST_HOOK_2_MASK NO_OS_BIT(4) |
| enum dac_options |
| enum reg_options |
| int ltc3208_init | ( | struct ltc3208_dev ** | device, |
| struct ltc3208_init_param | init_param ) |
Initializes the LTC3208 device structure.
| device | - The device structure to initialize. |
| init_param | - The initialization parameters. |
| int ltc3208_reg_write | ( | struct ltc3208_dev * | device, |
| uint8_t | reg_addr, | ||
| uint8_t | reg_data ) |
Writes to the selected register on the device.
| device | - The device structure. |
| reg_addr | - The register sub-address. |
| reg_data | - The data to write into the register (8-bits wide) |
| int ltc3208_remove | ( | struct ltc3208_dev * | device | ) |
Deallocates the resources for the device structure.
| device | - The device structure. |
| int ltc3208_reset | ( | struct ltc3208_dev * | device | ) |
Resets all register of the device.
| device | - The device structure. |
| int ltc3208_set_1p5x | ( | struct ltc3208_dev * | device, |
| bool | is_force_1p5x ) |
Sets the device's charge pump to output 1.5x of operating voltage.
| device | - The device structure. |
| is_force_1p5x | - Sets the device to use 1.5x voltage. |
| int ltc3208_set_4_bit_dac | ( | struct ltc3208_dev * | device, |
| enum reg_options | reg_selected, | ||
| uint8_t | current_level_high, | ||
| uint8_t | current_level_low ) |
Sets the selected 4 bit LED register's current strength.
| device | - The device structure. |
| reg_selected | - The enumeration value of the selected register. |
| current_level_high | - The current level for the high bits with 16 levels |
| current_level_low | - The current level for the low bits with 16 levels |
Sets the selected 4 bit LED register's current strength.
| device | - The device structure. |
| reg_selected | - The enumeration value of the selected register. |
| current_level_high | - The current level for the high bits with 16 levels |
| current_level_low | - The current level for the low bits with 16 levels |
| int ltc3208_set_8_bit_dac | ( | struct ltc3208_dev * | device, |
| enum reg_options | reg_selected, | ||
| uint8_t | current_level ) |
Sets the selected 8 bit LED register's current strength.
| device | - The device structure. |
| reg_selected | - The enumeration value of the selected register. |
| current_level | - The current level for the LED group with 256 levels |
Sets the selected 8 bit LED register's current strength.
| device | - The device structure. |
| reg_selected | - The enumeration value of the selected register. |
| current_level | - The current level for the LED group with 256 levels |
| int ltc3208_set_all_aux_led_dac | ( | struct ltc3208_dev * | device, |
| enum dac_options | aux_dac_1, | ||
| enum dac_options | aux_dac_2, | ||
| enum dac_options | aux_dac_3, | ||
| enum dac_options | aux_dac_4 ) |
Sets the DAC settings for each AUX LED.
| device | - The device structure. |
| aux_dac_1 | - The enumeration value of the selected DAC for AUX 1. |
| aux_dac_2 | - The enumeration value of the selected DAC for AUX 2. |
| aux_dac_3 | - The enumeration value of the selected DAC for AUX 3. |
| aux_dac_4 | - The enumeration value of the selected DAC for AUX 4. |
| int ltc3208_set_aux_led_dac | ( | struct ltc3208_dev * | device, |
| enum dac_options | aux_dac, | ||
| int | aux_index ) |
Sets the DAC settings for a specific AUX LED.
| device | - The device structure. |
| aux_dac | - The enumeration value of the selected DAC for AUX. |
| aux_index | - The auxillary led index (0..3). |
| int ltc3208_set_cam_high | ( | struct ltc3208_dev * | device, |
| bool | is_cam_high_enable ) |
Selects which CAM register to use.
| device | - The device structure. |
| is_cam_high_enable | - Sets the device to enable camera high current. |
| int ltc3208_set_cpo_2x | ( | struct ltc3208_dev * | device, |
| bool | is_force_2x ) |
Sets the device's charge pump to output 2x of operating voltage.
| device | - The device structure. |
| is_force_2x | - Signals the device to use 2x voltage. |
| int ltc3208_set_droupout_disable | ( | struct ltc3208_dev * | device, |
| bool | is_dropout_disable ) |
Enables RGB and AUX4 dropout signals.
| device | - The device structure. |
| is_dropout_disable | - Sets the device to disable RGB and AUX4 dropout signals. |
| int ltc3208_set_sub_enable | ( | struct ltc3208_dev * | device, |
| bool | is_sub_enable ) |
Selects if RGB or SUB is controled by ENRGBS pin.
| device | - The device structure. |
| is_sub_enable | - Sets the device to enable SUB displays. |
| int ltc3208_update_options | ( | struct ltc3208_dev * | device, |
| bool | is_force_2x, | ||
| bool | is_force_1p5x, | ||
| bool | is_dropout_disable, | ||
| bool | is_cam_high_enable, | ||
| bool | is_sub_enable ) |
Updates the options set on the device.
| device | - The device's structure. |
| is_force_2x | - Signals the device to use 2x voltage. |
| is_force_1p5x | - Sets the device to use 1.5x voltage. |
| is_dropout_disable | - Sets the device to disable RGB and AUX4 dropout signals. |
| is_cam_high_enable | - Sets the device to enable camera high current. |
| is_sub_enable | - Sets the device to enable SUB displays. |
| device | - The device's structure. |
| is_force_2x | - Signals the device to use 2x voltage. |
| is_force_1p5x | - Sets the device to use 1.5x voltage. |
| is_dropout_disable | - Sets the device to use dropout. |
| is_cam_high_enable | - Sets the device to enable camera high current. |
| is_sub_enable | - Sets the device to enable rgb. |