mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
PR feedback
This commit is contained in:
parent
37b6fe7e98
commit
a62164acb9
@ -1,10 +0,0 @@
|
|||||||
#include <tactility/driver.h>
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
|
|
||||||
extern void register_device_drivers() {
|
|
||||||
extern Driver tlora_pager_driver;
|
|
||||||
driver_construct(&tlora_pager_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
|
extern struct Module device_module;
|
||||||
|
|
||||||
static int start(Device* device) {
|
static int start(Device* device) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -21,7 +23,8 @@ Driver tlora_pager_driver = {
|
|||||||
.stopDevice = stop,
|
.stopDevice = stop,
|
||||||
.api = nullptr,
|
.api = nullptr,
|
||||||
.deviceType = nullptr,
|
.deviceType = nullptr,
|
||||||
.internal = { 0 }
|
.owner = &device_module,
|
||||||
|
.driver_private = nullptr
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ TEST_CASE("driver_construct and driver_destruct should set and unset the correct
|
|||||||
CHECK_EQ(driver.driver_private, nullptr);
|
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 };
|
Driver driver = { 0 };
|
||||||
|
|
||||||
CHECK_EQ(driver_construct(&driver), ERROR_NONE);
|
CHECK_EQ(driver_construct(&driver), ERROR_NONE);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user