feat: GPIO (GIO) driver implementation and host unit tests #75
Labels
No labels
Category
App
Category
Documentation
Category
Firmware
Category
Hardware
Category
Qms
PR_Size
L
PR_Size
M
PR_Size
S
PR_Size
XL
PR_Size
XS
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Priority
Very Low Priority
Size
Epic
Size
Feature
Size
Task
Status
Blocked
Status
Draft
Status
Needs-review
Team
Board
Team
Dev
Team
Management
Type
Bug
Type
Capa
Type
Improvement
Type
New-feature
Type
Regulatory
Type
Usability
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
opendutchsolutions.public/hal_awr6843#75
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The register-description epic (#4) delivered
hal/registers/component/*.h/instance/*.hfor every peripheral, but no actual driver logic exists yet underhal/mssorhal/dss— those trees don't exist in the repo. This issue starts the HAL driver-implementation phase with the GPIO (GIO) peripheral:hal/mss/gpio/hal_gpio.c/hal_gpio.h, providing port/pin direction+pull configuration, read/write/toggle, and edge-triggered IRQ enable/priority/dispatch on top of the GIO register block.GPIO is also the proving ground for the shared host-test infrastructure every subsequent driver PR will reuse:
testing/support/fakes/registers/awr.h+testing/support/hw_fakes.c(plain read/write fake register storage that shadows the real register headers via CMake include-path ordering) and theadd_hal_unit_test()CMake helper intesting/CMakeLists.txt, plus the realhal/registers/awr.h/awr6843aop.humbrella headers the driver code includes instead of individual component/instance headers directly.Use Case / Rationale
As a firmware developer, I need a
hal_gpio_*API to configure and drive GPIO pins and dispatch port-level interrupts, instead of every caller touching GIO registers directly.As a QMS reviewer, I need driver logic backed by an automated Catch2/fff host unit test suite (register-level RMW-hazard, IRQ-decode, and critical-section-nesting regression coverage) run on every change, the same rigor already applied to the register-description epic's SVD/TI-comparison checks.
User Stories
hal_gpio_module_init()/hal_gpio_pin_init()/hal_gpio_write()/hal_gpio_toggle()/hal_gpio_read()so pin configuration and I/O don't require hand-rolled register access.hal_gpio_irq_handler(port, pin)hook that applications can override.testing/mss/unit/hal_functionality/test_gpio.c) exercising this driver against fake register storage, runnable in CI without target hardware.Acceptance Criteria
hal/mss/gpio/hal_gpio.c/hal_gpio.himplemented against this project's current (post-epic)hal/registers/component/gpio.h/instance/gpio.htesting/support/fakes/registers/awr.h,testing/support/hw_fakes.c) and the realhal/registers/awr.h/awr6843aop.humbrella headers land, covering all peripherals currently inhal/registers/componentadd_hal_unit_test()CMake helper added totesting/CMakeLists.txtand wired to build/runtest_gpio.ctesting/mss/unit/hal_functionality/test_gpio.cpasses underctestFunctional Impact
None — self-contained addition; no existing driver logic exists yet to regress.
Regulatory Impact
None
QMS Impact
None
Risk Impact
No — existing risk coverage sufficient.
Related Issues / PRs
Relates to #4