drivers/i2c: optimized I2C periph driver interface#3929
drivers/i2c: optimized I2C periph driver interface#3929PeterKietzmann merged 1 commit intoRIOT-OS:masterfrom
Conversation
- added SPI_DEV and SPI_UNDEF macros - made types and speed values overritable by CPU - moved old device enum to dev_enums.h - reformatted a little bit to comply to 80 char line length
|
SPI_DEV, SPI_UNDEF? |
|
Those macros are very handy when it comes to writing tests or similar: Say your CPU defines The undefined value is useful for situations, where you could have an optional i2c parameter in a function. You could for example write a device driver, that can use either I2C or SPI and the driver can chose on runtime by the given parameters which mode it will use... |
|
sorry, I was just remarking on the use of the term SPI inside the message of the I2C commit. I agree with you that this is a useful improvement to the API. |
ups, now I got it :-) Thx! Yepp, lets get the release out of the door and then get those updated periph APIs merged, next in line is than re-visiting the power management concepts :-) |
|
@haukepetersen sounds like a good plan forward! |
|
Seems reasonable to me. I will test it in the next week, just to be on the safe side. But we wanted to wait until the release is out anyway... |
|
Tested with samr21-xpro and srf02 ultrasonic sensor (i2c) and works. So ACK (after Travis is fine some day) |
|
And go |
drivers/i2c: optimized I2C periph driver interface
Found this when going through my branches...
Changed by this PR: