Ran prettier and updated pin reference according to suggestion
This commit is contained in:
parent
3258ab505f
commit
311cc4a03c
1 changed files with 5 additions and 3 deletions
|
@ -56,12 +56,13 @@ Inside the `boards/` folder, you define a `<board>.overlay` for each different b
|
||||||
For example, the Kyria shield has a `boards/nice_nano.overlay` file that defines the RGB underglow for the `nice_nano` board specifically.
|
For example, the Kyria shield has a `boards/nice_nano.overlay` file that defines the RGB underglow for the `nice_nano` board specifically.
|
||||||
|
|
||||||
### nRF52-based boards
|
### nRF52-based boards
|
||||||
|
|
||||||
With nRF52 boards, you can just use `&spi1` and define the pins you want to use.
|
With nRF52 boards, you can just use `&spi1` and define the pins you want to use.
|
||||||
|
|
||||||
To identify which pin number you need to put in the config you need do to a bit of math. You need the hardware port and run it through a function.
|
To identify which pin number you need to put in the config you need do to a bit of math. You need the hardware port and run it through a function.
|
||||||
**32 * X + Y** = `<Pin number>` where X is first part of the hardware port "PX.01" and Y is the second part of the hardware port "P1.Y".
|
**32 \* X + Y** = `<Pin number>` where X is first part of the hardware port "PX.01" and Y is the second part of the hardware port "P1.Y".
|
||||||
|
|
||||||
(_P1.13_ would give you _32 * 1 + 13_ = `<45>` and P0.15 would give you _32 * 0 + 15_ = `<15>`)
|
(_P1.13_ would give you _32 \* 1 + 13_ = `<45>` and P0.15 would give you _32 \* 0 + 15_ = `<15>`)
|
||||||
|
|
||||||
Here's an example on a definition that uses P0.06:
|
Here's an example on a definition that uses P0.06:
|
||||||
|
|
||||||
|
@ -93,11 +94,12 @@ Here's an example on a definition that uses P0.06:
|
||||||
:::info
|
:::info
|
||||||
|
|
||||||
If you are configuring SPI for an nRF52 based board, double check that you are using pins that aren't restricted to low frequency I/O.
|
If you are configuring SPI for an nRF52 based board, double check that you are using pins that aren't restricted to low frequency I/O.
|
||||||
Ignoring these restrictions may result in poor wireless performance. You can find the list of low frequency I/O pins [here](https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Fpin.html&cp=4_0_0_6_0).
|
Ignoring these restrictions may result in poor wireless performance. You can find the list of low frequency I/O pins for the nRF52840 [here](https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Fpin.html&cp=4_0_0_6_0).
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### Other boards
|
### Other boards
|
||||||
|
|
||||||
For other boards, you must select an SPI definition that has the `MOSI` pin as your data pin going to your LED strip.
|
For other boards, you must select an SPI definition that has the `MOSI` pin as your data pin going to your LED strip.
|
||||||
|
|
||||||
Here's another example for a non-nRF52 board on `spi1`:
|
Here's another example for a non-nRF52 board on `spi1`:
|
||||||
|
|
Loading…
Add table
Reference in a new issue