]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
feat: HAL Device Driver API — driver registry with probe/init/shutdown lifecycle
authorTulio A M Mendes <[email protected]>
Fri, 13 Feb 2026 19:54:47 +0000 (16:54 -0300)
committerTulio A M Mendes <[email protected]>
Fri, 13 Feb 2026 19:54:47 +0000 (16:54 -0300)
commitf57c5dbab9279512c6d923df720b0832e3c402ad
tree655f2cf4752aa947a32619852c14d663edcd37f0
parent331e9b0973e9f6c719eb6a1187e557adf3a7626e
feat: HAL Device Driver API — driver registry with probe/init/shutdown lifecycle

- Add include/hal/driver.h: struct hal_driver with type, priority, ops (probe/init/shutdown)
- Add src/kernel/driver.c: driver registry with hal_driver_register(), hal_drivers_init_all(),
  hal_drivers_shutdown_all(), hal_driver_find(), hal_driver_count()
- Drivers init in priority order (insertion sort), shutdown in reverse
- HAL_MAX_DRIVERS=32, 6 driver types: PLATFORM, CHAR, BLOCK, NET, DISPLAY, BUS
- Framework ready for existing drivers to self-register (incremental migration)

20/20 smoke, cppcheck clean
include/hal/driver.h [new file with mode: 0644]
src/kernel/driver.c [new file with mode: 0644]