diff --git a/internal/hw/gpio.go b/internal/hw/gpio.go index 1dac18f..07dda03 100644 --- a/internal/hw/gpio.go +++ b/internal/hw/gpio.go @@ -7,16 +7,6 @@ import ( ) const ( - pinDoorOpen = 17 - pinFanPower = 22 - pinCoolerPower = 23 - pinHeaterPower = 24 - pinLightsPower = 25 - - // GPIO21 is located at pin 13 on RPi 1B rev 1. Rev 2 and never boards - // has GPIO27 here. - pinOneWirePower = 21 - off = 0 on = 1 ) diff --git a/internal/hw/pins_arm.go b/internal/hw/pins_arm.go new file mode 100644 index 0000000..5c07f23 --- /dev/null +++ b/internal/hw/pins_arm.go @@ -0,0 +1,15 @@ +//go:build arm + +package hw + +const ( + pinDoorOpen = 17 + pinFanPower = 22 + pinCoolerPower = 23 + pinHeaterPower = 24 + pinLightsPower = 25 + + // GPIO21 is located at pin 13 on RPi 1B rev 1. Rev 2 and never boards + // has GPIO27 here. + pinOneWirePower = 21 +) diff --git a/internal/hw/pins_others.go b/internal/hw/pins_others.go new file mode 100644 index 0000000..0893eb7 --- /dev/null +++ b/internal/hw/pins_others.go @@ -0,0 +1,15 @@ +//go:build !arm + +package hw + +const ( + pinDoorOpen = 17 + pinFanPower = 22 + pinCoolerPower = 23 + pinHeaterPower = 24 + pinLightsPower = 25 + + // GPIO21 is located at pin 13 on RPi 1B rev 1. Rev 2 and never boards + // has GPIO27 here. + pinOneWirePower = 27 +)