BBBCSIO

The GpioEnum Enum

 

The GpioEnum Enum

The GpioEnum enum defines the available GPIOs on the Beaglebone Black. The source code below lists all possible GPIO values. There are gaps in this list because some GPIO's, although theoretically present, are not exposed on the P8 and P9 headers as pins and hence cannot be used.

The GPIOs are not exposed on the P8 or P9 header in any particularly logical order. You must refer to the Beaglebone Black P8 or P9 header pinouts in order to determine on which header and pin the GPIO appears.

 

Warnings - READ THIS!!!

The source code below lists all possible GPIO values. You CAN NOT assume that, by default, any particular GPIO is available for use on your Beaglebone Black and that it is configured correctly as an input or output. Any one GPIO can be used for over half a dozen different peripherals (UART, SPI bus, PWM, A/D etc). In particular, the HDMI display and the EMMC memory use large swathes of the available GPIO range. Simply just picking a GPIO at random and using it could cause a great deal of trouble and possibly physical damage to your Beaglebone Black.

Before using any BBBCSIO Port class on a GPIO you will need to ensure that the GPIO is actually configured in the PinMux as a GPIO and also that it is also set appropriately as an input or output. There is no code you can call in the BBBCSIO library which does this. You MUST configure the GPIO externally prior to running your executable - usually this is done by editing the device tree.

 

Source Code

The source code for this class is available online for download and also in browseable form.

 

Syntax

    public enum GpioEnum
    {
        GPIO_NONE,
        GPIO_2,
        GPIO_3,
        GPIO_4,
        GPIO_5,
        GPIO_7,
        GPIO_8,
        GPIO_9,
        GPIO_10,
        GPIO_11,
        GPIO_12,
        GPIO_13,
        GPIO_14,
        GPIO_15,
        GPIO_20,
        GPIO_22,
        GPIO_23,
        GPIO_26,
        GPIO_27,
        GPIO_30,
        GPIO_31,
        GPIO_32,
        GPIO_33,
        GPIO_34,
        GPIO_35,
        GPIO_36,
        GPIO_37,
        GPIO_38,
        GPIO_39,
        GPIO_44,
        GPIO_45,
        GPIO_46,
        GPIO_47,
        GPIO_48,
        GPIO_49,
        GPIO_50,
        GPIO_51,
        GPIO_60,
        GPIO_61,
        GPIO_62,
        GPIO_63,
        GPIO_65,
        GPIO_66,
        GPIO_67,
        GPIO_68,
        GPIO_69,
        GPIO_70,
        GPIO_71,
        GPIO_72,
        GPIO_73,
        GPIO_74,
        GPIO_75,
        GPIO_76,
        GPIO_77,
        GPIO_78,
        GPIO_79,
        GPIO_80,
        GPIO_81,
        GPIO_86,
        GPIO_87,
        GPIO_88,
        GPIO_89,
        GPIO_110,
        GPIO_111,
        GPIO_112,
        GPIO_113,
        GPIO_115,
        GPIO_117
    }