Marc Bax / Mbed 2 deprecated Flexbook180111a

Dependencies:   SDFileSystem app epson mbed msp430 pl tests

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers i2c_utils.h Source File

i2c_utils.h

00001 //
00002 // Filename: i2c_utils.h
00003 //
00004 // I2C utilities.
00005 //
00006 
00007 #ifndef I2C_UTILS_H
00008 #define I2C_UTILS_H
00009 
00010 #include "mbed.h"
00011 
00012 /**
00013  * @brief Get the end of I2C address iterator.
00014  * @return One past the end of the I2C address range.
00015  */
00016 uint16_t GetAddressRangeEnd(uint16_t bits);
00017 
00018 /**
00019  * @brief Scan the I2C bus for responding devices.
00020  * Currently 7 or 10 bit address ranges are supported.
00021  * @param i2c The I2C device to use.
00022  * @param bits The number of allowed address bits.
00023  */
00024 void I2C_Scan(I2C &i2c, uint16_t bits = 7);
00025 
00026 #endif // I2C_UTILS_H