diff --git a/Devices/lilygo-tlora-pager/Source/Drivers.cpp b/Devices/lilygo-tlora-pager/Source/Drivers.cpp deleted file mode 100644 index 3da59c43..00000000 --- a/Devices/lilygo-tlora-pager/Source/Drivers.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include - -extern "C" { - -extern void register_device_drivers() { - extern Driver tlora_pager_driver; - driver_construct(&tlora_pager_driver); -} - -} diff --git a/Devices/lilygo-tlora-pager/Source/drivers/TloraPager.cpp b/Devices/lilygo-tlora-pager/Source/drivers/TloraPager.cpp index 0ff150c0..a333957a 100644 --- a/Devices/lilygo-tlora-pager/Source/drivers/TloraPager.cpp +++ b/Devices/lilygo-tlora-pager/Source/drivers/TloraPager.cpp @@ -6,6 +6,8 @@ extern "C" { +extern struct Module device_module; + static int start(Device* device) { return 0; } @@ -21,7 +23,8 @@ Driver tlora_pager_driver = { .stopDevice = stop, .api = nullptr, .deviceType = nullptr, - .internal = { 0 } + .owner = &device_module, + .driver_private = nullptr }; } diff --git a/Tests/TactilityKernel/DriverTest.cpp b/Tests/TactilityKernel/DriverTest.cpp index 82cb227b..0876f4c6 100644 --- a/Tests/TactilityKernel/DriverTest.cpp +++ b/Tests/TactilityKernel/DriverTest.cpp @@ -19,7 +19,7 @@ TEST_CASE("driver_construct and driver_destruct should set and unset the correct CHECK_EQ(driver.driver_private, nullptr); } -TEST_CASE("a driver without a module should not be destrucable") { +TEST_CASE("a driver without a module should not be destructible") { Driver driver = { 0 }; CHECK_EQ(driver_construct(&driver), ERROR_NONE);