setup driver
This commit is contained in:
parent
a5411c45f5
commit
6723c6343a
@ -2,3 +2,5 @@ idf_component_register(
|
|||||||
SRCS "blk_box.cpp"
|
SRCS "blk_box.cpp"
|
||||||
INCLUDE_DIRS "include"
|
INCLUDE_DIRS "include"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_subdirectory(drivers)
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
#include <stdio.h>
|
|
||||||
#include "blk_box.h"
|
#include "blk_box.h"
|
||||||
|
|
||||||
const char* get_hello_world() {
|
void init_blk_box(BlkBoxInitConfig cfg) {
|
||||||
return "hello, world!";
|
|
||||||
}
|
}
|
||||||
5
drivers/CMakeLists.txt
Normal file
5
drivers/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
set(SOURCES
|
||||||
|
"i2c.cpp"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_sources(${COMPONENT_LIB} PRIVATE ${SOURCES})
|
||||||
5
drivers/i2c.cpp
Normal file
5
drivers/i2c.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#include "stdio.h"
|
||||||
|
|
||||||
|
void i2c_test() {
|
||||||
|
printf("initializing i2c or something\n");
|
||||||
|
}
|
||||||
@ -1 +1,7 @@
|
|||||||
const char* get_hello_world();
|
struct BlkBoxInitConfig {
|
||||||
|
// nothing for now...
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void init_blk_box(BlkBoxInitConfig cfg);
|
||||||
|
|||||||
1
include/blk_box_drivers/i2c.h
Normal file
1
include/blk_box_drivers/i2c.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
void i2c_test();
|
||||||
Loading…
Reference in New Issue
Block a user