2 * @file bbb_pin_defines.h
3 * @brief Defines pins on Beaglebone Black
6 #ifndef _BBB_PIN_DEFINES_H
7 #define _BBB_PIN_DEFINES_H
12 #define GPIO0_2 2 // Used for PWM
13 #define GPIO0_3 3 // Used for PWM
114 /** Number of useable GPIO pins **/
115 #define GPIO_NUM_PINS 50
118 #define GPIO_LUT_SIZE 93
119 #define GPIO_INDEX_SIZE 128
120 extern const unsigned char g_pin_to_gpio[GPIO_LUT_SIZE];
121 extern const unsigned char g_gpio_to_index[GPIO_INDEX_SIZE];
122 extern const unsigned char g_index_to_gpio[GPIO_NUM_PINS];
125 #define GPIO_DEVICE_PATH "/sys/class/gpio"
138 /** Number of ADC pins **/
139 #define ADC_NUM_PINS 8
141 /** Path to export ADCs with**/
142 #define ADC_EXPORT_PATH "/sys/devices/bone_capemgr.9/slots"
143 /** Path at which ADCs appear **/
144 #define ADC_DEVICE_PATH "/sys/devices/ocp.3/helper.16"
149 // No other PWM pins work!
151 /** Number of PWM pins **/
152 #define PWM_NUM_PINS 2
154 /** Path to PWM sysfs **/
155 #define PWM_DEVICE_PATH "/sys/class/pwm"
158 #endif //_BBB_PIN_DEFINES_H