Skip to content

Commit fb8eb59

Browse files
ithinuelc1728p9
authored andcommitted
fix types names.
1 parent d1531da commit fb8eb59

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

docs/design-documents/hal/0002-pinmap-extension.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,33 +59,43 @@ It is proposed to introduce the following elements :
5959
/// Returns a pin from ((whitelist ∩ map) − blacklist).
6060
/// Typically, whitelist will be the form factor list of pins.
6161
/// The blacklist may be a list of pins already visited and/or tied to another peripheral.
62-
PinName pinmap_find_peripheral_pins(const PinMap *map, const PinList *whitelist,
63-
const PinList *blacklist, int per);
62+
PinName pinmap_find_peripheral_pins(const PinMap *map, const PinName *whitelist,
63+
const PinName *blacklist, int per);
6464
6565
/// Verifies that `pin` is in `list`.
6666
bool pinlist_has_pin(const PinName *list, PinName pin);
6767
6868
/// Applies pinmap_find_peripheral_pins to each map in maps ensuring a pin will not be used twice.
69-
bool pinmap_find_peripheral_bus(const PinMap const **maps, const PinList *whitelist,
70-
const PinList *blacklist, int per, PinName *pins, uint32_t count);
69+
/// @param[in] maps A list of pinmap.
70+
/// @param[in] count Number of elements of maps and pins.
71+
/// @param[in] whitelist An NC terminated list of pins.
72+
/// @param[in] blacklist An NC terminated list of pins.
73+
/// @param[in] per A peripheral name.
74+
/// @param[out] pins An array of PinName where the result is stored.
75+
bool pinmap_find_peripheral_bus(const PinMap const **maps,
76+
uint32_t count,
77+
const PinName *whitelist,
78+
const PinName *blacklist,
79+
uint32_t per,
80+
PinName *pins);
7181
```
7282
- Additionally to these requirements any peripheral API must expose adequate functions to fetch an NC terminated list of pins associated to each of their their functions. These API extensions shall be gated with a `<PERIPHERAL_NAME>_PIN_EXTENTION` where `<PERIPHERAL_NAME>` is the name of the considered peripheral (`SPI`, `I2C`, `CAN` etc).
7383

7484
For example the SPI api may be extended with :
7585
```c
7686
#ifdef DEVICE_SPI_PIN_EXTENDED_SUPPORT
77-
PinName *spi_get_mosi_pins(bool as_slave);
78-
PinName *spi_get_miso_pins(bool as_slave);
79-
PinName *spi_get_clk_pins();
80-
PinName *spi_get_cs_pins();
87+
PinMap *spi_get_mosi_pins(bool as_slave);
88+
PinMap *spi_get_miso_pins(bool as_slave);
89+
PinMap *spi_get_clk_pins();
90+
PinMap *spi_get_cs_pins();
8191
#endif
8292
```
8393

8494
and the I²C api with :
8595
```c
8696
#ifdef DEVICE_I2C_PIN_EXTENDED_SUPPORT
87-
PinName *i2c_get_scl_pins();
88-
PinName *i2c_get_sda_pins();
97+
PinMap *i2c_get_scl_pins();
98+
PinMap *i2c_get_sda_pins();
8999
#endif
90100
```
91101

0 commit comments

Comments
 (0)