Lines Matching refs:bus
72 mraa_i2c_init_internal(mraa_adv_func_t* advance_func, unsigned int bus) in mraa_i2c_init_internal() argument
86 dev->busnum = bus; in mraa_i2c_init_internal()
89 status = advance_func->i2c_init_pre(bus); in mraa_i2c_init_internal()
100 snprintf(filepath, 32, "/dev/i2c-%u", bus); in mraa_i2c_init_internal()
132 mraa_i2c_init(int bus) in mraa_i2c_init() argument
140 if (mraa_is_sub_platform_id(bus)) { in mraa_i2c_init()
147 bus = mraa_get_sub_platform_index(bus); in mraa_i2c_init()
149 syslog(LOG_NOTICE, "i2c: Selected bus %d", bus); in mraa_i2c_init()
155 if (bus >= board->i2c_bus_count) { in mraa_i2c_init()
160 if (board->i2c_bus[bus].bus_id == -1) { in mraa_i2c_init()
162 bus = board->def_i2c_bus; in mraa_i2c_init()
165 int pos = board->i2c_bus[bus].sda; in mraa_i2c_init()
173 pos = board->i2c_bus[bus].scl; in mraa_i2c_init()
182 return mraa_i2c_init_internal(board->adv_func, (unsigned int) board->i2c_bus[bus].bus_id); in mraa_i2c_init()
187 mraa_i2c_init_raw(unsigned int bus) in mraa_i2c_init_raw() argument
189 return mraa_i2c_init_internal(plat == NULL ? NULL : plat->adv_func, bus); in mraa_i2c_init_raw()