Skip to content
Snippets Groups Projects
Commit ae96279b authored by Emilio Corigliano's avatar Emilio Corigliano
Browse files

[I2C] I2CSlaveConfig now has default parameters

parent c0c732f5
No related branches found
No related tags found
No related merge requests found
...@@ -102,14 +102,19 @@ public: ...@@ -102,14 +102,19 @@ public:
*/ */
typedef struct typedef struct
{ {
uint16_t ///< Slave address without shifts:
slaveAddress; ///< Slave address without shifts (in BIT7 addressing ///< - BIT7 addressing |9-bit unused|7-bit address|
///< |9-bit unused|7-bit address|; in BIT10 ///< - BIT10 addressing |6-bit unused|10-bit address|
///< addressing |6-bit unused|10-bit address|). uint16_t slaveAddress;
I2CDriver::Addressing addressing; ///< Addressing mode of the device.
I2CDriver::Speed speed; ///< Speed mode of the communication. ///< Addressing mode of the device.
bool MSBFirst; ///< Registers with lower values are the MSB of I2CDriver::Addressing addressing = I2CDriver::Addressing::BIT7;
///< multi-byte registers
///< Speed mode of the communication.
I2CDriver::Speed speed = I2CDriver::Speed::MAX_SPEED;
///< Registers with lower values are the MSB of multi-byte registers
bool MSBFirst = false;
} I2CSlaveConfig; } I2CSlaveConfig;
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment