paper_trail icon indicating copy to clipboard operation
paper_trail copied to clipboard

[hal] Support 16bit transfers for I2c

Open TomSaw opened this issue 3 years ago • 0 comments

I like the idea of moving 16bit treatment from drivers to Hal. Dozens of I2c-drivers contain endian sanities (more or less any call of 'modm::BigEndian()' in src/modm/driver/** ) before or after talking to I2c.

point_right In addition to cleaner code we gain slightly shrinked compilate and slightly improved performance because data >> 8 in Hal is cheaper than modm::fromBigendian(data) in Drivers.

Same currently happens with Spi #690 I2c is a little more tricky so i postpone this and concentrate on merging #665 first.

TomSaw avatar Jan 12 '22 16:01 TomSaw