12
12
13
13
## Description
14
14
15
- This update aims at increasing tests thoroughness by enabling them to check driver's reliability for each pin declared as supporting a peripheral.
15
+ Adds board introspection capabilities and tools.
16
+ These tools will help designing better tests for the HAL.
16
17
17
18
## Motivation
18
19
@@ -24,7 +25,7 @@ At the time being, drivers are only tested on a single "default" peripheral. How
24
25
2 . We want to list all functions a pin can provide.
25
26
3 . We want to list all pins for a form-factor regardless of the function they can provide.
26
27
4 . We want a printable name for each pin and a method to get that name.
27
- 5 . We want a list the reserved pins that cannot be tested.
28
+ 5 . We want a list of the reserved pins that cannot be tested.
28
29
6 . We want to select a duplicate-free set a pin from a set of PinMap.
29
30
30
31
Any of the list mentioned above may be empty if none match the criteria.
@@ -44,7 +45,7 @@ It is proposed to introduce the following elements :
44
45
PINMAP_FORM_FACTOR_MTB,
45
46
} pinmap_form_factor_t;
46
47
47
- /// returns a static NC terminated array of pins.
48
+ /// returns a static NC terminated array of pins (or NULL if unsupported) .
48
49
const PinName * pinmap_form_factor_pins(pinmap_form_factor_t form_factor);
49
50
/// returns a static NC terminated array of pins.
50
51
const PinName * pinmap_restricted_pins();
@@ -60,7 +61,7 @@ It is proposed to introduce the following elements :
60
61
/// Typically, whitelist will be the form factor list of pins.
61
62
/// The blacklist may be a list of pins already visited and/or tied to another peripheral.
62
63
PinName pinmap_find_peripheral_pin(const PinMap *map, const PinName *whitelist,
63
- const PinName *blacklist, int per);
64
+ const PinName *blacklist, int per);
64
65
65
66
/// Verifies that `pin` is in `list`.
66
67
bool pinlist_has_pin(const PinName *list, PinName pin);
@@ -84,8 +85,8 @@ It is proposed to introduce the following elements :
84
85
For example the SPI api may be extended with :
85
86
``` c
86
87
#ifdef DEVICE_SPI_PIN_EXTENDED_SUPPORT
87
- PinMap * spi_get_mosi_pins(bool as_slave);
88
- PinMap * spi_get_miso_pins(bool as_slave);
88
+ PinMap * spi_get_mosi_pins(bool as_slave, bool is_half_duplex );
89
+ PinMap * spi_get_miso_pins(bool as_slave, bool is_half_duplex );
89
90
PinMap * spi_get_clk_pins();
90
91
PinMap * spi_get_cs_pins();
91
92
#endif
0 commit comments