64 return (
bool)((gpio->
GPADAT >> gpioNumber) & 0x0001);
119 gpio->
GPAPUD &= (~((uint32_t)1 << gpioNumber));
122 gpio->
GPAPUD |= (uint32_t)pullup << gpioNumber;
149 gpio->
GPADIR &= (~((uint32_t)1 << gpioNumber));
152 gpio->
GPADIR |= (uint32_t)direction << gpioNumber;
188 bool gpio_status = 0;
189 uint32_t gpio_read = 0;
194 gpio_read = (gpio->
GPADAT) & ((uint32_t)1 << gpioNumber);
224 gpio->
GPASET = (uint32_t)1 << gpioNumber;
246 gpio->
GPACLEAR = (uint32_t)1 << gpioNumber;
268 uint_least8_t lShift = gpioNumber << 1;
270 uint32_t setBits = (uint32_t)mode << lShift;
282 uint32_t setBits = (uint32_t)mode << lShift;
294 uint32_t setBits = (uint32_t)mode << lShift;
306 uint32_t setBits = (uint32_t)mode << lShift;
352 gpio->
GPAQSEL1 |= (uint32_t)qualification << (2 * gpioNumber);
388 gpio->
GPACTRL |= (uint32_t)period;
394 gpio->
GPACTRL |= (uint32_t)period << 8;
400 gpio->
GPACTRL |= (uint32_t)period << 16;
406 gpio->
GPACTRL |= (uint32_t)period << 24;
412 gpio->
GPBCTRL |= (uint32_t)period;
418 gpio->
GPBCTRL |= (uint32_t)period << 8;
424 gpio->
GPBCTRL |= (uint32_t)period << 16;
430 gpio->
GPBCTRL |= (uint32_t)period << 24;
448 gpio->
GPATOGGLE = (uint32_t)1 << gpioNumber;
467 gpio->
GPIOLPMSEL |= ((uint32_t)1 << gpioNumber);
void GPIO_setQualification(GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber, const GPIO_Qual_e qualification)
Sets the qualification for the specified general purpose I/O (GPIO)
GPIO_Mode_e
Enumeration to define the general purpose I/O (GPIO) modes for each pin.
bool GPIO_getData(GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber)
Returns the data value present on a pin (either input or output)
#define DISABLE_PROTECTED_REGISTER_WRITE_MODE
Define to disable protected register writes.
volatile uint32_t GPAQSEL1
GPIO A Qualifier Select 1 Register.
#define GPIO_GPMUX_NUMGPIOS_PER_REG
Defines number of GPIOs covered by each GPxMUX register.
void GPIO_setHigh(GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber)
Sets the specified general purpose I/O (GPIO) signal high.
volatile uint32_t GPADIR
GPIO A Direction Register.
Contains public interface to general purpose I/O (GPIO) methods.
volatile uint32_t GPASET
GPIO A Set Register.
volatile uint32_t GPBDIR
GPIO B Direction Register.
#define GPIO_GPxCTRL_QUALPRDx_BITS
Defines the location of the GPIOx bits in the GPxQSELy register.
GPIO_Handle GPIO_init(void *pMemory, const size_t numBytes)
Initializes the general purpose I/O (GPIO) object handle.
void GPIO_setQualificationPeriod(GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber, const uint_least8_t period)
Sets the qualification period for the specified general purpose I/O block (8 I/O's per block) ...
volatile uint32_t GPBQSEL2
GPIO B Qualifier Select 2 Register.
GPIO_Direction_e
Enumeration to define the general purpose I/O (GPIO) directions.
volatile uint32_t GPBSET
GPIO B Set Register.
#define ENABLE_PROTECTED_REGISTER_WRITE_MODE
Define to allow protected register writes.
volatile uint32_t GPBCLEAR
GPIO B Clear Register.
#define GPIO_GPMUX_CONFIG_BITS
Defines the location of the CONFIG bits in the GPMUX register.
volatile uint32_t GPAPUD
GPIO A Pull Up Disable Register.
volatile uint32_t GPACTRL
GPIO A Control Register.
volatile uint32_t GPIOLPMSEL
GPIO Low Power Mode Wakeup Select Register.
volatile uint32_t GPBTOGGLE
GPIO B Toggle Register.
GPIO_Pullup_e
Enumeration to define the general purpose I/O (GPIO) pullups.
#define GPIO_GPxQSELx_NUMGPIOS_PER_REG
Defines number of GPIOs covered by each GPxQSELy register.
bool GPIO_read(GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber)
Reads the specified general purpose I/O (GPIO)
Defines the General Purpose I/O (GPIO) object.
volatile uint32_t GPBQSEL1
GPIO B Qualifier Select 1 Register.
void GPIO_setPullup(GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber, const GPIO_Pullup_e pullup)
Sets the general purpose I/O (GPIO) pullup disable.
void GPIO_setDirection(GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber, const GPIO_Direction_e direction)
Sets the general purpose I/O (GPIO) signal direction.
volatile uint32_t GPBDAT
GPIO B Data Register.
volatile uint32_t GPBMUX1
GPIO B MUX 1 Register.
#define GPIO_GPxCTRL_QUALPRDx_NUMBITS_PER_REG
Defines number of bits per QUALPRDx field per GPxCTRL register.
void GPIO_setLow(GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber)
Sets the specified general purpose I/O (GPIO) signal low.
uint16_t GPIO_getPortData(GPIO_Handle gpioHandle, const GPIO_Port_e gpioPort)
Returns the data value present on a GPIO port.
volatile uint32_t GPBCTRL
GPIO B Control Register.
volatile uint32_t GPAMUX1
GPIO A MUX 1 Register.
void GPIO_setPortData(GPIO_Handle gpioHandle, const GPIO_Port_e gpioPort, const uint16_t data)
Sets data output on a given GPIO port.
volatile uint32_t GPATOGGLE
GPIO A Toggle Register.
void GPIO_toggle(GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber)
Toggles the specified general purpose I/O (GPIO) signal.
CPU_ExtIntNumber_e
Enumeration to define the external interrupt numbers.
volatile uint32_t GPBMUX2
GPIO B MUX 2 Register.
struct _GPIO_Obj_ * GPIO_Handle
Defines the general purpose I/O (GPIO) handle.
volatile uint32_t GPBPUD
GPIO B Pull Up Disable Register.
volatile uint32_t GPACLEAR
GPIO A Clear Register.
GPIO_Qual_e
Enumeration to define the general purpose I/O (GPIO) qualification.
volatile uint32_t GPAMUX2
GPIO A MUX 2 Register.
volatile uint32_t GPADAT
GPIO A Data Register.
volatile uint32_t GPAQSEL2
GPIO A Qualifier Select 2 Register.
void GPIO_setMode(GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber, const GPIO_Mode_e mode)
Sets the mode for the specified general purpose I/O (GPIO) signal.
void GPIO_lpmSelect(GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber)
Selects a gpio pin to wake up device from STANDBY and HALT LPM.
void GPIO_setExtInt(GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber, const CPU_ExtIntNumber_e intNumber)
Sets the general purpose I/O (GPIO) external interrupt number.
volatile uint16_t GPIOXINTnSEL[3]
XINT1-3 Source Select Registers.
GPIO_Number_e
Enumeration to define the general purpose I/O (GPIO) numbers.
#define GPIO_GPxQSELy_GPIOx_BITS
Defines the location of the GPIOx bits in the GPxQSELy register.
GPIO_Port_e
Enumeration to define the general purpose I/O (GPIO) ports.