mirror of https://github.com/ARMmbed/mbed-os.git
update according to @bulislaw 's review
parent
860e536d71
commit
852749c92c
|
|
@ -12,7 +12,8 @@
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
This update aims at increasing tests thoroughness by enabling them to check driver's reliability for each pin declared as supporting a peripheral.
|
Adds board introspection capabilities and tools.
|
||||||
|
These tools will help designing better tests for the HAL.
|
||||||
|
|
||||||
## Motivation
|
## Motivation
|
||||||
|
|
||||||
|
|
@ -24,7 +25,7 @@ At the time being, drivers are only tested on a single "default" peripheral. How
|
||||||
2. We want to list all functions a pin can provide.
|
2. We want to list all functions a pin can provide.
|
||||||
3. We want to list all pins for a form-factor regardless of the function they can provide.
|
3. We want to list all pins for a form-factor regardless of the function they can provide.
|
||||||
4. We want a printable name for each pin and a method to get that name.
|
4. We want a printable name for each pin and a method to get that name.
|
||||||
5. We want a list the reserved pins that cannot be tested.
|
5. We want a list of the reserved pins that cannot be tested.
|
||||||
6. We want to select a duplicate-free set a pin from a set of PinMap.
|
6. We want to select a duplicate-free set a pin from a set of PinMap.
|
||||||
|
|
||||||
Any of the list mentioned above may be empty if none match the criteria.
|
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 :
|
||||||
PINMAP_FORM_FACTOR_MTB,
|
PINMAP_FORM_FACTOR_MTB,
|
||||||
} pinmap_form_factor_t;
|
} pinmap_form_factor_t;
|
||||||
|
|
||||||
/// returns a static NC terminated array of pins.
|
/// returns a static NC terminated array of pins (or NULL if unsupported).
|
||||||
const PinName *pinmap_form_factor_pins(pinmap_form_factor_t form_factor);
|
const PinName *pinmap_form_factor_pins(pinmap_form_factor_t form_factor);
|
||||||
/// returns a static NC terminated array of pins.
|
/// returns a static NC terminated array of pins.
|
||||||
const PinName *pinmap_restricted_pins();
|
const PinName *pinmap_restricted_pins();
|
||||||
|
|
@ -84,8 +85,8 @@ It is proposed to introduce the following elements :
|
||||||
For example the SPI api may be extended with :
|
For example the SPI api may be extended with :
|
||||||
```c
|
```c
|
||||||
#ifdef DEVICE_SPI_PIN_EXTENDED_SUPPORT
|
#ifdef DEVICE_SPI_PIN_EXTENDED_SUPPORT
|
||||||
PinMap *spi_get_mosi_pins(bool as_slave);
|
PinMap *spi_get_mosi_pins(bool as_slave, bool is_half_duplex);
|
||||||
PinMap *spi_get_miso_pins(bool as_slave);
|
PinMap *spi_get_miso_pins(bool as_slave, bool is_half_duplex);
|
||||||
PinMap *spi_get_clk_pins();
|
PinMap *spi_get_clk_pins();
|
||||||
PinMap *spi_get_cs_pins();
|
PinMap *spi_get_cs_pins();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue