1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-18 19:13:51 +01:00
Gilles DOFFE ebf95d2545 cpu/native: enhance GPIO mocking with 2D array representation
This commit introduces a more robust GPIO mocking mechanism by utilizing
a 2-dimensional array. Each element of the array holds a gpio_mock_t
structure describing a pin's attributes such as value, mode, flank,
interruption callback, and callback argument.

This enhancement allows for the arbitrary simulation of GPIOs across
various microcontroller architectures using the current API, while
maintaining consistency through the use of the GPIO_PIN macro.

Additionally, it should be noted that only the maximum number of ports
and maximum number of pins can be altered according to the context.

The implemented API in gpio_mock.c remains rudimentary, providing no
validation but fulfilling the required functions. However, it remains
customizable as all its functions are marked as weak.

Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
2024-03-24 23:12:24 +01:00
..
2024-02-05 22:01:40 +01:00
2024-01-30 16:33:19 +01:00
2018-06-11 19:12:02 +02:00