expander work
This commit is contained in:
+21
-3
@@ -1,5 +1,23 @@
|
||||
#include "stdio.h"
|
||||
#include "blk_box_drivers/i2c.h"
|
||||
|
||||
void i2c_test() {
|
||||
printf("initializing i2c or something\n");
|
||||
#include "pins.h"
|
||||
|
||||
i2c_master_bus_handle_t i2c_main_bus_handle;
|
||||
|
||||
void init_main_i2c() {
|
||||
i2c_master_bus_config_t bus_config = {
|
||||
.i2c_port = MAIN_I2C_NUM,
|
||||
.sda_io_num = PIN_SDA,
|
||||
.scl_io_num = PIN_SCL,
|
||||
.clk_source = I2C_CLK_SRC_DEFAULT,
|
||||
.glitch_ignore_cnt = 7,
|
||||
.intr_priority = 0,
|
||||
.trans_queue_depth = 0,
|
||||
.flags = {
|
||||
.enable_internal_pullup = false,
|
||||
.allow_pd = false,
|
||||
}
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(i2c_new_master_bus(&bus_config, &i2c_main_bus_handle));
|
||||
}
|
||||
Reference in New Issue
Block a user