This commit is contained in:
Tomasz Duda 2024-10-01 16:03:50 +02:00
parent 727846b216
commit 46b6ca0f02
2 changed files with 4 additions and 2 deletions

View file

@ -42,3 +42,5 @@ CONFIG_SCHEMA = cv.All(
async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
await cg.register_component(var, config)
cg.add_build_flag("-Wl,--wrap=tud_mount_cb")
cg.add_build_flag("-Wl,--wrap=tud_umount_cb")

View file

@ -7,11 +7,11 @@
extern "C" {
bool configured;
void tud_mount_cb(void){
void __wrap_tud_mount_cb(void){
configured = true;
}
void tud_umount_cb(void){
void __wrap_tud_umount_cb(void){
configured = false;
}