Skip to content

[hal] Support 16bit transfers for I2c#812

Closed
TomSaw wants to merge 1 commit intomodm-io:developfrom
TomSaw:feature/i2c-16bit-transfer
Closed

[hal] Support 16bit transfers for I2c#812
TomSaw wants to merge 1 commit intomodm-io:developfrom
TomSaw:feature/i2c-16bit-transfer

Conversation

@TomSaw
Copy link
Copy Markdown
Contributor

@TomSaw TomSaw commented Jan 12, 2022

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.

@salkinium
Copy link
Copy Markdown
Member

Would rather not introduce endianess management into the driver layer, particularly because of DMA support.

@salkinium salkinium closed this Sep 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants