Remove I2C slave methods from I2C master interface; rename i2c_dev_s to i2c_master_s.
This commit is contained in:
parent
2591281375
commit
1615a5ead0
@ -78,7 +78,7 @@
|
||||
|
||||
int tiva_tmp100_initialize(FAR const char *devpath)
|
||||
{
|
||||
FAR struct i2c_dev_s *i2c;
|
||||
FAR struct i2c_master_s *i2c;
|
||||
int ret;
|
||||
|
||||
/* Get an instance of the I2C6 interface */
|
||||
|
@ -90,7 +90,7 @@
|
||||
|
||||
int sam_at24_automount(int minor)
|
||||
{
|
||||
FAR struct i2c_dev_s *i2c;
|
||||
FAR struct i2c_master_s *i2c;
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
static bool initialized = false;
|
||||
int ret;
|
||||
|
@ -151,7 +151,7 @@ static inline FAR struct fb_vtable_s *ov2640_lcd_initialize(void)
|
||||
|
||||
static inline int ov2640_camera_initialize(void)
|
||||
{
|
||||
FAR struct i2c_dev_s *i2c;
|
||||
FAR struct i2c_master_s *i2c;
|
||||
uint32_t actual;
|
||||
int ret;
|
||||
|
||||
|
@ -246,7 +246,7 @@ int sam_wm8904_initialize(int minor)
|
||||
{
|
||||
FAR struct audio_lowerhalf_s *wm8904;
|
||||
FAR struct audio_lowerhalf_s *pcm;
|
||||
FAR struct i2c_dev_s *i2c;
|
||||
FAR struct i2c_master_s *i2c;
|
||||
FAR struct i2s_dev_s *i2s;
|
||||
static bool initialized = false;
|
||||
char devname[12];
|
||||
|
@ -238,7 +238,7 @@ static int mxt_interrupt(int irq, FAR void *context)
|
||||
|
||||
int board_tsc_setup(int minor)
|
||||
{
|
||||
FAR struct i2c_dev_s *i2c;
|
||||
FAR struct i2c_master_s *i2c;
|
||||
static bool initialized = false;
|
||||
int ret;
|
||||
|
||||
|
@ -87,7 +87,7 @@
|
||||
|
||||
void sam_pmic_initialize(void)
|
||||
{
|
||||
FAR struct i2c_dev_s *i2c;
|
||||
FAR struct i2c_master_s *i2c;
|
||||
uint8_t buffer[2];
|
||||
|
||||
/* Get an instance of the I2C interface for the PMIC */
|
||||
|
@ -246,7 +246,7 @@ int sam_wm8904_initialize(int minor)
|
||||
{
|
||||
FAR struct audio_lowerhalf_s *wm8904;
|
||||
FAR struct audio_lowerhalf_s *pcm;
|
||||
FAR struct i2c_dev_s *i2c;
|
||||
FAR struct i2c_master_s *i2c;
|
||||
FAR struct i2s_dev_s *i2s;
|
||||
static bool initialized = false;
|
||||
char devname[12];
|
||||
|
@ -66,7 +66,7 @@
|
||||
|
||||
int sam_at24config(void)
|
||||
{
|
||||
struct i2c_dev_s *i2c;
|
||||
struct i2c_master_s *i2c;
|
||||
struct mtd_dev_s *at24;
|
||||
int ret;
|
||||
|
||||
|
@ -154,7 +154,7 @@ void weak_function sam_netinitialize(void)
|
||||
#ifdef HAVE_MACADDR
|
||||
int sam_emac0_setmac(void)
|
||||
{
|
||||
struct i2c_dev_s *i2c;
|
||||
struct i2c_master_s *i2c;
|
||||
struct mtd_dev_s *at24;
|
||||
uint8_t mac[6];
|
||||
ssize_t nread;
|
||||
|
@ -66,7 +66,7 @@
|
||||
|
||||
int sam_at24config(void)
|
||||
{
|
||||
struct i2c_dev_s *i2c;
|
||||
struct i2c_master_s *i2c;
|
||||
struct mtd_dev_s *at24;
|
||||
int ret;
|
||||
|
||||
|
@ -122,7 +122,7 @@ int sam_bringup(void)
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
#endif
|
||||
#if defined(HAVE_RTC_DSXXXX) || defined(HAVE_RTC_PCF85263)
|
||||
FAR struct i2c_dev_s *i2c;
|
||||
FAR struct i2c_master_s *i2c;
|
||||
#endif
|
||||
#if defined(HAVE_S25FL1_CHARDEV) || defined(HAVE_PROGMEM_CHARDEV)
|
||||
char blockdev[18];
|
||||
|
@ -158,7 +158,7 @@ void weak_function sam_netinitialize(void)
|
||||
#ifdef HAVE_MACADDR
|
||||
int sam_emac0_setmac(void)
|
||||
{
|
||||
struct i2c_dev_s *i2c;
|
||||
struct i2c_master_s *i2c;
|
||||
struct mtd_dev_s *at24;
|
||||
uint8_t mac[6];
|
||||
ssize_t nread;
|
||||
|
@ -237,7 +237,7 @@ static int mxt_interrupt(int irq, FAR void *context)
|
||||
|
||||
int board_tsc_setup(int minor)
|
||||
{
|
||||
FAR struct i2c_dev_s *i2c;
|
||||
FAR struct i2c_master_s *i2c;
|
||||
static bool initialized = false;
|
||||
int ret;
|
||||
|
||||
|
@ -246,7 +246,7 @@ int sam_wm8904_initialize(int minor)
|
||||
{
|
||||
FAR struct audio_lowerhalf_s *wm8904;
|
||||
FAR struct audio_lowerhalf_s *pcm;
|
||||
FAR struct i2c_dev_s *i2c;
|
||||
FAR struct i2c_master_s *i2c;
|
||||
FAR struct i2s_dev_s *i2s;
|
||||
static bool initialized = false;
|
||||
char devname[12];
|
||||
|
@ -78,7 +78,7 @@
|
||||
|
||||
int stm32_lm75initialize(FAR const char *devpath)
|
||||
{
|
||||
FAR struct i2c_dev_s *i2c;
|
||||
FAR struct i2c_master_s *i2c;
|
||||
int ret;
|
||||
|
||||
/* Configure PB.5 as Input pull-up. This pin can be used as a temperature
|
||||
|
@ -276,7 +276,7 @@ static void stmpe811_clear(FAR struct stmpe811_config_s *state)
|
||||
int board_tsc_setup(int minor)
|
||||
{
|
||||
#ifndef CONFIG_STMPE811_TSC_DISABLE
|
||||
FAR struct i2c_dev_s *dev;
|
||||
FAR struct i2c_master_s *dev;
|
||||
int ret;
|
||||
|
||||
idbg("minor %d\n", minor);
|
||||
|
@ -276,7 +276,7 @@ static void stmpe811_clear(FAR struct stmpe811_config_s *state)
|
||||
int board_tsc_setup(int minor)
|
||||
{
|
||||
#ifndef CONFIG_STMPE811_TSC_DISABLE
|
||||
FAR struct i2c_dev_s *dev;
|
||||
FAR struct i2c_master_s *dev;
|
||||
int ret;
|
||||
|
||||
idbg("minor %d\n", minor);
|
||||
|
@ -76,7 +76,7 @@
|
||||
|
||||
int stm32_bmp180initialize(FAR const char *devpath)
|
||||
{
|
||||
FAR struct i2c_dev_s *i2c;
|
||||
FAR struct i2c_master_s *i2c;
|
||||
int ret;
|
||||
|
||||
sndbg("Initializing BMP180!\n");
|
||||
|
@ -77,7 +77,7 @@
|
||||
int stm32_pca9635_initialize(void)
|
||||
{
|
||||
|
||||
FAR struct i2c_dev_s *i2c;
|
||||
FAR struct i2c_master_s *i2c;
|
||||
int ret;
|
||||
|
||||
/* Get the I2C driver that interfaces with the pca9635 (PCA9635_I2CBUS)*/
|
||||
|
@ -87,7 +87,7 @@
|
||||
|
||||
int tm4c_at24_automount(int minor)
|
||||
{
|
||||
FAR struct i2c_dev_s *i2c;
|
||||
FAR struct i2c_master_s *i2c;
|
||||
FAR struct mtd_dev_s *mtd;
|
||||
static bool initialized = false;
|
||||
int ret;
|
||||
|
@ -158,35 +158,36 @@ typedef unsigned char vsn_sif_gpio_t;
|
||||
#define VSN_SIF_ANIN_OVERSMP16
|
||||
|
||||
|
||||
struct vsn_sif_s {
|
||||
vsn_sif_state_t state; // activity
|
||||
unsigned char opencnt; // open count
|
||||
struct vsn_sif_s
|
||||
{
|
||||
vsn_sif_state_t state; /* Activity */
|
||||
unsigned char opencnt; /* Open count */
|
||||
|
||||
vsn_sif_gpio_t gpio[2];
|
||||
vsn_sif_gpio_t gpio[2];
|
||||
|
||||
unsigned char anout_opts;
|
||||
unsigned short int anout_width;
|
||||
unsigned short int anout_period; // setting it to 0, disables PWM
|
||||
unsigned short int anout_samplerate; // as written by write()
|
||||
unsigned char anout_opts;
|
||||
unsigned short int anout_width;
|
||||
unsigned short int anout_period; /* Setting it to 0, disables PWM */
|
||||
unsigned short int anout_samplerate; /* As written by write() */
|
||||
|
||||
unsigned short int anref_width;
|
||||
unsigned short int anref_period; // setting it to 0, disables PWM
|
||||
unsigned short int anref_samplerate; // as written by write()
|
||||
unsigned short int anref_width;
|
||||
unsigned short int anref_period; /* Setting it to 0, disables PWM */
|
||||
unsigned short int anref_samplerate; /* As written by write() */
|
||||
|
||||
unsigned char anin_opts;
|
||||
unsigned int anin_samplerate; // returned on read() as 16-bit results
|
||||
unsigned char anin_opts;
|
||||
unsigned int anin_samplerate; /* Returned on read() as 16-bit results */
|
||||
|
||||
/*--- Private Data ---*/
|
||||
/*--- Private Data ---*/
|
||||
|
||||
struct stm32_tim_dev_s * tim3; // Timer3 is used for PWM, and Analog RefTap
|
||||
struct stm32_tim_dev_s * tim8; // Timer8 is used for Power Switch
|
||||
struct stm32_tim_dev_s *tim3; /* Timer3 is used for PWM, and Analog RefTap */
|
||||
struct stm32_tim_dev_s *tim8; /* Timer8 is used for Power Switch */
|
||||
|
||||
struct i2c_dev_s * i2c1;
|
||||
struct i2c_dev_s * i2c2;
|
||||
struct i2c_master_s *i2c1;
|
||||
struct i2c_master_s *i2c2;
|
||||
|
||||
struct spi_dev_s * spi2;
|
||||
struct spi_dev_s *spi2;
|
||||
|
||||
sem_t exclusive_access;
|
||||
sem_t exclusive_access;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user