I2C. Revert const qualifier to the pointer to I2CSlaveConfig.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3310 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
7148a664b5
commit
d3e15bccfc
|
@ -105,7 +105,7 @@ typedef enum {
|
||||||
* @param[in] i2cscfg pointer to the @p I2CSlaveConfig object triggering the
|
* @param[in] i2cscfg pointer to the @p I2CSlaveConfig object triggering the
|
||||||
* callback
|
* callback
|
||||||
*/
|
*/
|
||||||
typedef void (*i2ccallback_t)(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg);
|
typedef void (*i2ccallback_t)(I2CDriver *i2cp, const I2CSlaveConfig *i2cscfg);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -116,7 +116,8 @@ typedef void (*i2ccallback_t)(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg);
|
||||||
* @param[in] i2cscfg pointer to the @p I2CSlaveConfig object triggering the
|
* @param[in] i2cscfg pointer to the @p I2CSlaveConfig object triggering the
|
||||||
* callback
|
* callback
|
||||||
*/
|
*/
|
||||||
typedef void (*i2cerrorcallback_t)(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg);
|
typedef void (*i2cerrorcallback_t)(I2CDriver *i2cp,
|
||||||
|
const I2CSlaveConfig *i2cscfg);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -255,11 +256,11 @@ extern "C" {
|
||||||
void i2cObjectInit(I2CDriver *i2cp);
|
void i2cObjectInit(I2CDriver *i2cp);
|
||||||
void i2cStart(I2CDriver *i2cp, const I2CConfig *config);
|
void i2cStart(I2CDriver *i2cp, const I2CConfig *config);
|
||||||
void i2cStop(I2CDriver *i2cp);
|
void i2cStop(I2CDriver *i2cp);
|
||||||
void i2cMasterTransmit(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg,
|
void i2cMasterTransmit(I2CDriver *i2cp, const I2CSlaveConfig *i2cscfg,
|
||||||
uint16_t slave_addr,
|
uint16_t slave_addr,
|
||||||
uint8_t *txbuf, size_t txbytes,
|
uint8_t *txbuf, size_t txbytes,
|
||||||
uint8_t *rxbuf, size_t rxbytes);
|
uint8_t *rxbuf, size_t rxbytes);
|
||||||
void i2cMasterReceive(I2CDriver *i2cp, I2CSlaveConfig *i2cscfg,
|
void i2cMasterReceive(I2CDriver *i2cp, const I2CSlaveConfig *i2cscfg,
|
||||||
uint16_t slave_addr, uint8_t *rxbuf, size_t rxbytes);
|
uint16_t slave_addr, uint8_t *rxbuf, size_t rxbytes);
|
||||||
void i2cMasterStart(I2CDriver *i2cp);
|
void i2cMasterStart(I2CDriver *i2cp);
|
||||||
void i2cMasterStop(I2CDriver *i2cp);
|
void i2cMasterStop(I2CDriver *i2cp);
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
* Note:
|
* Note:
|
||||||
* When the STOP, START or PEC bit is set, the software must NOT perform
|
* When the STOP, START or PEC bit is set, the software must NOT perform
|
||||||
* any write access to I2C_CR1 before this bit is cleared by hardware.
|
* any write access to I2C_CR1 before this bit is cleared by hardware.
|
||||||
* Otherwise there is a risk of setting a second STOP, START or PEC request.
|
* Otherwise there is a risk of setting a second STOP, START or PEC request.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
|
@ -212,7 +212,7 @@ struct I2CDriver{
|
||||||
/**
|
/**
|
||||||
* @brief Current slave configuration data.
|
* @brief Current slave configuration data.
|
||||||
*/
|
*/
|
||||||
I2CSlaveConfig *id_slave_config;
|
const I2CSlaveConfig *id_slave_config;
|
||||||
|
|
||||||
__IO size_t txbytes; /*!< @brief Number of bytes to be transmitted. */
|
__IO size_t txbytes; /*!< @brief Number of bytes to be transmitted. */
|
||||||
__IO size_t rxbytes; /*!< @brief Number of bytes to be received. */
|
__IO size_t rxbytes; /*!< @brief Number of bytes to be received. */
|
||||||
|
|
|
@ -166,7 +166,7 @@ void i2cStop(I2CDriver *i2cp) {
|
||||||
* you want transmit only
|
* you want transmit only
|
||||||
*/
|
*/
|
||||||
void i2cMasterTransmit(I2CDriver *i2cp,
|
void i2cMasterTransmit(I2CDriver *i2cp,
|
||||||
I2CSlaveConfig *i2cscfg,
|
const I2CSlaveConfig *i2cscfg,
|
||||||
uint16_t slave_addr,
|
uint16_t slave_addr,
|
||||||
uint8_t *txbuf,
|
uint8_t *txbuf,
|
||||||
size_t txbytes,
|
size_t txbytes,
|
||||||
|
@ -210,7 +210,7 @@ void i2cMasterTransmit(I2CDriver *i2cp,
|
||||||
* @param[in] rxbuf pointer to receive buffer
|
* @param[in] rxbuf pointer to receive buffer
|
||||||
*/
|
*/
|
||||||
void i2cMasterReceive(I2CDriver *i2cp,
|
void i2cMasterReceive(I2CDriver *i2cp,
|
||||||
I2CSlaveConfig *i2cscfg,
|
const I2CSlaveConfig *i2cscfg,
|
||||||
uint16_t slave_addr,
|
uint16_t slave_addr,
|
||||||
uint8_t *rxbuf,
|
uint8_t *rxbuf,
|
||||||
size_t rxbytes){
|
size_t rxbytes){
|
||||||
|
|
Loading…
Reference in New Issue