theCore C++ embedded framework
|
Data Structures | |
struct | pin_bin |
Gather given pins into one bin, suitable for passing to the TivaWare functions. More... | |
struct | pin_bin< Gn > |
Enumerations | |
enum | port { port::a = GPIO_PORTA_BASE, port::b = GPIO_PORTB_BASE, port::c = GPIO_PORTC_BASE, port::d = GPIO_PORTD_BASE, port::e = GPIO_PORTE_BASE, port::f = GPIO_PORTF_BASE } |
GPIO ports. More... | |
enum | num { num::pin0 = GPIO_PIN_0, num::pin1 = GPIO_PIN_1, num::pin2 = GPIO_PIN_2, num::pin3 = GPIO_PIN_3, num::pin4 = GPIO_PIN_4, num::pin5 = GPIO_PIN_5, num::pin6 = GPIO_PIN_6, num::pin7 = GPIO_PIN_7 } |
GPIO numbers. More... | |
enum | dir { dir::in = GPIO_DIR_MODE_IN, dir::out = GPIO_DIR_MODE_OUT, dir::hw = GPIO_DIR_MODE_HW } |
GPIO directions. More... | |
enum | pad_type { pad_type::push_pull = GPIO_PIN_TYPE_STD, pad_type::pull = GPIO_PIN_TYPE_STD_WPD, pad_type::push = GPIO_PIN_TYPE_STD_WPU, pad_type::od = GPIO_PIN_TYPE_OD, pad_type::analog = GPIO_PIN_TYPE_ANALOG, pad_type::wake_high = GPIO_PIN_TYPE_WAKE_HIGH, pad_type::wake_low = GPIO_PIN_TYPE_WAKE_LOW } |
GPIO types. More... | |
enum | strength { strength::i2ma = GPIO_STRENGTH_2MA, strength::i4ma = GPIO_STRENGTH_4MA, strength::i6ma = GPIO_STRENGTH_6MA, strength::i8ma = GPIO_STRENGTH_8MA, strength::i8ma_sc = GPIO_STRENGTH_8MA_SC, strength::i10ma = GPIO_STRENGTH_10MA, strength::i12ma = GPIO_STRENGTH_12MA } |
GPIO maximum current rating, in milliamperes. More... | |
enum | int_source { int_source::falling = GPIO_FALLING_EDGE, int_source::rising = GPIO_RISING_EDGE, int_source::both = GPIO_BOTH_EDGES, int_source::low = GPIO_LOW_LEVEL, int_source::high = GPIO_HIGH_LEVEL, int_source::discrete = GPIO_DISCRETE_INT } |
GPIO Interrupt sources. More... | |
Functions | |
template<port Pt> | |
static constexpr auto | get_periph () |
Gets peripheral associated with given port. More... | |
template<port Pt> | |
static void | enable_periph () |
Enables peripheral for given port. More... | |
template<port Pt, num P, num ... Pn> | |
static void | apply_cfg (dir d=dir::out, pad_type t=pad_type::push_pull, strength s=strength::i2ma) |
Applies given configuration for given GPIOs. More... | |
static constexpr auto | get_irqn (port pt) |
Obtains IRQ number of given port. More... | |
static constexpr auto | get_pin_intflag (num n) |
Obtains interrupt flag used for corresponding GPIO pin. More... | |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
static |
Gets peripheral associated with given port.
|
inlinestatic |
Enables peripheral for given port.
|
inlinestatic |
Applies given configuration for given GPIOs.
Pt | GPIO port. |
P | GPIO pin. |
Pn | Rest of GPIO pins (optional) |
[in] | d | Direction of pins. |
[in] | t | Types of pins. |
[in] | s | Maximum current of pins. |
|
inlinestatic |
Obtains IRQ number of given port.
pt | Port for whom IRQn must be obtained. |
|
inlinestatic |
Obtains interrupt flag used for corresponding GPIO pin.
n | Pin for whom interrup flag must be obtained. |