diff options
author | Ketul Shah <ketulshah1993@gmail.com> | 2015-08-18 20:00:48 +0530 |
---|---|---|
committer | Ben Gras <ben@minix3.org> | 2015-08-18 17:05:55 +0200 |
commit | 151e53feabbe8ebdcbb491f06afeee8ea596ed6c (patch) | |
tree | 94c5a66a7f586931b847589b9b82054f48430c78 /c/src/lib/libbsp/arm/beagle/include/bbb-gpio.h | |
parent | Closes ticket #2390, and also updates the RPI implementation. (diff) | |
download | rtems-151e53feabbe8ebdcbb491f06afeee8ea596ed6c.tar.bz2 |
Beagle: GPIO support (for BBB)
GPIO Driver Development for BeagleBone Black based on the generic GPIO API
Diffstat (limited to 'c/src/lib/libbsp/arm/beagle/include/bbb-gpio.h')
-rw-r--r-- | c/src/lib/libbsp/arm/beagle/include/bbb-gpio.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/beagle/include/bbb-gpio.h b/c/src/lib/libbsp/arm/beagle/include/bbb-gpio.h new file mode 100644 index 0000000000..8cce556efd --- /dev/null +++ b/c/src/lib/libbsp/arm/beagle/include/bbb-gpio.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @ingroup arm_beagle + * + * @brief BeagleBone Black BSP definitions. + */ + +/** + * Copyright (c) 2015 Ketul Shah <ketulshah1993 at gmail.com> + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifndef LIBBSP_ARM_BEAGLE_BBB_GPIO_H +#define LIBBSP_ARM_BEAGLE_BBB_GPIO_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/** + * @brief BeagleBone Black GPIO functions. + */ +#define BBB_DIGITAL_IN 2 +#define BBB_DIGITAL_OUT 1 + +/** + * @brief BeagleBone Black GPIO pad configuration. + */ +#define BBB_PUDEN (1 << 3) +#define BBB_PUDDIS ~BBB_PUDEN +#define BBB_PU_EN (1 << 4) +#define BBB_PD_EN ~BBB_PU_EN +#define BBB_MUXMODE(X) (X & 0x7) + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* LIBBSP_ARM_BEAGLE_BBB_GPIO_H */
\ No newline at end of file |