mirror of
git://git.yoctoproject.org/meta-raspberrypi.git
synced 2025-07-19 12:59:03 +02:00
rpi-config: Add CAN0_INTERRUPT_PIN and CAN1_INTERRUPT_PIN variable
Current configuration hard-code the values of the CAN interrupt pins. This setting allows to change them. The default values are the same as before. Signed-off-by: Damiano Ferrari <damiano.ferrari@ferrarigrowtech.com>
This commit is contained in:
parent
fe7592fe9c
commit
51386901d4
|
@ -30,6 +30,8 @@ GPIO_IR ?= "18"
|
||||||
GPIO_IR_TX ?= "17"
|
GPIO_IR_TX ?= "17"
|
||||||
|
|
||||||
CAN_OSCILLATOR ?= "16000000"
|
CAN_OSCILLATOR ?= "16000000"
|
||||||
|
CAN0_INTERRUPT_PIN ?= "25"
|
||||||
|
CAN1_INTERRUPT_PIN ?= "24"
|
||||||
|
|
||||||
ENABLE_UART ??= ""
|
ENABLE_UART ??= ""
|
||||||
|
|
||||||
|
@ -268,12 +270,12 @@ do_deploy() {
|
||||||
# ENABLE DUAL CAN
|
# ENABLE DUAL CAN
|
||||||
if [ "${ENABLE_DUAL_CAN}" = "1" ]; then
|
if [ "${ENABLE_DUAL_CAN}" = "1" ]; then
|
||||||
echo "# Enable DUAL CAN" >>$CONFIG
|
echo "# Enable DUAL CAN" >>$CONFIG
|
||||||
echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>$CONFIG
|
echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=${CAN0_INTERRUPT_PIN}" >>$CONFIG
|
||||||
echo "dtoverlay=mcp2515-can1,oscillator=${CAN_OSCILLATOR},interrupt=24" >>$CONFIG
|
echo "dtoverlay=mcp2515-can1,oscillator=${CAN_OSCILLATOR},interrupt=${CAN1_INTERRUPT_PIN}" >>$CONFIG
|
||||||
# ENABLE CAN
|
# ENABLE CAN
|
||||||
elif [ "${ENABLE_CAN}" = "1" ]; then
|
elif [ "${ENABLE_CAN}" = "1" ]; then
|
||||||
echo "# Enable CAN" >>$CONFIG
|
echo "# Enable CAN" >>$CONFIG
|
||||||
echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>$CONFIG
|
echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=${CAN0_INTERRUPT_PIN}" >>$CONFIG
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user