Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Header file for the TLA2528 MFD driver. More...

#include <zephyr/device.h>
#include <zephyr/sys/mutex.h>
#include <zephyr/sys/util_macro.h>
#include <stdint.h>

Go to the source code of this file.

Enumerations

enum  tla2528_reg {
  TLA2528_SYSTEM_STATUS = 0x0 , TLA2528_GENERAL_CFG = 0x1 , TLA2528_DATA_CFG = 0x2 , TLA2528_OSR_CFG = 0x3 ,
  TLA2528_OPMODE_CFG = 0x4 , TLA2528_PIN_CFG = 0x5 , TLA2528_GPIO_CFG = 0x7 , TLA2528_GPO_DRIVE_CFG = 0x9 ,
  TLA2528_GPO_VALUE = 0xb , TLA2528_GPI_VALUE = 0xd , TLA2528_SEQUENCE_CFG = 0x10 , TLA2528_CHANNEL_SEL = 0x11 ,
  TLA2528_AUTO_SEQ_CH_SEL = 0x12
}
 TLA2528 Register mapping. More...
enum  tla2528_general_cfg { TLA2528_CNVST = BIT(3) , TLA2528_CH_RST = BIT(2) , TLA2528_CAL = BIT(1) , TLA2528_RST = BIT(0) }
 Bit mapping for the GENERAL_CFG register of the TLA2528. More...

Functions

int tla2528_register_write (const struct device *dev, enum tla2528_reg reg, uint8_t data)
 write a specific register of the TLA2528
int tla2528_register_read (const struct device *dev, enum tla2528_reg reg, uint8_t *data)
 read a specific register of the TLA2528
int tla2528_register_set_bits (const struct device *dev, enum tla2528_reg reg, uint8_t bits)
 set specific bits in a register of the TLA2528
int tla2528_register_clear_bits (const struct device *dev, enum tla2528_reg reg, uint8_t bits)
 clear specific bits in a register of the TLA2528
int tla2528_read_adc_data (const struct device *dev, uint16_t *data)
 read a sample of ADC data from the TLA2528
struct k_mutextla2528_get_lock (const struct device *dev)
 get the mutex lock for the TLA2528

Detailed Description

Header file for the TLA2528 MFD driver.