summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/beagle/include/bbb-gpio.h
blob: 8cce556efd0b0fb0c8224215e5c3a176b61abffd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 */