lpc-rs / lpc8xx-hal

Hardware Abstraction Layer (HAL) for NXP LPC800 series of microcontrollers, written in the Rust programming language
BSD Zero Clause License
31 stars 8 forks source link

I2C: Improve example #103

Closed hannobraun closed 4 years ago

hannobraun commented 6 years ago
hannobraun commented 4 years ago

There's an example that reads/writes multiple bytes now: https://github.com/lpc-rs/lpc8xx-hal/blob/8d0c46d4825fe7f0c37805d23a9b7b7dd61b7a64/examples/i2c_eeprom.rs

Updated the issue description.

hannobraun commented 4 years ago

I just realized that using multiple I2C instances with the same pin is not possible, as I2C uses the same pin for both input and output, and we can't assign multiple output functions to the same pin.

Something like that should be possible with SPI though, although I haven't reviewed this in detail.