Private
Public Access
2
0

mraa: add internal mraa_find_i2c_bus function

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2015-07-10 17:52:50 +01:00
parent f5d6a6dc18
commit df0dbb0c73
4 changed files with 123 additions and 81 deletions

View File

@@ -105,6 +105,16 @@ mraa_boolean_t mraa_file_contains_both(const char* filename, const char* content
*/
mraa_boolean_t mraa_link_targets(const char* filename, const char* targetname);
/**
* helper function to find the first i2c bus containing devname starting from
* i2c-n where n is startfrom
*
* @param device name to match
* @param i2c-dev number to start search from
* @return the matching i2c-dev bus id or -1
*/
int mraa_find_i2c_bus(const char* devname, int startfrom);
#ifdef __cplusplus
}
#endif