Move I2C into a separate component.
This commit is contained in:
4
esp/cpp/08_dht11-lcd/.gitignore
vendored
Normal file
4
esp/cpp/08_dht11-lcd/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
build
|
||||
managed_components
|
||||
dependencies.lock
|
||||
sdkconfig.old
|
||||
@@ -1,7 +1,6 @@
|
||||
idf_component_register(
|
||||
SRCS
|
||||
main.cpp
|
||||
main.h i2c.h
|
||||
main.h
|
||||
INCLUDE_DIRS .
|
||||
REQUIRES driver
|
||||
)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
## IDF Component Manager Manifest File
|
||||
dependencies:
|
||||
idf: '>=5.3.0'
|
||||
idf: '>=5.3.0'
|
||||
i2c:
|
||||
path: ../../components/i2c
|
||||
@@ -13,10 +13,8 @@
|
||||
#define PIN_SCL GPIO_NUM_22
|
||||
#define PIN_RST (-1)
|
||||
|
||||
I2C i2c(PIN_SDA, PIN_SCL, PIN_RST);
|
||||
|
||||
extern "C" void app_main(void)
|
||||
{
|
||||
|
||||
init_i2c(PIN_SDA, PIN_SCL);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user