|
#define | SET 1 |
|
#define | CLEAR 0 |
|
#define | LTC7871_CRC_POLYNOMIAL 0x07 |
|
#define | LTC7871_FRAME_SIZE 3 |
|
#define | LTC7871_NUM_REGISTERS 8 |
|
#define | LTC7871_SPI_READ 0x01 |
|
#define | LTC7871_SPI_WRITE 0x00 |
|
#define | LTC7871_STATUS_ACQUISITION_COMMAND 0xF0 |
|
#define | LTC7871_DATA_WRITE_COMMAND 0xF2 |
|
#define | LTC7871_DATA_READ_COMMAND 0xF4 |
|
#define | LTC7871_STATUS_ACQUISITION_COMMAND_SIZE 4 |
|
#define | LTC7871_DATA_WRITE_COMMAND_SIZE 8 |
|
#define | LTC7871_DATA_READ_COMMAND_SIZE 8 |
|
#define | LTC7871_MFR_FAULT 0x01 |
|
#define | LTC7871_MFR_OC_FAULT 0x02 |
|
#define | LTC7871_MFR_NOC_FAULT 0x03 |
|
#define | LTC7871_MFR_STATUS 0x04 |
|
#define | LTC7871_MFR_CONFIG1 0x05 |
|
#define | LTC7871_MFR_CONFIG2 0x06 |
|
#define | LTC7871_CHIP_CTRL 0x07 |
|
#define | LTC7871_IDAC_VLOW 0x08 |
|
#define | LTC7871_IDAC_VHIGH 0x09 |
|
#define | LTC7871_IDAC_SETCUR 0x0A |
|
#define | LTC7871_MFR_SSFM 0x0B |
|
#define | LTC7871_MFR_FAULT_MASK NO_OS_GENMASK(6, 0) |
|
#define | LTC7871_MFR_OC_FAULT_MASK NO_OS_GENMASK(6, 0) |
|
#define | LTC7871_MFR_NOC_FAULT_MASK NO_OS_GENMASK(6, 0) |
|
#define | LTC7871_MFR_STATUS_MASK NO_OS_GENMASK(2, 0) |
|
#define | LTC7871_MFR_CONFIG1_MASK NO_OS_GENMASK(5, 0) |
|
#define | LTC7871_MFR_CONFIG2_MASK NO_OS_GENMASK(4, 0) |
|
#define | LTC7871_MFR_CHIP_CTRL_MASK NO_OS_GENMASK(2, 0) |
|
#define | LTC7871_MFR_SSFM_MASK NO_OS_GENMASK(8, 0) |
|
#define | LTC7871_VLOW_OV_MASK NO_OS_BIT(6) |
|
#define | LTC7871_VHIGH_OV_MASK NO_OS_BIT(5) |
|
#define | LTC7871_VHIGH_UV_MASK NO_OS_BIT(4) |
|
#define | LTC7871_DRVCC_UV_MASK NO_OS_BIT(3) |
|
#define | LTC7871_V5_UV_MASK NO_OS_BIT(2) |
|
#define | LTC7871_VREF_BAD_MASK NO_OS_BIT(1) |
|
#define | LTC7871_OVER_TEMP_MASK NO_OS_BIT(0) |
|
#define | LTC7871_OC_FAULT_6_MASK NO_OS_BIT(5) |
|
#define | LTC7871_OC_FAULT_5_MASK NO_OS_BIT(4) |
|
#define | LTC7871_OC_FAULT_4_MASK NO_OS_BIT(3) |
|
#define | LTC7871_OC_FAULT_3_MASK NO_OS_BIT(2) |
|
#define | LTC7871_OC_FAULT_2_MASK NO_OS_BIT(1) |
|
#define | LTC7871_OC_FAULT_1_MASK NO_OS_BIT(0) |
|
#define | LTC7871_NOC_FAULT_6_MASK NO_OS_BIT(5) |
|
#define | LTC7871_NOC_FAULT_5_MASK NO_OS_BIT(4) |
|
#define | LTC7871_NOC_FAULT_4_MASK NO_OS_BIT(3) |
|
#define | LTC7871_NOC_FAULT_3_MASK NO_OS_BIT(2) |
|
#define | LTC7871_NOC_FAULT_2_MASK NO_OS_BIT(1) |
|
#define | LTC7871_NOC_FAULT_1_MASK NO_OS_BIT(0) |
|
#define | LTC7871_SS_DONE_MASK NO_OS_BIT(2) |
|
#define | LTC7871_MAX_CURRENT_MASK NO_OS_BIT(1) |
|
#define | LTC7871_PGOOD_MASK NO_OS_BIT(0) |
|
#define | LTC7871_SERCUR_WARNING_MASK NO_OS_BIT(5) |
|
#define | LTC7871_DRVCC_SET_MASK NO_OS_GENMASK(4, 3) |
|
#define | LTC7871_ILIM_SET_MASK NO_OS_GENMASK(2, 0) |
|
#define | LTC7871_BURST_MASK NO_OS_BIT(4) |
|
#define | LTC7871_DCM_MASK NO_OS_BIT(3) |
|
#define | LTC7871_HIZ_MASK NO_OS_BIT(2) |
|
#define | LTC7871_SPRD_MASK NO_OS_BIT(1) |
|
#define | LTC7871_BUCK_BOOST_MASK NO_OS_BIT(0) |
|
#define | LTC7871_CML_MASK NO_OS_BIT(2) |
|
#define | LTC7871_RESET_MASK NO_OS_BIT(1) |
|
#define | LTC7871_WP_MASK NO_OS_BIT(0) |
|
#define | LTC7871_MFR_IDAC_VLOW_MASK NO_OS_GENMASK(6, 0) |
|
#define | LTC7871_MFR_IDAC_VHIGH_MASK NO_OS_GENMASK(6, 0) |
|
#define | LTC7871_MFR_IDAC_SETCUR_MASK NO_OS_GENMASK(4, 0) |
|
#define | LTC7871_MFR_SSFM_FSR_MASK NO_OS_GENMASK(4, 3) |
|
#define | LTC7871_MFR_SSFM_MSF_MASK NO_OS_GENMASK(2, 0) |
|
|
uint8_t | ltc7871_get_pec_byte (uint8_t *data, uint8_t len) |
| Compute the PEC.
|
|
int | ltc7871_reg_read (struct ltc7871_dev *dev, uint8_t reg, uint8_t *data) |
| Register Read.
|
|
int | ltc7871_reg_write (struct ltc7871_dev *dev, uint8_t reg, uint8_t data) |
| Register Write.
|
|
int | ltc7871_reg_write_mask (struct ltc7871_dev *dev, uint8_t address, uint8_t mask, uint8_t data) |
| Write to LTC7871 device register with mask.
|
|
int | ltc7871_get_mfr_fault (struct ltc7871_dev *dev, uint8_t status, bool *value) |
| gets mfr fault bit.
|
|
int | ltc7871_get_mfr_oc_fault (struct ltc7871_dev *dev, uint8_t status, bool *value) |
| gets status for overcurrent condition status.
|
|
int | ltc7871_get_mfr_noc_fault (struct ltc7871_dev *dev, uint8_t status, bool *value) |
| gets status for negative overcurrent fault condition status.
|
|
int | ltc7871_get_mfr_config1_setting (struct ltc7871_dev *dev, uint8_t config, uint8_t *value) |
| gets configuration of the controller programmed by the pins.
|
|
int | ltc7871_get_mfr_config2_setting (struct ltc7871_dev *dev, uint8_t config, uint8_t *value) |
| gets configuration of the controller programmed by the pins.
|
|
int | ltc7871_get_mfr_status (struct ltc7871_dev *dev, uint8_t status_mask, bool *status) |
| gets status.
|
|
int | ltc7871_reset (struct ltc7871_dev *dev) |
| Reset all R/W registers.
|
|
int | ltc7871_clear_pec_fault (struct ltc7871_dev *dev) |
| Clear PEC fault bit.
|
|
int | ltc7871_read_pec_fault (struct ltc7871_dev *dev, bool *value) |
| Read PEC fault bit.
|
|
int | ltc7871_set_write_protect (struct ltc7871_dev *dev, bool value) |
| set write protect bit.
|
|
int | ltc7871_is_write_protected (struct ltc7871_dev *dev, bool *value) |
| Read Write Protect bit for IDAC registers, and MFR_SSFM register.
|
|
int | ltc7871_get_mfr_idac_vlow (struct ltc7871_dev *dev, int8_t *value) |
| get the current DAC value to program the VLOW voltage.
|
|
int | ltc7871_set_mfr_idac_vlow (struct ltc7871_dev *dev, int8_t value) |
| stores the current DAC value to program the VLOW voltage.
|
|
int | ltc7871_get_mfr_idac_vhigh (struct ltc7871_dev *dev, int8_t *value) |
| get the current DAC value to program the VHIGH voltage.
|
|
int | ltc7871_set_mfr_idac_vhigh (struct ltc7871_dev *dev, int8_t value) |
| stores the current DAC value to program the VHIGH voltage.
|
|
int | ltc7871_get_mfr_idac_setcur (struct ltc7871_dev *dev, int8_t *value) |
| get the current DAC value to program the sourcing current of the SETCUR pin.
|
|
int | ltc7871_set_mfr_idac_setcur (struct ltc7871_dev *dev, int8_t value) |
| stores the current DAC value to program the sourcing current of the SETCUR pin.
|
|
int | ltc7871_get_freq_spread_range (struct ltc7871_dev *dev, uint8_t *value) |
| Get Frequency Spread Range.
|
|
int | ltc7871_set_freq_spread_range (struct ltc7871_dev *dev, enum ltc7871_ssfm_fsr value) |
| Set Frequency Spread Range.
|
|
int | ltc7871_get_mod_freq (struct ltc7871_dev *dev, uint8_t *value) |
| Get Modulation Signal Frequency.
|
|
int | ltc7871_set_mod_freq (struct ltc7871_dev *dev, enum ltc7871_ssfm_msf value) |
| Set Modulation Signal Frequency.
|
|
int | ltc7871_set_pwmen_pin (struct ltc7871_dev *dev, uint8_t value) |
| Set PWMEN pin of LTC7871 device.
|
|
int | ltc7871_get_pwmen_pin (struct ltc7871_dev *dev, uint8_t *value) |
| Get EN pin of LTC7871 device.
|
|
int | ltc7871_init (struct ltc7871_dev **device, struct ltc7871_init_param *init_param) |
| Initialize the LTC7871 device.
|
|
int | ltc7871_remove (struct ltc7871_dev *dev) |
| Free the resources allocated by the LT7871_init()
|
|
Header file for the LTC7871 Driver.
- Author
- Aldrin Abacan (aldri.nosp@m.n.ab.nosp@m.acan@.nosp@m.anal.nosp@m.og.co.nosp@m.m)
Copyright 2024(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:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
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.