Skip to content

Commit 860e536

Browse files
ithinuelc1728p9
authored andcommitted
add precision about static arrays and fix functions' names
1 parent fb8eb59 commit 860e536

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ It is proposed to introduce the following elements :
4444
PINMAP_FORM_FACTOR_MTB,
4545
} pinmap_form_factor_t;
4646

47-
/// returns an NC terminated array of pins.
47+
/// returns a static NC terminated array of pins.
4848
const PinName *pinmap_form_factor_pins(pinmap_form_factor_t form_factor);
49-
/// returns an NC terminated array of pins.
49+
/// returns a static NC terminated array of pins.
5050
const PinName *pinmap_restricted_pins();
51-
/// returns a null (\0) terminated character array.
51+
/// returns a null (\0) terminated static character array representing the name of the pin.
5252
const char *pinmap_pin_to_string(PinName pin);
5353
```
5454
- These generic function make use of the existing API to answer requirements 1, 2 and 6.
@@ -59,25 +59,25 @@ 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 PinName *whitelist,
62+
PinName pinmap_find_peripheral_pin(const PinMap *map, const PinName *whitelist,
6363
const PinName *blacklist, int per);
6464
6565
/// Verifies that `pin` is in `list`.
6666
bool pinlist_has_pin(const PinName *list, PinName pin);
6767
68-
/// Applies pinmap_find_peripheral_pins to each map in maps ensuring a pin will not be used twice.
68+
/// Applies pinmap_find_peripheral_pin to each map in maps ensuring a pin will not be used twice.
6969
/// @param[in] maps A list of pinmap.
7070
/// @param[in] count Number of elements of maps and pins.
7171
/// @param[in] whitelist An NC terminated list of pins.
7272
/// @param[in] blacklist An NC terminated list of pins.
7373
/// @param[in] per A peripheral name.
7474
/// @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);
75+
bool pinmap_find_peripheral_pins(const PinMap const **maps,
76+
uint32_t count,
77+
const PinName *whitelist,
78+
const PinName *blacklist,
79+
uint32_t per,
80+
PinName *pins);
8181
```
8282
- 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).
8383

0 commit comments

Comments
 (0)