diff options
author | Sebastian Muszytowski <sebastian@muszytowski.net> | 2016-01-24 22:33:26 +0100 |
---|---|---|
committer | Sebastian Muszytowski <sebastian@muszytowski.net> | 2016-01-24 22:33:26 +0100 |
commit | 55da79c69f302cd86f0776e127daae0a12f557d4 (patch) | |
tree | 952d9b9ce31341fd91914ed82a103c79ff6e1504 /src | |
parent | d6b2c7707b92f6daada2577dac51ba226f7b5046 (diff) |
some documentation to ease my understanding in the future
Diffstat (limited to 'src')
-rw-r--r-- | src/i2c.cc | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -21,6 +21,14 @@ void I2C::enable() // TODO Everything[tm] (error handling and generic code) // Also TODO: Use interrupts instead of polling +/* + * This method encapsules both, transmit and read into one function. + * Although it could be split into read/write, all reads require a transmit. + * Hence this approach reduces code duplication. + * + * num_tx, num_rx = number of byte to transmit/receive + * txbuf, rxbuf = pointer to the uint8_t array for tx/rx + */ void I2C::xmit(int num_tx, int num_rx, uint8_t *txbuf, uint8_t *rxbuf) { int i; |