// Raspberry Pi I/O resource definitions
// Copyright (C)2018-2024, 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.
using IO.Objects.SimpleIO.Device;
namespace IO.Objects.SimpleIO.Platforms
{
///
/// This class defines identifiers for the devices provided by the
/// Raspberry Pi hardware platform.
///
public static class RaspberryPi
{
/// Analog input designator (0, 0).
/// Raspberry Pi boards don't have a built-in ADC (Analog to
/// Digital Converter) subsystem, so this is just a placeholder
/// for the first IIO (Industrial I/O) ADC device.
public static readonly Designator AIN0 = new Designator(0, 0);
/// Analog input designator (0, 1).
/// Raspberry Pi boards don't have a built-in ADC (Analog to
/// Digital Converter) subsystem, so this is just a placeholder
/// for the first IIO (Industrial I/O) ADC device.
public static readonly Designator AIN1 = new Designator(0, 1);
/// Analog input designator (0, 2).
/// Raspberry Pi boards don't have a built-in ADC (Analog to
/// Digital Converter) subsystem, so this is just a placeholder
/// for the first IIO (Industrial I/O) ADC device.
public static readonly Designator AIN2 = new Designator(0, 2);
/// Analog input designator (0, 3).
/// Raspberry Pi boards don't have a built-in ADC (Analog to
/// Digital Converter) subsystem, so this is just a placeholder
/// for the first IIO (Industrial I/O) ADC device.
public static readonly Designator AIN3 = new Designator(0, 3);
/// Analog input designator (0, 4).
/// Raspberry Pi boards don't have a built-in ADC (Analog to
/// Digital Converter) subsystem, so this is just a placeholder
/// for the first IIO (Industrial I/O) ADC device.
public static readonly Designator AIN4 = new Designator(0, 4);
/// Analog input designator (0, 5).
/// Raspberry Pi boards don't have a built-in ADC (Analog to
/// Digital Converter) subsystem, so this is just a placeholder
/// for the first IIO (Industrial I/O) ADC device.
public static readonly Designator AIN5 = new Designator(0, 5);
/// Analog input designator (0, 6).
/// Raspberry Pi boards don't have a built-in ADC (Analog to
/// Digital Converter) subsystem, so this is just a placeholder
/// for the first IIO (Industrial I/O) ADC device.
public static readonly Designator AIN6 = new Designator(0, 6);
/// Analog input designator (0, 7).
/// Raspberry Pi boards don't have a built-in ADC (Analog to
/// Digital Converter) subsystem, so this is just a placeholder
/// for the first IIO (Industrial I/O) ADC device.
public static readonly Designator AIN7 = new Designator(0, 7);
/// GPIO pin designator (0, 2). Conflicts with
/// I2C1 SDA.
public static readonly Designator GPIO2 = new Designator(0, 2);
/// GPIO pin designator (0, 3). Conflicts with
/// I2C1 SCL.
public static readonly Designator GPIO3 = new Designator(0, 3);
/// GPIO pin designator (0, 4).
public static readonly Designator GPIO4 = new Designator(0, 4);
/// GPIO pin designator (0, 5). Not available on early boards
/// with 26 pin expansion headers.
public static readonly Designator GPIO5 = new Designator(0, 5);
/// GPIO pin designator (0, 6). Not available on early boards
/// with 26 pin expansion headers.
public static readonly Designator GPIO6 = new Designator(0, 6);
/// GPIO pin designator (0, 7). Conflicts with
/// SPI0 SS1.
public static readonly Designator GPIO7 = new Designator(0, 7);
/// GPIO pin designator (0, 8). Conflicts with
/// SPI0 SS0.
public static readonly Designator GPIO8 = new Designator(0, 8);
/// GPIO pin designator (0, 9). Conflicts with
/// SPI0 MISO.
public static readonly Designator GPIO9 = new Designator(0, 9);
/// GPIO pin designator (0, 10). Conflicts with
/// SPI0 MOSI.
public static readonly Designator GPIO10 = new Designator(0, 10);
/// GPIO pin designator (0, 11). Conflicts with
/// SPI0 SCLK.
public static readonly Designator GPIO11 = new Designator(0, 11);
/// GPIO pin designator (0, 12). Not available on early boards
/// with 26 pin expansion headers.
public static readonly Designator GPIO12 = new Designator(0, 12);
/// GPIO pin designator (0, 13). Not available on early boards
/// with 26 pin expansion headers.
public static readonly Designator GPIO13 = new Designator(0, 13);
/// GPIO pin designator (0, 14). Conflicts with
/// UART0 TXD.
public static readonly Designator GPIO14 = new Designator(0, 14);
/// GPIO pin designator (0, 15). Conflicts with
/// UART0 RXD.
public static readonly Designator GPIO15 = new Designator(0, 15);
/// GPIO pin designator (0, 16). Conflicts with
/// SPI1 SS2. Not available on early boards
/// with 26 pin expansion headers.
public static readonly Designator GPIO16 = new Designator(0, 16);
/// GPIO pin designator (0, 17). Conflicts with
/// SPI1 SS1.
public static readonly Designator GPIO17 = new Designator(0, 17);
/// GPIO pin designator (0, 18). Conflicts with
/// PWM0 or SPI1 SS0.
public static readonly Designator GPIO18 = new Designator(0, 18);
/// GPIO pin designator (0, 19). Conflicts with
/// PWM1 or SPI1 MISO. Not available on early boards
/// with 26 pin expansion headers.
public static readonly Designator GPIO19 = new Designator(0, 19);
/// GPIO pin designator (0, 20). Conflicts with
/// SPI1 MOSI. Not available on early boards
/// with 26 pin expansion headers.
public static readonly Designator GPIO20 = new Designator(0, 20);
/// GPIO pin designator (0, 21). Conflicts with
/// SPI1 SCLK. Not available on early boards
/// with 26 pin expansion headers.
public static readonly Designator GPIO21 = new Designator(0, 21);
/// GPIO pin designator (0, 22).
public static readonly Designator GPIO22 = new Designator(0, 22);
/// GPIO pin designator (0, 23).
public static readonly Designator GPIO23 = new Designator(0, 23);
/// GPIO pin designator (0, 24).
public static readonly Designator GPIO24 = new Designator(0, 24);
/// GPIO pin designator (0, 25).
public static readonly Designator GPIO25 = new Designator(0, 25);
/// GPIO pin designator (0, 26). Not available on early boards
/// with 26 pin expansion headers.
public static readonly Designator GPIO26 = new Designator(0, 26);
/// GPIO pin designator (0, 27).
public static readonly Designator GPIO27 = new Designator(0, 27);
/// I2C bus designator (0, 1). Conflicts with GPIO2
/// and GPIO3.
public static readonly Designator I2C1 = new Designator(0, 1);
/// PWM output designator (0, 0). Conflicts with
/// GPIO12 or GPIO18. Requires the pwm.dtbo
/// device tree overlay.
public static readonly Designator PWM0 = new Designator(0, 0);
/// PWM output designator (0, 1). Conflicts with
/// GPIO13 or GPIO19. Requires the pwm.dtbo
/// device tree overlay.
public static readonly Designator PWM1 = new Designator(0, 1);
/// SPI slave designator (0, 0). Conflicts with
/// GPIO8.
public static readonly Designator SPI0_0 = new Designator(0, 0);
/// SPI slave designator (0, 1). Conflicts with
/// GPIO7.
public static readonly Designator SPI0_1 = new Designator(0, 1);
/// SPI slave designator (1, 0). Conflicts with
/// GPIO18 or PWM0. Requires one of the
/// spi1-1cs.dtbo, spi1-2cs.dtbo or spi1-3cs.dtbo
/// device tree overlays.
public static readonly Designator SPI1_0 = new Designator(1, 0);
/// SPI slave designator (1, 1). Conflicts with
/// GPIO17. Requires one of the spi1-1cs.dtbo,
/// spi1-2cs.dtbo or spi1-3cs.dtbo device tree
/// overlays.
public static readonly Designator SPI1_1 = new Designator(1, 1);
/// SPI slave designator (1, 2). Conflicts with
/// GPIO16. Requires one of the spi1-1cs.dtbo,
/// spi1-2cs.dtbo or spi1-3cs.dtbo device tree
/// overlays.
public static readonly Designator SPI1_2 = new Designator(1, 2);
}
}