diff options
| author | colin <colinmca242@gmail.com> | 2020-07-09 11:53:47 -0500 |
|---|---|---|
| committer | Andrei Gherzan <andrei@gherzan.ro> | 2020-07-23 13:03:23 +0100 |
| commit | 85d3dd81c52d80ae5f46f0e67c9f9affc34bb19d (patch) | |
| tree | a77fae3ce2324e8b0d4749a62525079bbcc3b6b2 | |
| parent | 73c686a70a3f07bf25e0250a6b710b0c5119e4ac (diff) | |
| download | meta-raspberrypi-85d3dd81c52d80ae5f46f0e67c9f9affc34bb19d.tar.gz | |
rpi-config_git: Added ENABLE_DUAL_CAN build configuration
Currently ENABLE_CAN adds mcp2525-can0 to the dtoverlay.
ENABLE_DUAL_CAN was added to also add mcp2515-can1 to the dtoverlay.
This will allow a user to enable dual CAN when using a hat like the
PiCAN 2 Duo board.
Signed-off-by: Colin McAllister <colinmca242@gmail.com>
| -rw-r--r-- | recipes-bsp/bootfiles/rpi-config_git.bb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb index d964de5..afdbce6 100644 --- a/recipes-bsp/bootfiles/rpi-config_git.bb +++ b/recipes-bsp/bootfiles/rpi-config_git.bb | |||
| @@ -198,8 +198,13 @@ do_deploy() { | |||
| 198 | echo "dtoverlay=at86rf233,speed=3000000" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 198 | echo "dtoverlay=at86rf233,speed=3000000" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
| 199 | fi | 199 | fi |
| 200 | 200 | ||
| 201 | # ENABLE DUAL CAN | ||
| 202 | if [ "${ENABLE_DUAL_CAN}" = "1" ]; then | ||
| 203 | echo "# Enable DUAL CAN" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | ||
| 204 | echo "dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | ||
| 205 | echo "dtoverlay=mcp2515-can1,oscillator=16000000,interrupt=24" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | ||
| 201 | # ENABLE CAN | 206 | # ENABLE CAN |
| 202 | if [ "${ENABLE_CAN}" = "1" ]; then | 207 | elif [ "${ENABLE_CAN}" = "1" ]; then |
| 203 | echo "# Enable CAN" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 208 | echo "# Enable CAN" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
| 204 | echo "dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt | 209 | echo "dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt |
| 205 | fi | 210 | fi |
