Hey all, I've been tossing around the idea creating a "Nim-ified" API for SPI & I2C device access. Ideally this would be "cross-platform" API targeted for generic devices similar to Arduino's Wire.h or SPI.h. Any other thoughts people would have on a good API to start from? I know there's a couple of i2c/spi implementations out there for specific systems.
The main high style difference I can think is essentially to use one of: var myTemp: I2CDev = newI2cDev() # using type and overloading `write` proc: myTemp.write(0xA,0xB) # or use C style prefixes: myTemp.i2c_write(0xA,0xB) Run Another important questions, would it make sense to define the interface using a concept? I'm still a bit unclear what the best(preferred?) technique is in Nim for defining a generic API that different packages can implement.