Header file of LTC7841 Driver. More...
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include "no_os_i2c.h"
#include "no_os_irq.h"
#include "no_os_print_log.h"
#include "no_os_delay.h"
#include "no_os_error.h"
#include "no_os_util.h"
#include "no_os_units.h"
#include "no_os_alloc.h"
Go to the source code of this file.
Classes | |
struct | ltc7841_init_param |
Initialization parameter for the device descriptor. More... | |
struct | ltc7841_desc |
ltc7841 device descriptor More... | |
Enumerations | |
enum | ltc7841_status_word_bit_placement { LTC7841_COMMUNICATION_FAILURE = 1 , LTC7841_TEMPERATURE_FAULT = 2 , LTC7841_OUTPUT_OVERVOLTAGE_FAULT = 5 , LTC7841_OFF = 6 , LTC7841_PGOOD = 11 , LTC7841_OUTPUT_VOLTAGE_FAULT = 15 } |
Functions | |
int | ltc7841_reg_read (struct ltc7841_desc *desc, uint8_t cmd, uint8_t *data) |
Read a raw value from a register. | |
int | ltc7841_reg_write (struct ltc7841_desc *desc, uint8_t cmd, uint16_t value) |
Write a raw value to a register. | |
int | ltc7841_init (struct ltc7841_desc **device, struct ltc7841_init_param *init_param) |
Initialize the device structure. | |
int | ltc7841_remove (struct ltc7841_desc *) |
Free the device descriptor. | |
int | ltc7841_reset (struct ltc7841_desc *desc) |
Perform a reset to the LTC7841. | |
int | ltc7841_change_rail_address (struct ltc7841_desc *desc, uint8_t addr) |
Perform change of rail address of LTC7841. | |
int | ltc7841_turn_off (struct ltc7841_desc *desc) |
Turn off LTC7841. | |
int | ltc7841_turn_on (struct ltc7841_desc *desc) |
Turn on LTC7841. | |
int | ltc7841_operation_margin_low (struct ltc7841_desc *desc) |
Margin Low for LTC7841 Operation. | |
int | ltc7841_operation_margin_high (struct ltc7841_desc *desc) |
Margin High for LTC7841 Operation. | |
int | ltc7841_change_to_nominal_slew_rate (struct ltc7841_desc *desc) |
Change to Nominal Slew Rate for LTC7841. | |
int | ltc7841_change_to_slow_slew_rate (struct ltc7841_desc *desc) |
Change to Slow Slew Rate for LTC7841. | |
int | ltc7841_change_to_fast_slew_rate (struct ltc7841_desc *desc) |
Change to Fast Slew Rate for LTC7841. | |
int | ltc7841_change_to_internal_die_temperature (struct ltc7841_desc *desc) |
Change to Internal Die Temeperature Reading for LTC7841. | |
int | ltc7841_change_to_tsns_pin_voltage (struct ltc7841_desc *desc) |
Change to TSNS PIN VOLTAGE for LTC7841. | |
int | ltc7841_change_vout_command (struct ltc7841_desc *desc, uint16_t vout_level) |
Change Vout command. | |
int | ltc7841_change_margin_low_command (struct ltc7841_desc *desc, uint16_t vout_level) |
Change margin low command. | |
int | ltc7841_change_margin_high_command (struct ltc7841_desc *desc, uint16_t vout_level) |
Change margin high command. | |
int | ltc7841_mfr_clear_peaks (struct ltc7841_desc *desc) |
This clears the MFR peak data values. | |
int | ltc7841_clear_status_word_bits (struct ltc7841_desc *desc) |
This clears the STATUS_WORD BITS that are clearable. | |
Variables | |
const uint8_t | ltc7841_write_only_registers [WRITE_ONLY_REGISTERS_NUMBER] |
Header file of LTC7841 Driver.
Copyright 2025(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define ECOMM 9 |
#define I2C_DEFAULT_ARRAY_SIZE 2 |
#define I2C_WRITE_LENGTH_FOR_READ 1 |
#define LTC7841_7_BIT_ADDRESS_MASK 0x7F |
#define LTC7841_BYTE_LENGTH 1 |
#define LTC7841_DEFAULT_ADDRESS_0 0x5A |
#define LTC7841_DEFAULT_ADDRESS_1 0x5B |
#define LTC7841_FAST_SLEW_RATE 0b11 |
#define LTC7841_I2C_WR_FRAME_SIZE 3 |
#define LTC7841_INTERNAL_DIE_TEMPERATURE 0b0 |
#define LTC7841_MAX_VOUT 48000 |
#define LTC7841_MFR_CLEAR_PEAKS 0xE3 |
#define LTC7841_MFR_CONFIG 0xE9 |
#define LTC7841_MFR_IIN_PEAK 0xE1 |
#define LTC7841_MFR_IOUT_PEAK 0xD7 |
#define LTC7841_MFR_RAIL_ADDRESS 0xFA |
#define LTC7841_MFR_RESET 0xFD |
#define LTC7841_MFR_SPECIAL_ID 0xE7 |
#define LTC7841_MFR_TEMEPRATURE1_PEAK 0xDF |
#define LTC7841_MFR_VIN_PEAK 0xDE |
#define LTC7841_MFR_VOUT_COMMAND 0xE8 |
#define LTC7841_MFR_VOUT_MARGIN_HIGH 0xE5 |
#define LTC7841_MFR_VOUT_MARGIN_LOW 0xED |
#define LTC7841_MFR_VOUT_PEAK 0xDD |
#define LTC7841_NOMINAL_SLEW_RATE 0b00 |
#define LTC7841_OPERATION 1 |
#define LTC7841_OPERATION_MARGIN_HIGH 0xA8 |
#define LTC7841_OPERATION_MARGIN_LOW 0x98 |
#define LTC7841_OPERATION_OFF 0x00 |
#define LTC7841_OPERATION_TURN_ON 0x80 |
#define LTC7841_PMBUS_REVISION 0x98 |
#define LTC7841_READ_IIN 0x89 |
#define LTC7841_READ_IOUT 0x8C |
#define LTC7841_READ_TEMPERATURE_1 0x8D |
#define LTC7841_READ_VIN 0x88 |
#define LTC7841_READ_VOUT 0x8B |
#define LTC7841_SLOW_SLEW_RATE 0b01 |
#define LTC7841_STATUS_WORD 0x79 |
#define LTC7841_TOTAL_REGISTERS 0x16 |
#define LTC7841_TSNS_PIN_VOLTAGE 0b1 |
#define LTC7841_VOUT_MODE 0x20 |
#define LTC7841_WORD_LENGTH 2 |
#define MFR_MAX_VALUE 0x1FF |
#define MFR_VOUT_INIT 0x0FF |
#define READ_TEMPERATURE_1_BIT 2 |
#define REPEATED_START_MODE 1 |
#define STOP_MODE 0 |
#define TWO_BYTES_LENGTH 2 |
X is set based on the pull configuration of the ADDR pin
#define WRITE_ONLY_REGISTERS_NUMBER 2 |
int ltc7841_change_margin_high_command | ( | struct ltc7841_desc * | desc, |
uint16_t | vout_level ) |
Change margin high command.
Change MFR MARGIN HIGH command for LTC7841
desc | - The device structure. |
vout_level | - value is from 0 to 0x1FF |
int ltc7841_change_margin_low_command | ( | struct ltc7841_desc * | desc, |
uint16_t | vout_level ) |
Change margin low command.
Change MFR MARGIN LOW command for LTC7841
desc | - The device structure. |
vout_level | - value is from 0 to 0x1FF |
int ltc7841_change_rail_address | ( | struct ltc7841_desc * | desc, |
uint8_t | addr ) |
Perform change of rail address of LTC7841.
Perform change of rail address of LTC7841
desc | - The device structure. |
addr | - 7 bit address |
int ltc7841_change_to_fast_slew_rate | ( | struct ltc7841_desc * | desc | ) |
Change to Fast Slew Rate for LTC7841.
Change to Fast Slew Rate for LTC7841
desc | - The device structure. |
int ltc7841_change_to_internal_die_temperature | ( | struct ltc7841_desc * | desc | ) |
Change to Internal Die Temeperature Reading for LTC7841.
Change to Internal Die Temeperature Reading for LTC7841
desc | - The device structure. |
int ltc7841_change_to_nominal_slew_rate | ( | struct ltc7841_desc * | desc | ) |
Change to Nominal Slew Rate for LTC7841.
Change to Nominal Slew Rate for LTC7841
desc | - The device structure. |
int ltc7841_change_to_slow_slew_rate | ( | struct ltc7841_desc * | desc | ) |
Change to Slow Slew Rate for LTC7841.
Change to Slow Slew Rate for LTC7841
desc | - The device structure. |
int ltc7841_change_to_tsns_pin_voltage | ( | struct ltc7841_desc * | desc | ) |
Change to TSNS PIN VOLTAGE for LTC7841.
Change to TSNS PIN VOLTAGE for LTC7841
desc | - The device structure. |
int ltc7841_change_vout_command | ( | struct ltc7841_desc * | desc, |
uint16_t | vout_level ) |
Change Vout command.
Change Vout command for LTC7841
desc | - The device structure. |
vout_level | - value is from 0 to 0x1FF |
int ltc7841_clear_status_word_bits | ( | struct ltc7841_desc * | desc | ) |
This clears the STATUS_WORD BITS that are clearable.
Clears the STATUS_WORD BITS that are clearable of LTC7841
desc | - The device structure. |
int ltc7841_init | ( | struct ltc7841_desc ** | device, |
struct ltc7841_init_param * | init_param ) |
Initialize the device structure.
Initialize the device structure
device | - The device structure to be initialized. |
init_param | - Initialization parameter for the device descriptor. |
int ltc7841_mfr_clear_peaks | ( | struct ltc7841_desc * | desc | ) |
This clears the MFR peak data values.
Clears the mfr peak data values of LTC7841
desc | - The device structure. |
int ltc7841_operation_margin_high | ( | struct ltc7841_desc * | desc | ) |
Margin High for LTC7841 Operation.
Margin High Operation for LTC7841
desc | - The device structure. |
int ltc7841_operation_margin_low | ( | struct ltc7841_desc * | desc | ) |
Margin Low for LTC7841 Operation.
Margin Low Operation for LTC7841
desc | - The device structure. |
int ltc7841_reg_read | ( | struct ltc7841_desc * | desc, |
uint8_t | cmd, | ||
uint8_t * | data ) |
Read a raw value from a register.
Read a register value
desc | - The device structure. |
cmd | - PMBus command |
data | - Address of the byte read |
int ltc7841_reg_write | ( | struct ltc7841_desc * | desc, |
uint8_t | cmd, | ||
uint16_t | value ) |
Write a raw value to a register.
Write a register value
desc | - The device structure. |
cmd | - PMBus command |
value | - Byte to be written |
int ltc7841_remove | ( | struct ltc7841_desc * | desc | ) |
Free the device descriptor.
Free the device descriptor
desc | - The device structure. |
int ltc7841_reset | ( | struct ltc7841_desc * | desc | ) |
Perform a reset to the LTC7841.
Reset the LTC7841 device
desc | - The device structure. |
int ltc7841_turn_off | ( | struct ltc7841_desc * | desc | ) |
Turn off LTC7841.
Turn off LTC7841
desc | - The device structure. |
int ltc7841_turn_on | ( | struct ltc7841_desc * | desc | ) |
Turn on LTC7841.
Turn on LTC7841
desc | - The device structure. |
|
extern |