... | ... | @@ -3,7 +3,7 @@ A GPIO is a software-controllable peripheral used to configure the device IO por |
|
|
GPIOs are grouped in ports and so each GPIO has an identifier.
|
|
|
The identifiers have the following format: PXY, where X is the port name and Y is the pin number.
|
|
|
|
|
|
### Configuration
|
|
|
## Configuration
|
|
|
> :warning: **WARNING: Before using a GPIO it has to be correctly configured. A lot of times you can experience non-working code or drivers due to not initialized or configured GPIOs.**
|
|
|
|
|
|
Examples of possible configurations for a GPIO are:
|
... | ... | @@ -18,7 +18,7 @@ The available pin modes and speeds can be found in the |
|
|
|
|
|
If you want to know more about GPIOs, check out the [GPIO Tutorial - Miosix Wiki](https://miosix.org/wiki/index.php?title=GPIO_tutorial) page.
|
|
|
|
|
|
### Examples
|
|
|
## Examples
|
|
|
|
|
|
#### 1. Template API
|
|
|
To use a pin in your board you can simply do:
|
... | ... | @@ -69,7 +69,7 @@ somePin.alternateFunction(5); |
|
|
> }
|
|
|
> ```
|
|
|
|
|
|
### Discovery Board Pins
|
|
|
## Discovery Board Pins
|
|
|
These are some commonly used pins that you'll need when writing software for **Discovery boards**.
|
|
|
|
|
|
- STM32F429ZI_DISCO
|
... | ... | @@ -95,7 +95,7 @@ You can find a complete pin usage description |
|
|
|
|
|
You can find more in the [datasheet](http://www.st.com/content/ccc/resource/technical/document/user_manual/70/fe/4a/3f/e7/e1/4f/7d/DM00039084.pdf/files/DM00039084.pdf/jcr:content/translations/en.DM00039084.pdf) for more.
|
|
|
|
|
|
### Miosix Used Pins
|
|
|
## Miosix Used Pins
|
|
|
These are some pins that are used by default from the kernel when running on **STM32 micros** (all paths are referred to `/libs/miosix-kernel/miosix`):
|
|
|
|
|
|
- SD memory: `arch/common/drivers/sd_stm32f2_f4.cpp`
|
... | ... | @@ -121,7 +121,7 @@ These are some pins that are used by default from the kernel when running on **S |
|
|
Extra
|
|
|
---------------
|
|
|
|
|
|
### STM32F429ZI Discovery Pins
|
|
|
## STM32F429ZI Discovery Pins
|
|
|
|
|
|

|
|
|
 |
|
|
\ No newline at end of file |