From a762fe2e11c0e865585040719ba05390c7a18120 Mon Sep 17 00:00:00 2001 From: Wilfried Chauveau Date: Thu, 8 Nov 2018 16:36:59 +0000 Subject: [PATCH 1/9] add the RFC for PinMap's extension --- .../hal/0002-pinmap-extension.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 docs/design-documents/hal/0002-pinmap-extension.md diff --git a/docs/design-documents/hal/0002-pinmap-extension.md b/docs/design-documents/hal/0002-pinmap-extension.md new file mode 100644 index 0000000000..fa654ce546 --- /dev/null +++ b/docs/design-documents/hal/0002-pinmap-extension.md @@ -0,0 +1,86 @@ +# HAL PinMap + + + +- [Description](#Description) +- [Motivation](#Motivation) +- [Requirements](#Requirements) +- [Design choices](#Design-choices) +- [Questions](#Questions) + + + +## Description + +This update aims at increasing tests thoroughness by enabling them to check driver's reliability for each pin declared as supporting a peripheral. + +## Motivation + +At the time being, drivers are only tested on a single "default" peripheral. However, some target features the same peripheral through different IP for example the SPI may be provided on a single MCU by its USART, QSPI and SSP peripherals. To ensure that the driver implementation is valid for all these peripherals we want the CI to assess each pin in at least one pin configuration for each peripheral. + +## Requirements + +1. We want to list all pins for a function on a peripheral. +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. +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. +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. + +## Design choices + +These requirements do not impact the current API and thus they can all be implemented as an extension to the existing API. +It is proposed to introduce the following elements : +- `DEVICE_PIN_EXTENDED_SUPPORT` A `device_has` flag indicating the implementation of this extension. +- The following part of the API provides the features needed for requirements 3, 4 and 5 + ```c + /// returns an NC terminated array of pins. + const PinName *pinmap_form_factor_pins(); + /// returns an NC terminated array of pins. + const PinName *pinmap_restricted_pins(); + /// returns a null (\0) terminated character array. + const char *pinmap_pin_to_string(PinName pin); + ``` +- These generic function make use of the existing API to answer requirements 1, 2 and 6. + ```c + /// Returns the `n`'th pin supporting the `peripheral` in the `map`. + PinName pinmap_find_peripheral_pin(const PinMap *map, int peripheral, uint32_t n); + + /// Returns a pin from ((whitelist ∩ map) − blacklist). + /// Typically, whitelist will be the form factor list of pins. + /// The blacklist may be a list of pins already visited and/or tied to another peripheral. + PinName pinmap_find_peripheral_pins(const PinMap *map, const PinList *whitelist, + const PinList *blacklist, int per); + + /// Verifies that `pin` is in `list`. + bool pinlist_has_pin(const PinName *list, PinName pin); + + /// Applies pinmap_find_peripheral_pins to each map in maps ensuring a pin will not be used twice. + bool pinmap_find_peripheral_bus(const PinMap const **maps, const PinList *whitelist, + const PinList *blacklist, int per, PinName *pins, uint32_t count); + ``` +- 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 `_PIN_EXTENTION` where `` is the name of the considered peripheral (`SPI`, `I2C`, `CAN` etc). + + For example the SPI api may be extended with : + ```c + #ifdef DEVICE_SPI_PIN_EXTENDED_SUPPORT + PinName *spi_get_mosi_pins(bool as_slave); + PinName *spi_get_miso_pins(bool as_slave); + PinName *spi_get_clk_pins(); + PinName *spi_get_cs_pins(); + #endif + ``` + + and the I²C api with : + ```c + #ifdef DEVICE_I2C_PIN_EXTENDED_SUPPORT + PinName *i2c_get_scl_pins(); + PinName *i2c_get_sda_pins(); + #endif + ``` + + +## Questions + From d1531daa396c227180bb0e5a2da148a2916170ca Mon Sep 17 00:00:00 2001 From: Wilfried Chauveau Date: Mon, 12 Nov 2018 11:20:42 +0000 Subject: [PATCH 2/9] add form_factors --- docs/design-documents/hal/0002-pinmap-extension.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/design-documents/hal/0002-pinmap-extension.md b/docs/design-documents/hal/0002-pinmap-extension.md index fa654ce546..eb06dd2284 100644 --- a/docs/design-documents/hal/0002-pinmap-extension.md +++ b/docs/design-documents/hal/0002-pinmap-extension.md @@ -36,8 +36,16 @@ It is proposed to introduce the following elements : - `DEVICE_PIN_EXTENDED_SUPPORT` A `device_has` flag indicating the implementation of this extension. - The following part of the API provides the features needed for requirements 3, 4 and 5 ```c + enum pinmap_form_factor_ { + PINMAP_FORM_FACTOR_ARDUINO_ZERO, + PINMAP_FORM_FACTOR_ARDUINO_DUE, + PINMAP_FORM_FACTOR_NXP_FRDM, + PINMAP_FORM_FACTOR_ST_MORPHO, + PINMAP_FORM_FACTOR_MTB, + } pinmap_form_factor_t; + /// returns an NC terminated array of pins. - const PinName *pinmap_form_factor_pins(); + const PinName *pinmap_form_factor_pins(pinmap_form_factor_t form_factor); /// returns an NC terminated array of pins. const PinName *pinmap_restricted_pins(); /// returns a null (\0) terminated character array. From fb8eb59c11a3aa6ddc9f6574e2a4ae680b796a1c Mon Sep 17 00:00:00 2001 From: Wilfried Chauveau Date: Thu, 15 Nov 2018 12:23:19 +0000 Subject: [PATCH 3/9] fix types names. --- .../hal/0002-pinmap-extension.md | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/docs/design-documents/hal/0002-pinmap-extension.md b/docs/design-documents/hal/0002-pinmap-extension.md index eb06dd2284..2dad50443c 100644 --- a/docs/design-documents/hal/0002-pinmap-extension.md +++ b/docs/design-documents/hal/0002-pinmap-extension.md @@ -59,33 +59,43 @@ It is proposed to introduce the following elements : /// Returns a pin from ((whitelist ∩ map) − blacklist). /// Typically, whitelist will be the form factor list of pins. /// The blacklist may be a list of pins already visited and/or tied to another peripheral. - PinName pinmap_find_peripheral_pins(const PinMap *map, const PinList *whitelist, - const PinList *blacklist, int per); + PinName pinmap_find_peripheral_pins(const PinMap *map, const PinName *whitelist, + const PinName *blacklist, int per); /// Verifies that `pin` is in `list`. bool pinlist_has_pin(const PinName *list, PinName pin); /// Applies pinmap_find_peripheral_pins to each map in maps ensuring a pin will not be used twice. - bool pinmap_find_peripheral_bus(const PinMap const **maps, const PinList *whitelist, - const PinList *blacklist, int per, PinName *pins, uint32_t count); + /// @param[in] maps A list of pinmap. + /// @param[in] count Number of elements of maps and pins. + /// @param[in] whitelist An NC terminated list of pins. + /// @param[in] blacklist An NC terminated list of pins. + /// @param[in] per A peripheral name. + /// @param[out] pins An array of PinName where the result is stored. + bool pinmap_find_peripheral_bus(const PinMap const **maps, + uint32_t count, + const PinName *whitelist, + const PinName *blacklist, + uint32_t per, + PinName *pins); ``` - 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 `_PIN_EXTENTION` where `` is the name of the considered peripheral (`SPI`, `I2C`, `CAN` etc). For example the SPI api may be extended with : ```c #ifdef DEVICE_SPI_PIN_EXTENDED_SUPPORT - PinName *spi_get_mosi_pins(bool as_slave); - PinName *spi_get_miso_pins(bool as_slave); - PinName *spi_get_clk_pins(); - PinName *spi_get_cs_pins(); + PinMap *spi_get_mosi_pins(bool as_slave); + PinMap *spi_get_miso_pins(bool as_slave); + PinMap *spi_get_clk_pins(); + PinMap *spi_get_cs_pins(); #endif ``` and the I²C api with : ```c #ifdef DEVICE_I2C_PIN_EXTENDED_SUPPORT - PinName *i2c_get_scl_pins(); - PinName *i2c_get_sda_pins(); + PinMap *i2c_get_scl_pins(); + PinMap *i2c_get_sda_pins(); #endif ``` From 860e536d71b68326b4a160f52f1aa8052a37ab83 Mon Sep 17 00:00:00 2001 From: Wilfried Chauveau Date: Thu, 15 Nov 2018 12:30:08 +0000 Subject: [PATCH 4/9] add precision about static arrays and fix functions' names --- .../hal/0002-pinmap-extension.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/design-documents/hal/0002-pinmap-extension.md b/docs/design-documents/hal/0002-pinmap-extension.md index 2dad50443c..cf50b498db 100644 --- a/docs/design-documents/hal/0002-pinmap-extension.md +++ b/docs/design-documents/hal/0002-pinmap-extension.md @@ -44,11 +44,11 @@ It is proposed to introduce the following elements : PINMAP_FORM_FACTOR_MTB, } pinmap_form_factor_t; - /// returns an NC terminated array of pins. + /// returns a static NC terminated array of pins. const PinName *pinmap_form_factor_pins(pinmap_form_factor_t form_factor); - /// returns an NC terminated array of pins. + /// returns a static NC terminated array of pins. const PinName *pinmap_restricted_pins(); - /// returns a null (\0) terminated character array. + /// returns a null (\0) terminated static character array representing the name of the pin. const char *pinmap_pin_to_string(PinName pin); ``` - 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 : /// Returns a pin from ((whitelist ∩ map) − blacklist). /// Typically, whitelist will be the form factor list of pins. /// The blacklist may be a list of pins already visited and/or tied to another peripheral. - PinName pinmap_find_peripheral_pins(const PinMap *map, const PinName *whitelist, + PinName pinmap_find_peripheral_pin(const PinMap *map, const PinName *whitelist, const PinName *blacklist, int per); /// Verifies that `pin` is in `list`. bool pinlist_has_pin(const PinName *list, PinName pin); - /// Applies pinmap_find_peripheral_pins to each map in maps ensuring a pin will not be used twice. + /// Applies pinmap_find_peripheral_pin to each map in maps ensuring a pin will not be used twice. /// @param[in] maps A list of pinmap. /// @param[in] count Number of elements of maps and pins. /// @param[in] whitelist An NC terminated list of pins. /// @param[in] blacklist An NC terminated list of pins. /// @param[in] per A peripheral name. /// @param[out] pins An array of PinName where the result is stored. - bool pinmap_find_peripheral_bus(const PinMap const **maps, - uint32_t count, - const PinName *whitelist, - const PinName *blacklist, - uint32_t per, - PinName *pins); + bool pinmap_find_peripheral_pins(const PinMap const **maps, + uint32_t count, + const PinName *whitelist, + const PinName *blacklist, + uint32_t per, + PinName *pins); ``` - 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 `_PIN_EXTENTION` where `` is the name of the considered peripheral (`SPI`, `I2C`, `CAN` etc). From 852749c92c5e0643006f3e077e63ffe10b06238c Mon Sep 17 00:00:00 2001 From: Wilfried Chauveau Date: Fri, 23 Nov 2018 11:20:04 +0000 Subject: [PATCH 5/9] update according to @bulislaw 's review --- docs/design-documents/hal/0002-pinmap-extension.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/design-documents/hal/0002-pinmap-extension.md b/docs/design-documents/hal/0002-pinmap-extension.md index cf50b498db..154507495a 100644 --- a/docs/design-documents/hal/0002-pinmap-extension.md +++ b/docs/design-documents/hal/0002-pinmap-extension.md @@ -12,7 +12,8 @@ ## 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 @@ -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. 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. -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. 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_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); /// returns a static NC terminated array of pins. const PinName *pinmap_restricted_pins(); @@ -60,7 +61,7 @@ It is proposed to introduce the following elements : /// Typically, whitelist will be the form factor list of pins. /// The blacklist may be a list of pins already visited and/or tied to another peripheral. PinName pinmap_find_peripheral_pin(const PinMap *map, const PinName *whitelist, - const PinName *blacklist, int per); + const PinName *blacklist, int per); /// Verifies that `pin` is in `list`. bool pinlist_has_pin(const PinName *list, PinName pin); @@ -84,8 +85,8 @@ It is proposed to introduce the following elements : For example the SPI api may be extended with : ```c #ifdef DEVICE_SPI_PIN_EXTENDED_SUPPORT - PinMap *spi_get_mosi_pins(bool as_slave); - PinMap *spi_get_miso_pins(bool as_slave); + PinMap *spi_get_mosi_pins(bool as_slave, bool is_half_duplex); + PinMap *spi_get_miso_pins(bool as_slave, bool is_half_duplex); PinMap *spi_get_clk_pins(); PinMap *spi_get_cs_pins(); #endif From 50be53b8531c3ee950f9d663a93423499bd6cfcb Mon Sep 17 00:00:00 2001 From: Wilfried Chauveau Date: Thu, 13 Dec 2018 13:33:18 +0000 Subject: [PATCH 6/9] fix according to @donatieng's review --- docs/design-documents/hal/0002-pinmap-extension.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/design-documents/hal/0002-pinmap-extension.md b/docs/design-documents/hal/0002-pinmap-extension.md index 154507495a..1a8c2a50ce 100644 --- a/docs/design-documents/hal/0002-pinmap-extension.md +++ b/docs/design-documents/hal/0002-pinmap-extension.md @@ -17,11 +17,13 @@ These tools will help designing better tests for the HAL. ## Motivation -At the time being, drivers are only tested on a single "default" peripheral. However, some target features the same peripheral through different IP for example the SPI may be provided on a single MCU by its USART, QSPI and SSP peripherals. To ensure that the driver implementation is valid for all these peripherals we want the CI to assess each pin in at least one pin configuration for each peripheral. +At the time being, drivers are only tested on a single "default" peripheral. However, some target feature the same peripheral through different blocks' implementations for example the SPI may be provided on a single MCU by its USART, QSPI and SSP peripherals. +To ensure that the driver's implementation is valid for all these peripherals we want the CI to run the test set on each peripheral using at least one set of pin determined at run time (pin may eventually picked randomly). ## Requirements 1. We want to list all pins for a function on a peripheral. + For instance, all pins that can be configured as MOSI for SPI1. 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. 4. We want a printable name for each pin and a method to get that name. From 73403b02bccdec915d1c2be1fec3da300154693b Mon Sep 17 00:00:00 2001 From: Russ Butler Date: Tue, 12 Feb 2019 15:20:29 -0600 Subject: [PATCH 7/9] Update pinmap design document Update the pinmap design document to reflect the current design and to match the design document template. --- .../hal/0002-pinmap-extension.md | 120 +++++++----------- 1 file changed, 48 insertions(+), 72 deletions(-) diff --git a/docs/design-documents/hal/0002-pinmap-extension.md b/docs/design-documents/hal/0002-pinmap-extension.md index 1a8c2a50ce..840fd8dd52 100644 --- a/docs/design-documents/hal/0002-pinmap-extension.md +++ b/docs/design-documents/hal/0002-pinmap-extension.md @@ -1,6 +1,6 @@ -# HAL PinMap +# HAL PinMap design document - +# Table of contents - [Description](#Description) - [Motivation](#Motivation) @@ -10,98 +10,74 @@ -## Description +# Introduction Adds board introspection capabilities and tools. These tools will help designing better tests for the HAL. -## Motivation +### Overview and background At the time being, drivers are only tested on a single "default" peripheral. However, some target feature the same peripheral through different blocks' implementations for example the SPI may be provided on a single MCU by its USART, QSPI and SSP peripherals. To ensure that the driver's implementation is valid for all these peripherals we want the CI to run the test set on each peripheral using at least one set of pin determined at run time (pin may eventually picked randomly). -## Requirements +### Requirements and assumptions 1. We want to list all pins for a function on a peripheral. For instance, all pins that can be configured as MOSI for SPI1. 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. -4. We want a printable name for each pin and a method to get that name. +4. We want a printable name for each form factor pin and a method to get that name. 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. Any of the list mentioned above may be empty if none match the criteria. -## Design choices +# System architecture and high-level design -These requirements do not impact the current API and thus they can all be implemented as an extension to the existing API. -It is proposed to introduce the following elements : -- `DEVICE_PIN_EXTENDED_SUPPORT` A `device_has` flag indicating the implementation of this extension. -- The following part of the API provides the features needed for requirements 3, 4 and 5 - ```c - enum pinmap_form_factor_ { - PINMAP_FORM_FACTOR_ARDUINO_ZERO, - PINMAP_FORM_FACTOR_ARDUINO_DUE, - PINMAP_FORM_FACTOR_NXP_FRDM, - PINMAP_FORM_FACTOR_ST_MORPHO, - PINMAP_FORM_FACTOR_MTB, - } pinmap_form_factor_t; +### Pinmap - /// returns a static NC terminated array of pins (or NULL if unsupported). - const PinName *pinmap_form_factor_pins(pinmap_form_factor_t form_factor); - /// returns a static NC terminated array of pins. - const PinName *pinmap_restricted_pins(); - /// returns a null (\0) terminated static character array representing the name of the pin. - const char *pinmap_pin_to_string(PinName pin); - ``` -- These generic function make use of the existing API to answer requirements 1, 2 and 6. - ```c - /// Returns the `n`'th pin supporting the `peripheral` in the `map`. - PinName pinmap_find_peripheral_pin(const PinMap *map, int peripheral, uint32_t n); +All HAL APIs which use pins have functions to get the corresponding pin maps. These functions return a `PinMap` array with each entry containing a pin name, a peripheral and a function. The end of the pin map array is indicated by the presence of a NC pin. Below is an example implementation of the function to get the serial tx pinmap: - /// Returns a pin from ((whitelist ∩ map) − blacklist). - /// Typically, whitelist will be the form factor list of pins. - /// The blacklist may be a list of pins already visited and/or tied to another peripheral. - PinName pinmap_find_peripheral_pin(const PinMap *map, const PinName *whitelist, - const PinName *blacklist, int per); +```C +const PinMap PinMap_UART_TX[] = { + {P0_19, UART_0, 1}, + {P1_13, UART_0, 3}, + {P1_27, UART_0, 2}, + { NC , NC , 0} +}; +const PinMap *serial_tx_pinmap() +{ + return PinMap_UART_TX; +} +``` - /// Verifies that `pin` is in `list`. - bool pinlist_has_pin(const PinName *list, PinName pin); +Targets which don't make use of a pinmap, such as ones with peripherals that can be connected to any pin, must still define pinmaps as these are needed for testing. For these devices the pinmap does not need to be comprehensive. Instead it should list a representative sample of pins and peripherals so they can be tested appropriately. - /// Applies pinmap_find_peripheral_pin to each map in maps ensuring a pin will not be used twice. - /// @param[in] maps A list of pinmap. - /// @param[in] count Number of elements of maps and pins. - /// @param[in] whitelist An NC terminated list of pins. - /// @param[in] blacklist An NC terminated list of pins. - /// @param[in] per A peripheral name. - /// @param[out] pins An array of PinName where the result is stored. - bool pinmap_find_peripheral_pins(const PinMap const **maps, - uint32_t count, - const PinName *whitelist, - const PinName *blacklist, - uint32_t per, - PinName *pins); - ``` -- 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 `_PIN_EXTENTION` where `` is the name of the considered peripheral (`SPI`, `I2C`, `CAN` etc). - - For example the SPI api may be extended with : - ```c - #ifdef DEVICE_SPI_PIN_EXTENDED_SUPPORT - PinMap *spi_get_mosi_pins(bool as_slave, bool is_half_duplex); - PinMap *spi_get_miso_pins(bool as_slave, bool is_half_duplex); - PinMap *spi_get_clk_pins(); - PinMap *spi_get_cs_pins(); - #endif - ``` +### Form Factor - and the I²C api with : - ```c - #ifdef DEVICE_I2C_PIN_EXTENDED_SUPPORT - PinMap *i2c_get_scl_pins(); - PinMap *i2c_get_sda_pins(); - #endif - ``` - +A boards form factor determines what can be tested automatically. A board can have one or more form factors, each listed in the `supported_form_factors` entry in targets.json: -## Questions +``` +"supported_form_factors": ["ARDUINO"], +``` +The Mbed pinamp code has built in support for common form factors, such as `ARDUINO`. When a known form factor is present in the `supported_form_factors` list then it will be used automatically for testing. Use the target configuration value `default-form-factor` to test a custom form factor or to force the tools to use a given form factor. + +Use the function `const PinList *pinmap_ff_default_pins(void)` to get the pins of a form factor for testing. Additionally the name of a given form factor pin can be found with the function `const char *pinmap_ff_default_pin_to_string(PinName pin)`. + +### Restricted Pins + +Some boards have pins which cannot be tested without causing problems elsewhere. One example of this is the serial TX and RX pins used for communication during testing. If these pins are used during a test then communication with the host PC will be lost. To prevent pins like this from being used a target can override the weak function `pinmap_restricted_pins()` to return a pin list containing all target pins which should be skipped during testing. By default this function only includes the TX and RX pins used for communication during testing: + +```c +MBED_WEAK const PinList *pinmap_restricted_pins() +{ + static const PinName pins[] = { + USBTX, USBRX + }; + static const PinList pin_list = { + sizeof(pins) / sizeof(pins[0]), + pins + }; + return &pin_list; +} +``` From c2a67f3d8ef08816e4a313111aff38d8373ec8b9 Mon Sep 17 00:00:00 2001 From: Cruz Monrreal Date: Wed, 13 Feb 2019 09:00:29 -0600 Subject: [PATCH 8/9] Make targets plural in design document Co-Authored-By: c1728p9 --- docs/design-documents/hal/0002-pinmap-extension.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/design-documents/hal/0002-pinmap-extension.md b/docs/design-documents/hal/0002-pinmap-extension.md index 840fd8dd52..2a163dd43d 100644 --- a/docs/design-documents/hal/0002-pinmap-extension.md +++ b/docs/design-documents/hal/0002-pinmap-extension.md @@ -17,7 +17,7 @@ These tools will help designing better tests for the HAL. ### Overview and background -At the time being, drivers are only tested on a single "default" peripheral. However, some target feature the same peripheral through different blocks' implementations for example the SPI may be provided on a single MCU by its USART, QSPI and SSP peripherals. +At the time being, drivers are only tested on a single "default" peripheral. However, some targets feature the same peripheral through different blocks' implementations for example the SPI may be provided on a single MCU by its USART, QSPI and SSP peripherals. To ensure that the driver's implementation is valid for all these peripherals we want the CI to run the test set on each peripheral using at least one set of pin determined at run time (pin may eventually picked randomly). ### Requirements and assumptions From b63b30282e0e86031c4f637e261d6e240c131fb2 Mon Sep 17 00:00:00 2001 From: Russ Butler Date: Wed, 13 Feb 2019 14:21:53 -0600 Subject: [PATCH 9/9] Update table of content links Update the links and names in the table of contents. --- .../hal/0002-pinmap-extension.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/design-documents/hal/0002-pinmap-extension.md b/docs/design-documents/hal/0002-pinmap-extension.md index 2a163dd43d..5df0eed15f 100644 --- a/docs/design-documents/hal/0002-pinmap-extension.md +++ b/docs/design-documents/hal/0002-pinmap-extension.md @@ -2,13 +2,15 @@ # Table of contents -- [Description](#Description) -- [Motivation](#Motivation) -- [Requirements](#Requirements) -- [Design choices](#Design-choices) -- [Questions](#Questions) - - +1. [HAL PinMap design document](#hal-pinmap-design-document). +1. [Table of contents](#table-of-contents). +1. [Introduction](#introduction). + 1. [Overview and background](#overview-and-background). + 1. [Requirements and assumptions](#requirements-and-assumptions). +1. [System architecture and high-level design](#system-architecture-and-high-level-design). + 1. [Pinmap](#pinmap). + 1. [Form Factor](#form-factor). + 1. [Restricted Pins](#restricted-pins). # Introduction