Skip to content

Commit d1e9a8c

Browse files
committed
Refactor AT24Cxx, add I2c class, add pragmas
Modernize AT24Cxx EEPROM interface and I2C utilities: bump copyright year, replace hal_i2c.h with i2c.h, apply k-prefix naming for constants, and rename member variables/methods for clarity. Rewrite AT24Cxx template to use the i2c:: API (explicit constructors, renamed fields, consistent buffer handling, constexpr improvements) and fix address-size checks. Add a new I2c wrapper class to lib-gd32/include/i2c.h providing convenient read/write/register helpers and Ack/Setup helpers. Add compiler optimization pragma push/pop blocks to i2c.h and spi.h to allow per-file optimization control. Small API tweaks: explicit constructors, clearer variable names, and use of i2c speed constants.
1 parent c16887e commit d1e9a8c

3 files changed

Lines changed: 288 additions & 179 deletions

File tree

0 commit comments

Comments
 (0)