// I/O Resources available from a Raspberry Pi Remote I/O Server // Copyright (C)2021-2023, Philip Munts dba Munts Technologies. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. namespace IO.Objects.RemoteIO.Platforms { /// /// I/O resources (channel numbers) available on a Raspberry Pi Remote I/O /// Protocol Server /// public static class RaspberryPi { /// /// Analog input channel number for the remote Raspberry Pi analog /// input AIN0. /// /// /// This analog input is only available if a /// Mikroelektronika /// Pi 3 Click Shield (MIKROE-2756) is installed and the following /// device tree overlay command added to config.txt: /// /// dtoverlay=Pi3ClickShield /// /// public const int AIN0 = 0; /// /// Analog input channel number for the remote Raspberry Pi analog /// input AIN1. /// /// /// This analog input is only available if a /// Mikroelektronika /// Pi 3 Click Shield (MIKROE-2756) is installed and the following /// device tree overlay command added to config.txt: /// /// dtoverlay=Pi3ClickShield /// /// public const int AIN1 = 1; /// /// GPIO channel number for the remote Raspberry Pi user LED. /// /// /// This GPIO channel cannot be configured as an input. /// public const int USERLED = 0; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO2. /// /// /// This GPIO channel is normally unusable because GPIO2 is /// mapped to I2C signal SDA1. /// public const int GPIO2 = 2; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO3. /// /// /// This GPIO channel is normally unusable because GPIO3 is /// mapped to to I2C signal SCL1. /// public const int GPIO3 = 3; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO4. /// public const int GPIO4 = 4; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO5. /// /// /// This GPIO channel is not usable when the Remote I/O server /// is running on an original Raspberry Pi 1 Model A or B with a 26-pin /// expansion header. /// public const int GPIO5 = 5; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO6. /// /// /// This GPIO channel is not usable when the Remote I/O server /// is running on an original Raspberry Pi 1 Model A or B with a 26-pin /// expansion header. /// public const int GPIO6 = 6; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO7. /// /// /// This GPIO channel is normally unusable because GPIO7 is /// mapped to SPI signal SPI0_CE1. /// public const int GPIO7 = 7; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO8. /// /// /// This GPIO channel is normally unusable because GPIO8 is /// mapped to SPI signal SPI0_CE0. /// public const int GPIO8 = 8; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO9. /// /// /// This GPIO channel is normally unusable because GPIO9 is /// mapped to SPI signal SPI0_MISO. /// public const int GPIO9 = 9; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO10. /// /// /// This GPIO channel is normally unusable because GPIO10 is /// mapped to SPI signal SPI0_MOSI. /// public const int GPIO10 = 10; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO11. /// /// /// This GPIO channel is normally unusable because GPIO11 is /// mapped to SPI signal SPI0_SCLK. /// public const int GPIO11 = 11; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO12. /// /// /// This GPIO channel is not usable when the Remote I/O server /// is running on an original Raspberry Pi 1 Model A or B with a 26-pin /// expansion header. /// public const int GPIO12 = 12; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO13. /// /// /// This GPIO channel is not usable when the Remote I/O server /// is running on an original Raspberry Pi 1 Model A or B with a 26-pin /// expansion header. /// public const int GPIO13 = 13; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO14. /// /// /// This GPIO channel is normally unusable because GPIO14 is /// mapped to UART signal UART0_TXD. /// public const int GPIO14 = 14; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO15. /// /// /// This GPIO channel is normally unusable because GPIO15 is /// mapped to UART signal UART0_RXD. /// public const int GPIO15 = 15; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO16. /// /// /// This GPIO channel is not usable when the Remote I/O server /// is running on an original Raspberry Pi 1 Model A or B with a 26-pin /// expansion header. /// public const int GPIO16 = 16; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO17. /// public const int GPIO17 = 17; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO18. /// /// /// This GPIO channel is normally unusable because GPIO18 is /// mapped to PWM output PWM0. /// public const int GPIO18 = 18; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO19. /// /// /// This GPIO channel is not usable when the Remote I/O server /// is running on an original Raspberry Pi 1 Model A or B with a 26-pin /// expansion header. /// public const int GPIO19 = 19; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO20. /// /// /// This GPIO channel is not usable when the Remote I/O server /// is running on an original Raspberry Pi 1 Model A or B with a 26-pin /// expansion header. /// public const int GPIO20 = 20; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO21. /// /// /// This GPIO channel is not usable when the Remote I/O server /// is running on an original Raspberry Pi 1 Model A or B with a 26-pin /// expansion header. /// public const int GPIO21 = 21; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO22. /// public const int GPIO22 = 22; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO23. /// public const int GPIO23 = 23; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO24. /// public const int GPIO24 = 24; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO25. /// public const int GPIO25 = 25; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO26. /// /// /// This GPIO channel is not usable when the Remote I/O server /// is running on an original Raspberry Pi 1 Model A or B with a 26-pin /// expansion header. /// public const int GPIO26 = 26; /// /// GPIO channel number for the remote Raspberry Pi GPIO pin GPIO27. /// public const int GPIO27 = 27; /// /// I2C bus channel number for the remote Raspberry Pi /// I2C bus controller I2C1. /// /// /// The following device tree overlay command must be added to /// config.txt on the Raspberry Pi Remote I/O server to enable /// I2C bus controller I2C1: /// /// dtparam=i2c=on /// /// public const int I2C1 = 0; /// /// PWM output channel number for the remote Raspberry Pi PWM output /// PWM0. /// /// /// The following device tree overlay command must be added to /// config.txt on the Raspberry Pi Remote I/O server to enable /// PWM output PWM0: /// /// dtoverlay=pwm /// /// public const int PWM0 = 0; /// /// PWM output channel number for the remote Raspberry Pi PWM output /// PWM1. /// /// /// PWM1 is not normally enabled. You can enable it with one /// of the device tree overlay command variationss described in /// /// https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README. /// public const int PWM1 = 1; /// /// SPI slave device channel number for the remote Raspberry Pi SPI /// slave device /dev/spidev0.0. /// /// /// /dev/spidev0.0 uses GPIO8 for slave select. /// The following device tree overlay command must be added to /// config.txt on the Raspberry Pi Remote I/O server to enable /// SPI bus controller SPI0: /// /// dtparam=spi=on /// /// public const int SPI0_0 = 0; /// /// SPI slave device channel number for the remote Raspberry Pi SPI /// slave device /dev/spidev0.1. /// /// /// /dev/spidev0.1 uses GPIO7 for slave select. /// The following device tree overlay command must be added to /// config.txt on the Raspberry Pi Remote I/O server to enable /// SPI bus controller SPI0: /// /// dtparam=spi=on /// /// public const int SPI0_1 = 1; /// /// SPI slave device channel number for the remote Raspberry Pi SPI /// slave device /dev/spidev1.0. /// /// /// /dev/spidev1.0 uses GPIO18 for slave select. /// public const int SPI1_0 = 2; /// /// SPI slave device channel number for the remote Raspberry Pi SPI /// slave device /dev/spidev1.1. /// /// /// /dev/spidev1.1 uses GPIO17 for slave select. /// public const int SPI1_1 = 3; /// /// SPI slave device channel number for the remote Raspberry Pi SPI /// slave device /dev/spidev1.2. /// /// /// /dev/spidev1.2 uses GPIO16 for slave select. /// public const int SPI1_2 = 4; } }