36#ifndef _FREERTOS_DRIVERS_TI_TIVAGPIOGENERIC_HXX_
37#define _FREERTOS_DRIVERS_TI_TIVAGPIOGENERIC_HXX_
41#include "driverlib/gpio.h"
42#include "driverlib/pin_map.h"
43#include "driverlib/sysctl.h"
44#include "inc/hw_gpio.h"
45#include "inc/hw_memmap.h"
46#include "inc/hw_types.h"
48#include "GPIOGeneric.hxx"
76 bool set = (HWREG(
base + (GPIO_O_DATA + (bit << 2))) != 0);
77 return invert ? !
set :
set;
87 bool clr = (HWREG(
base + (GPIO_O_DATA + (bit << 2))) == 0);
88 return invert ? !
clr :
clr;
96 HWREG(
base + (GPIO_O_DATA + (bit << 2))) = invert ? 0 : 0xFF;
104 HWREG(
base + (GPIO_O_DATA + (bit << 2))) = invert ? 0xFF : 0;
TivaGpioMapping
Mapping of Tiva GPIO names found in the literature to generic gpio numbers.
@ PIN_COUNT
Total number of GPIO pins.
OS-independent abstraction for GPIO.
Value
Defines the options for GPIO level.
Generic GPIO class implementation.
constexpr TivaGpio()
This constructor is constexpr which ensures that the object can be initialized in the data section.
bool is_clr() OVERRIDE
Test the GPIO pin to see if it is clear.
bool is_set() OVERRIDE
Test the GPIO pin to see if it is set.
void clr() const OVERRIDE
Clears the GPIO output pin to low.
uint32_t base
BASE address of the GPIO.
void clr() OVERRIDE
Clear the GPIO to a '0'.
void set() OVERRIDE
Set the GPIO to a '1'.
Direction direction() const OVERRIDE
Gets the GPIO direction.
void set() const OVERRIDE
Sets the GPIO output pin to high.
#define OVERRIDE
Function attribute for virtual functions declaring that this funciton is overriding a funciton that s...
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Removes default copy-constructor and assignment added by C++.