Error as described in MBs email to MS
Dependencies: SDFileSystem app epson mbed msp430 pl tests
i2c_utils.h@1:5874c1a074a7, 2018-01-11 (annotated)
- Committer:
- marcbax
- Date:
- Thu Jan 11 14:12:00 2018 +0000
- Revision:
- 1:5874c1a074a7
- Parent:
- 0:c643d398cdb6
Version 180111a with error as reported to Mark Symonds
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
marcbax | 0:c643d398cdb6 | 1 | // |
marcbax | 0:c643d398cdb6 | 2 | // Filename: i2c_utils.h |
marcbax | 0:c643d398cdb6 | 3 | // |
marcbax | 0:c643d398cdb6 | 4 | // I2C utilities. |
marcbax | 0:c643d398cdb6 | 5 | // |
marcbax | 0:c643d398cdb6 | 6 | |
marcbax | 0:c643d398cdb6 | 7 | #ifndef I2C_UTILS_H |
marcbax | 0:c643d398cdb6 | 8 | #define I2C_UTILS_H |
marcbax | 0:c643d398cdb6 | 9 | |
marcbax | 0:c643d398cdb6 | 10 | #include "mbed.h" |
marcbax | 0:c643d398cdb6 | 11 | |
marcbax | 0:c643d398cdb6 | 12 | /** |
marcbax | 0:c643d398cdb6 | 13 | * @brief Get the end of I2C address iterator. |
marcbax | 0:c643d398cdb6 | 14 | * @return One past the end of the I2C address range. |
marcbax | 0:c643d398cdb6 | 15 | */ |
marcbax | 0:c643d398cdb6 | 16 | uint16_t GetAddressRangeEnd(uint16_t bits); |
marcbax | 0:c643d398cdb6 | 17 | |
marcbax | 0:c643d398cdb6 | 18 | /** |
marcbax | 0:c643d398cdb6 | 19 | * @brief Scan the I2C bus for responding devices. |
marcbax | 0:c643d398cdb6 | 20 | * Currently 7 or 10 bit address ranges are supported. |
marcbax | 0:c643d398cdb6 | 21 | * @param i2c The I2C device to use. |
marcbax | 0:c643d398cdb6 | 22 | * @param bits The number of allowed address bits. |
marcbax | 0:c643d398cdb6 | 23 | */ |
marcbax | 0:c643d398cdb6 | 24 | void I2C_Scan(I2C &i2c, uint16_t bits = 7); |
marcbax | 0:c643d398cdb6 | 25 | |
marcbax | 0:c643d398cdb6 | 26 | #endif // I2C_UTILS_H |