The I2C_TRANSFER method is no longer optional
This commit is contained in:
parent
9370b94241
commit
10000841a8
2
arch
2
arch
@ -1 +1 @@
|
||||
Subproject commit fe82498fb11af76d0bda08c4fd969f4e5b60de0a
|
||||
Subproject commit f8825890e59d946bfffaf68e93ed5ecabebc5f04
|
2
configs
2
configs
@ -1 +1 @@
|
||||
Subproject commit 446de79f4904d30bd0f4a787b36775f2ccf65902
|
||||
Subproject commit 13a5278c9df0652122ecf6f458cab9fdf4d883b7
|
@ -9,10 +9,6 @@ config I2C_SLAVE
|
||||
bool "I2C Slave"
|
||||
default n
|
||||
|
||||
config I2C_TRANSFER
|
||||
bool "Support the I2C transfer() method"
|
||||
default n
|
||||
|
||||
config I2C_POLLED
|
||||
bool "Polled I2C (no interrupts)"
|
||||
default n
|
||||
|
@ -37,9 +37,7 @@
|
||||
|
||||
ifeq ($(CONFIG_I2C),y)
|
||||
|
||||
ifeq ($(CONFIG_I2C_TRANSFER),y)
|
||||
CSRCS += i2c_read.c i2c_write.c i2c_writeread.c
|
||||
endif
|
||||
CSRCS += i2c_read.c i2c_write.c i2c_writeread.c
|
||||
|
||||
# Include I2C device driver build support
|
||||
|
||||
|
@ -43,8 +43,6 @@
|
||||
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
|
||||
#if defined(CONFIG_I2C_TRANSFER)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -96,4 +94,3 @@ int i2c_read(FAR struct i2c_master_s *dev,
|
||||
return I2C_TRANSFER(dev, &msg, 1);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_I2C_TRANSFER */
|
@ -43,8 +43,6 @@
|
||||
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
|
||||
#if defined(CONFIG_I2C_TRANSFER)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -91,4 +89,3 @@ int i2c_write(FAR struct i2c_master_s *dev,
|
||||
return I2C_TRANSFER(dev, &msg, 1);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_I2C_TRANSFER */
|
@ -43,8 +43,6 @@
|
||||
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
|
||||
#if defined(CONFIG_I2C_TRANSFER)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -117,4 +115,3 @@ int i2c_writeread(FAR struct i2c_master_s *dev,
|
||||
return I2C_TRANSFER(dev, msg, 2);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_I2C_TRANSFER */
|
@ -64,10 +64,6 @@
|
||||
# warning I2C support is required (CONFIG_I2C)
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_I2C_TRANSFER
|
||||
# warning Support of the I2C transfer() method is required (CONFIG_I2C_TRANSFER)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
@ -63,8 +63,6 @@
|
||||
/* Prerequisites:
|
||||
* CONFIG_I2C
|
||||
* I2C support is required
|
||||
* CONFIG_I2C_TRANSFER
|
||||
* Support for the I2C transfer method is required.
|
||||
* CONFIG_IOEXPANDER
|
||||
* Enables support for the PCA9555 I/O expander
|
||||
*
|
||||
|
@ -49,7 +49,7 @@
|
||||
#include <nuttx/i2c/i2c_master.h>
|
||||
#include <nuttx/sensors/lis331dl.h>
|
||||
|
||||
#if defined(CONFIG_I2C) && defined(CONFIG_I2C_TRANSFER) && defined(CONFIG_LIS331DL)
|
||||
#if defined(CONFIG_I2C) && defined(CONFIG_LIS331DL)
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@ -377,4 +377,4 @@ lis331dl_getreadings(FAR struct lis331dl_dev_s * dev)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_I2C && CONFIG_I2C_TRANSFER && CONFIG_LIS331DL */
|
||||
#endif /* CONFIG_I2C && CONFIG_LIS331DL */
|
||||
|
@ -66,10 +66,6 @@
|
||||
# error CONFIG_RTC_HIRES must NOT be set with this driver
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_I2C_TRANSFER
|
||||
# error CONFIG_I2C_TRANSFER is required by this driver
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DS3231_I2C_FREQUENCY
|
||||
# error CONFIG_DS3231_I2C_FREQUENCY is not configured
|
||||
# define CONFIG_DS3231_I2C_FREQUENCY 400000
|
||||
|
@ -66,10 +66,6 @@
|
||||
# error CONFIG_RTC_HIRES must NOT be set with this driver
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_I2C_TRANSFER
|
||||
# error CONFIG_I2C_TRANSFER is required by this driver
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_PCF85263_I2C_FREQUENCY
|
||||
# error CONFIG_PCF85263_I2C_FREQUENCY is not configured
|
||||
# define CONFIG_PCF85263_I2C_FREQUENCY 400000
|
||||
|
@ -84,10 +84,6 @@
|
||||
# error CONFIG_I2C is required by the WM8904 driver
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_I2C_TRANSFER
|
||||
# error CONFIG_I2C_TRANSFER is required in the I2C configuration
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_SCHED_WORKQUEUE
|
||||
# error CONFIG_SCHED_WORKQUEUE is required by the WM8904 driver
|
||||
#endif
|
||||
|
@ -196,10 +196,8 @@ struct i2c_ops_s
|
||||
int buflen);
|
||||
int (*read)(FAR struct i2c_master_s *dev, FAR uint8_t *buffer,
|
||||
int buflen);
|
||||
#ifdef CONFIG_I2C_TRANSFER
|
||||
int (*transfer)(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s *msgs,
|
||||
int count);
|
||||
#endif
|
||||
};
|
||||
|
||||
/* This structure contains the full state of I2C as needed for a specific
|
||||
@ -318,11 +316,9 @@ int up_i2creset(FAR struct i2c_master_s *dev);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_TRANSFER
|
||||
int i2c_writeread(FAR struct i2c_master_s *dev, FAR const struct i2c_config_s *config,
|
||||
FAR const uint8_t *wbuffer, int wbuflen,
|
||||
FAR uint8_t *rbuffer, int rbuflen);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: i2c_write
|
||||
@ -343,10 +339,8 @@ int i2c_writeread(FAR struct i2c_master_s *dev, FAR const struct i2c_config_s *c
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_TRANSFER
|
||||
int i2c_write(FAR struct i2c_master_s *dev, FAR const struct i2c_config_s *config,
|
||||
FAR const uint8_t *buffer, int buflen);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: i2c_read
|
||||
@ -367,10 +361,8 @@ int i2c_write(FAR struct i2c_master_s *dev, FAR const struct i2c_config_s *confi
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_TRANSFER
|
||||
int i2c_read(FAR struct i2c_master_s *dev, FAR const struct i2c_config_s *config,
|
||||
FAR uint8_t *buffer, int buflen);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
|
@ -87,10 +87,6 @@
|
||||
* in getting the right configuration.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_I2C_TRANSFER
|
||||
# error "CONFIG_I2C_TRANSFER is required in the I2C configuration"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DISABLE_SIGNALS
|
||||
# error "Signals are required. CONFIG_DISABLE_SIGNALS must not be selected."
|
||||
#endif
|
||||
|
@ -121,9 +121,6 @@
|
||||
# ifndef CONFIG_I2C
|
||||
# error "CONFIG_I2C is required in the I2C support"
|
||||
# endif
|
||||
# ifndef CONFIG_I2C_TRANSFER
|
||||
# error "CONFIG_I2C_TRANSFER is required in the I2C configuration"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DISABLE_SIGNALS
|
||||
|
@ -69,10 +69,6 @@
|
||||
* in getting the right configuration.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_I2C_TRANSFER
|
||||
# error "CONFIG_I2C_TRANSFER is required in the I2C configuration"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DISABLE_SIGNALS
|
||||
# error "Signals are required. CONFIG_DISABLE_SIGNALS must not be selected."
|
||||
#endif
|
||||
|
@ -118,10 +118,6 @@
|
||||
|
||||
#ifdef CONFIG_LCD_SSD1306_I2C
|
||||
|
||||
#ifndef CONFIG_I2C_TRANSFER
|
||||
# error "CONFIG_I2C_TRANSFER must be defined in your NuttX configuration"
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_SSD1306_I2CADDR
|
||||
# define CONFIG_SSD1306_I2CADDR 0x78 /* 120 in decimal */
|
||||
#endif
|
||||
|
@ -97,9 +97,6 @@
|
||||
# ifndef CONFIG_I2C
|
||||
# error "CONFIG_I2C is required in the I2C support"
|
||||
# endif
|
||||
# ifndef CONFIG_I2C_TRANSFER
|
||||
# error "CONFIG_I2C_TRANSFER is required in the I2C configuration"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* I2C **************************************************************************************/
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include <nuttx/config.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#if defined(CONFIG_I2C) && defined(CONFIG_I2C_TRANSFER) && defined(CONFIG_LIS331DL)
|
||||
#if defined(CONFIG_I2C) && defined(CONFIG_LIS331DL)
|
||||
|
||||
/************************************************************************************
|
||||
* Pre-Processor Declarations
|
||||
@ -208,5 +208,5 @@ FAR const struct lis331dl_vector_s *
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* CONFIG_I2C && CONFIG_I2C_TRANSFER && CONFIG_LIS331DL */
|
||||
#endif /* CONFIG_I2C && CONFIG_LIS331DL */
|
||||
#endif /* __INCLUDE_NUTTX_SENSORS_LIS331DL_H */
|
||||
|
@ -54,10 +54,6 @@
|
||||
|
||||
#ifndef CONFIG_I2C
|
||||
# error I2C driver support is required (CONFIG_I2C)
|
||||
#else
|
||||
# ifndef CONFIG_I2C_TRANSFER
|
||||
# error I2C transfer method is required (CONFIG_I2C_TRANSFER)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_TIMERS_CS2100CP_CLKINBW
|
||||
|
Loading…
x
Reference in New Issue
Block a user