Compare commits
1
Commits
ff131d92a1
...
8af5afd00d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8af5afd00d |
@@ -25,6 +25,17 @@ struct I2c {
|
||||
return Driver::write(data);
|
||||
}
|
||||
|
||||
template <size_t Bytes>
|
||||
static bool writeBytes(const uint8_t *buffer)
|
||||
{
|
||||
for (size_t i = 0; i < Bytes; ++i) {
|
||||
if (!write(buffer[i]))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
template <bool LastByte = false>
|
||||
static uint8_t read()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user