Create hal-device module, fix GPIO, fix tests, fix TactilityC (#471)
* **New Features** * Added a HAL device module providing device enumeration, type queries and a HAL↔kernel bridge. * **Improvements** * Integrated HAL module into startup; standardized module names, includes and lifecycle logging; safer file append behavior; broader build support. * **API Changes** * Driver lifecycle now uses explicit add/remove semantics; C and HAL device type/lookup APIs clarified. * **Chores** * Added module README and Apache‑2.0 license; updated build configuration to include the new module. * **Fixes** * Updated tests and object file handling to behave correctly.
This commit is contained in:
committed by
GitHub
parent
5993ceb232
commit
3fe1dc0312
@@ -22,7 +22,7 @@ static DeviceVector createDevices() {
|
||||
auto tca8418 = std::make_shared<Tca8418>(I2C_NUM_0);
|
||||
auto keyboard = std::make_shared<TpagerKeyboard>(tca8418);
|
||||
|
||||
return std::vector<std::shared_ptr<Device>> {
|
||||
return std::vector<std::shared_ptr<tt::hal::Device>> {
|
||||
tca8418,
|
||||
std::make_shared<Bq25896>(I2C_NUM_0),
|
||||
bq27220,
|
||||
|
||||
@@ -9,14 +9,14 @@ extern Driver tlora_pager_driver;
|
||||
static error_t start() {
|
||||
/* We crash when construct fails, because if a single driver fails to construct,
|
||||
* there is no guarantee that the previously constructed drivers can be destroyed */
|
||||
check(driver_construct(&tlora_pager_driver) == ERROR_NONE);
|
||||
check(driver_construct_add(&tlora_pager_driver) == ERROR_NONE);
|
||||
return ERROR_NONE;
|
||||
}
|
||||
|
||||
static error_t stop() {
|
||||
/* We crash when destruct fails, because if a single driver fails to destruct,
|
||||
* there is no guarantee that the previously destroyed drivers can be recovered */
|
||||
check(driver_destruct(&tlora_pager_driver) == ERROR_NONE);
|
||||
check(driver_remove_destruct(&tlora_pager_driver) == ERROR_NONE);
|
||||
return ERROR_NONE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user