Added HangmanGame class, but does not work yet
Dependencies: SDFileSystem app epson mbed msp430 pl tests
Diff: i2c_utils.h
- Revision:
- 0:fa7450a43b99
diff -r 000000000000 -r fa7450a43b99 i2c_utils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/i2c_utils.h Mon Dec 04 09:32:20 2017 +0000 @@ -0,0 +1,26 @@ +// +// Filename: i2c_utils.h +// +// I2C utilities. +// + +#ifndef I2C_UTILS_H +#define I2C_UTILS_H + +#include "mbed.h" + +/** + * @brief Get the end of I2C address iterator. + * @return One past the end of the I2C address range. + */ +uint16_t GetAddressRangeEnd(uint16_t bits); + +/** + * @brief Scan the I2C bus for responding devices. + * Currently 7 or 10 bit address ranges are supported. + * @param i2c The I2C device to use. + * @param bits The number of allowed address bits. + */ +void I2C_Scan(I2C &i2c, uint16_t bits = 7); + +#endif // I2C_UTILS_H