MotorWare f2806x Driver API Documentation
Data Structures | Macros | Typedefs | Enumerations | Functions
GPIO

Data Structures

struct  _GPIO_Obj_
 Defines the General Purpose I/O (GPIO) object. More...
 

Macros

#define GPIO_BASE_ADDR   (0x00006F80)
 Defines the base address of the general purpose I/O (GPIO) registers. More...
 
#define GPIO_GPMUX_CONFIG_BITS   (3 << 0)
 Defines the location of the CONFIG bits in the GPMUX register. More...
 
#define GPIO_GPMUX_NUMGPIOS_PER_REG   16
 Defines number of GPIOs covered by each GPxMUX register. More...
 
#define GPIO_GPxQSELy_GPIOx_BITS   3
 Defines the location of the GPIOx bits in the GPxQSELy register. More...
 
#define GPIO_GPxQSELx_NUMGPIOS_PER_REG   16
 Defines number of GPIOs covered by each GPxQSELy register. More...
 
#define GPIO_GPxCTRL_QUALPRDx_BITS   0xFF
 Defines the location of the GPIOx bits in the GPxQSELy register. More...
 
#define GPIO_GPxCTRL_QUALPRDx_NUMBITS_PER_REG   8
 Defines number of bits per QUALPRDx field per GPxCTRL register. More...
 

Typedefs

typedef struct _GPIO_Obj_ GPIO_Obj
 Defines the General Purpose I/O (GPIO) object. More...
 
typedef struct _GPIO_Obj_GPIO_Handle
 Defines the general purpose I/O (GPIO) handle. More...
 

Enumerations

enum  GPIO_Mode_e {
  GPIO_0_Mode_GeneralPurpose =0, GPIO_0_Mode_EPWM1A, GPIO_0_Mode_Rsvd_2, GPIO_0_Mode_Rsvd_3,
  GPIO_1_Mode_GeneralPurpose =0, GPIO_1_Mode_EPWM1B, GPIO_1_Mode_Rsvd_2, GPIO_1_Mode_COMP1OUT,
  GPIO_2_Mode_GeneralPurpose =0, GPIO_2_Mode_EPWM2A, GPIO_2_Mode_Rsvd_2, GPIO_2_Mode_Rsvd_3,
  GPIO_3_Mode_GeneralPurpose =0, GPIO_3_Mode_EPWM2B, GPIO_3_Mode_SPISOMIA, GPIO_3_Mode_COMP2OUT,
  GPIO_4_Mode_GeneralPurpose =0, GPIO_4_Mode_EPWM3A, GPIO_4_Mode_Rsvd_2, GPIO_4_Mode_Rsvd_3,
  GPIO_5_Mode_GeneralPurpose =0, GPIO_5_Mode_EPWM3B, GPIO_5_Mode_SPISIMOA, GPIO_5_Mode_ECAP1,
  GPIO_6_Mode_GeneralPurpose =0, GPIO_6_Mode_EPWM4A, GPIO_6_Mode_EPWMSYNCI, GPIO_6_Mode_EPWMSYNCO,
  GPIO_7_Mode_GeneralPurpose =0, GPIO_7_Mode_EPWM4B, GPIO_7_Mode_SCIRXDA, GPIO_7_Mode_ECAP2,
  GPIO_8_Mode_GeneralPurpose =0, GPIO_8_Mode_EPWM5A, GPIO_8_Mode_Rsvd_2, GPIO_8_Mode_ADCSOCAO_NOT,
  GPIO_9_Mode_GeneralPurpose =0, GPIO_9_Mode_EPWM5B, GPIO_9_Mode_SCITXDB, GPIO_9_Mode_ECAP3,
  GPIO_10_Mode_GeneralPurpose =0, GPIO_10_Mode_EPWM6A, GPIO_10_Mode_Rsvd_2, GPIO_10_Mode_ADCSOCBO_NOT,
  GPIO_11_Mode_GeneralPurpose =0, GPIO_11_Mode_EPWM6B, GPIO_11_Mode_SCIRXDB, GPIO_11_Mode_ECAP1,
  GPIO_12_Mode_GeneralPurpose =0, GPIO_12_Mode_TZ1_NOT, GPIO_12_Mode_SCITXDA, GPIO_12_Mode_SPISIMOB,
  GPIO_13_Mode_GeneralPurpose =0, GPIO_13_Mode_TZ2_NOT, GPIO_13_Mode_Rsvd_2, GPIO_13_Mode_SPISOMIB,
  GPIO_14_Mode_GeneralPurpose =0, GPIO_14_Mode_TZ3_NOT, GPIO_14_Mode_SCITXDB, GPIO_14_Mode_SPICLKB,
  GPIO_15_Mode_GeneralPurpose =0, GPIO_15_Mode_ECAP2, GPIO_15_Mode_SCIRXDB, GPIO_15_Mode_SPISTEB_NOT,
  GPIO_16_Mode_GeneralPurpose =0, GPIO_16_Mode_SPISIMOA, GPIO_16_Mode_Rsvd_2, GPIO_16_Mode_TZ2_NOT,
  GPIO_17_Mode_GeneralPurpose =0, GPIO_17_Mode_SPISOMIA, GPIO_17_Mode_Rsvd_2, GPIO_17_Mode_TZ3_NOT,
  GPIO_18_Mode_GeneralPurpose =0, GPIO_18_Mode_SPICLKA, GPIO_18_Mode_SCITXDB, GPIO_18_Mode_XCLKOUT,
  GPIO_19_Mode_GeneralPurpose =0, GPIO_19_Mode_SPISTEA_NOT, GPIO_19_Mode_SCIRXDB, GPIO_19_Mode_ECAP1,
  GPIO_20_Mode_GeneralPurpose =0, GPIO_20_Mode_EQEP1A, GPIO_20_Mode_MDXA, GPIO_20_Mode_COMP1OUT,
  GPIO_21_Mode_GeneralPurpose =0, GPIO_21_Mode_EQEP1B, GPIO_21_Mode_MDRA, GPIO_21_Mode_COMP2OUT,
  GPIO_22_Mode_GeneralPurpose =0, GPIO_22_Mode_EQEP1S, GPIO_22_Mode_MCLKXA, GPIO_22_Mode_SCITXDB,
  GPIO_23_Mode_GeneralPurpose =0, GPIO_23_Mode_EQEP1I, GPIO_23_Mode_MFSXA, GPIO_23_Mode_SCIRXDB,
  GPIO_24_Mode_GeneralPurpose =0, GPIO_24_Mode_ECAP1, GPIO_24_Mode_EQEP2A, GPIO_24_Mode_SPISIMOB,
  GPIO_25_Mode_GeneralPurpose =0, GPIO_25_Mode_ECAP2, GPIO_25_Mode_EQEP2B, GPIO_25_Mode_SPISOMIB,
  GPIO_26_Mode_GeneralPurpose =0, GPIO_26_Mode_ECAP3, GPIO_26_Mode_EQEP2I, GPIO_26_Mode_SPICLKB,
  GPIO_27_Mode_GeneralPurpose =0, GPIO_27_Mode_HRCAP2, GPIO_27_Mode_EQEP2S, GPIO_27_Mode_SPISTEB_NOT,
  GPIO_28_Mode_GeneralPurpose =0, GPIO_28_Mode_SCIRXDA, GPIO_28_Mode_SDDA, GPIO_28_Mode_TZ2_NOT,
  GPIO_29_Mode_GeneralPurpose =0, GPIO_29_Mode_SCITXDA, GPIO_29_Mode_SCLA, GPIO_29_Mode_TZ3_NOT,
  GPIO_30_Mode_GeneralPurpose =0, GPIO_30_Mode_CANRXA, GPIO_30_Mode_EQEP2I, GPIO_30_Mode_EPWM7A,
  GPIO_31_Mode_GeneralPurpose =0, GPIO_31_Mode_CANTXA, GPIO_31_Mode_EQEP2S, GPIO_31_Mode_EPWM8A,
  GPIO_32_Mode_GeneralPurpose =0, GPIO_32_Mode_SDAA, GPIO_32_Mode_EPWMSYNCI, GPIO_32_Mode_ADCSOCAO_NOT,
  GPIO_33_Mode_GeneralPurpose =0, GPIO_33_Mode_SCLA, GPIO_33_Mode_EPWMSYNCO, GPIO_33_Mode_ADCSOCBO_NOT,
  GPIO_34_Mode_GeneralPurpose =0, GPIO_34_Mode_COMP2OUT, GPIO_34_Mode_Rsvd_2, GPIO_34_Mode_COMP3OUT,
  GPIO_35_Mode_JTAG_TDI =0, GPIO_35_Mode_Rsvd_1, GPIO_35_Mode_Rsvd_2, GPIO_35_Mode_Rsvd_3,
  GPIO_36_Mode_JTAG_TMS =0, GPIO_36_Mode_Rsvd_1, GPIO_36_Mode_Rsvd_2, GPIO_36_Mode_Rsvd_3,
  GPIO_37_Mode_JTAG_TDO =0, GPIO_37_Mode_Rsvd_1, GPIO_37_Mode_Rsvd_2, GPIO_37_Mode_Rsvd_3,
  GPIO_38_Mode_JTAG_TCK =0, GPIO_38_Mode_Rsvd_1, GPIO_38_Mode_Rsvd_2, GPIO_38_Mode_Rsvd_3,
  GPIO_39_Mode_GeneralPurpose =0, GPIO_39_Mode_Rsvd_1, GPIO_39_Mode_Rsvd_2, GPIO_39_Mode_Rsvd_3,
  GPIO_40_Mode_GeneralPurpose =0, GPIO_40_Mode_EPWM7A, GPIO_40_Mode_SCITXDB, GPIO_40_Mode_Rsvd_3,
  GPIO_41_Mode_GeneralPurpose =0, GPIO_41_Mode_EPWM7B, GPIO_41_Mode_SCIRXDB, GPIO_41_Mode_Rsvd_3,
  GPIO_42_Mode_GeneralPurpose =0, GPIO_42_Mode_EPWM8A, GPIO_42_Mode_TZ1_NOT, GPIO_42_Mode_COMP1OUT,
  GPIO_43_Mode_GeneralPurpose =0, GPIO_43_Mode_EPWM8B, GPIO_43_Mode_TZ2_NOT, GPIO_43_Mode_COMP2OUT,
  GPIO_44_Mode_GeneralPurpose =0, GPIO_44_Mode_MFSRA, GPIO_44_Mode_SCIRXDB, GPIO_44_Mode_EPWM7B,
  GPIO_50_Mode_GeneralPurpose =0, GPIO_50_Mode_EQEP1A, GPIO_50_Mode_MDXA, GPIO_50_Mode_TZ1_NOT,
  GPIO_51_Mode_GeneralPurpose =0, GPIO_51_Mode_EQEP1B, GPIO_51_Mode_MDRA, GPIO_51_Mode_TZ2_NOT,
  GPIO_52_Mode_GeneralPurpose =0, GPIO_52_Mode_EQEP1S, GPIO_52_Mode_MCLKXA, GPIO_52_Mode_TZ3_NOT,
  GPIO_53_Mode_GeneralPurpose =0, GPIO_53_Mode_EQEP1I, GPIO_53_Mode_MFSXA, GPIO_53_Mode_Rsvd_1,
  GPIO_54_Mode_GeneralPurpose =0, GPIO_54_Mode_SPISIMOA, GPIO_54_Mode_EQEP2A, GPIO_54_Mode_HRCAP1,
  GPIO_55_Mode_GeneralPurpose =0, GPIO_55_Mode_SPISOMIA, GPIO_55_Mode_EQEP2B, GPIO_55_Mode_HRCAP2,
  GPIO_56_Mode_GeneralPurpose =0, GPIO_56_Mode_SPICLKA, GPIO_56_Mode_EQEP2I, GPIO_56_Mode_HRCAP3,
  GPIO_57_Mode_GeneralPurpose =0, GPIO_57_Mode_SPISTEA_NOT, GPIO_57_Mode_EQEP2S, GPIO_57_Mode_HRCAP4,
  GPIO_58_Mode_GeneralPurpose =0, GPIO_58_Mode_MCLKRA, GPIO_58_Mode_SCITXDB, GPIO_58_Mode_EPWM7A
}
 Enumeration to define the general purpose I/O (GPIO) modes for each pin. More...
 
enum  GPIO_Direction_e { GPIO_Direction_Input =0, GPIO_Direction_Output }
 Enumeration to define the general purpose I/O (GPIO) directions. More...
 
enum  GPIO_Pullup_e { GPIO_Pullup_Enable =0, GPIO_Pullup_Disable }
 Enumeration to define the general purpose I/O (GPIO) pullups. More...
 
enum  GPIO_Qual_e { GPIO_Qual_Sync = 0, GPIO_Qual_Sample_3, GPIO_Qual_Sample_6, GPIO_Qual_ASync }
 Enumeration to define the general purpose I/O (GPIO) qualification. More...
 
enum  GPIO_Port_e { GPIO_Port_A = 0, GPIO_Port_B }
 Enumeration to define the general purpose I/O (GPIO) ports. More...
 
enum  GPIO_Number_e {
  GPIO_Number_0 =0, GPIO_Number_1, GPIO_Number_2, GPIO_Number_3,
  GPIO_Number_4, GPIO_Number_5, GPIO_Number_6, GPIO_Number_7,
  GPIO_Number_8, GPIO_Number_9, GPIO_Number_10, GPIO_Number_11,
  GPIO_Number_12, GPIO_Number_13, GPIO_Number_14, GPIO_Number_15,
  GPIO_Number_16, GPIO_Number_17, GPIO_Number_18, GPIO_Number_19,
  GPIO_Number_20, GPIO_Number_21, GPIO_Number_22, GPIO_Number_23,
  GPIO_Number_24, GPIO_Number_25, GPIO_Number_26, GPIO_Number_27,
  GPIO_Number_28, GPIO_Number_29, GPIO_Number_30, GPIO_Number_31,
  GPIO_Number_32, GPIO_Number_33, GPIO_Number_34, GPIO_Number_35,
  GPIO_Number_36, GPIO_Number_37, GPIO_Number_38, GPIO_Number_39,
  GPIO_Number_40, GPIO_Number_41, GPIO_Number_42, GPIO_Number_43,
  GPIO_Number_44, GPIO_Number_50 =50, GPIO_Number_51, GPIO_Number_52,
  GPIO_Number_53, GPIO_Number_54, GPIO_Number_55, GPIO_Number_56,
  GPIO_Number_57, GPIO_Number_58, GPIO_numGpios
}
 Enumeration to define the general purpose I/O (GPIO) numbers. More...
 

Functions

bool GPIO_getData (GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber)
 Returns the data value present on a pin (either input or output) More...
 
uint16_t GPIO_getPortData (GPIO_Handle gpioHandle, const GPIO_Port_e gpioPort)
 Returns the data value present on a GPIO port. More...
 
GPIO_Handle GPIO_init (void *pMemory, const size_t numBytes)
 Initializes the general purpose I/O (GPIO) object handle. More...
 
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. More...
 
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. More...
 
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. More...
 
void GPIO_setLow (GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber)
 Sets the specified general purpose I/O (GPIO) signal low. More...
 
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. More...
 
bool GPIO_read (GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber)
 Reads the specified general purpose I/O (GPIO) More...
 
void GPIO_setHigh (GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber)
 Sets the specified general purpose I/O (GPIO) signal high. More...
 
void GPIO_setPortData (GPIO_Handle gpioHandle, const GPIO_Port_e gpioPort, const uint16_t data)
 Sets data output on a given GPIO port. More...
 
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) More...
 
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) More...
 
void GPIO_toggle (GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber)
 Toggles the specified general purpose I/O (GPIO) signal. More...
 
void GPIO_lpmSelect (GPIO_Handle gpioHandle, const GPIO_Number_e gpioNumber)
 Selects a gpio pin to wake up device from STANDBY and HALT LPM. More...
 

Detailed Description


Data Structure Documentation

struct _GPIO_Obj_

Defines the General Purpose I/O (GPIO) object.

Definition at line 423 of file gpio.h.

Data Fields
volatile uint32_t AIOCLEAR Analog I/O Clear Register.
volatile uint32_t AIODAT Analog I/O Data Register.
volatile uint32_t AIODIR Analog, I/O Direction Register.
volatile uint32_t AIOMUX1 Analog, I/O Mux 1 Register.
volatile uint32_t AIOSET Analog I/O Data Set Register.
volatile uint32_t AIOTOGGLE Analog I/O Toggle Register.
volatile uint32_t GPACLEAR GPIO A Clear Register.
volatile uint32_t GPACTRL GPIO A Control Register.
volatile uint32_t GPADAT GPIO A Data Register.
volatile uint32_t GPADIR GPIO A Direction Register.
volatile uint32_t GPAMUX1 GPIO A MUX 1 Register.
volatile uint32_t GPAMUX2 GPIO A MUX 2 Register.
volatile uint32_t GPAPUD GPIO A Pull Up Disable Register.
volatile uint32_t GPAQSEL1 GPIO A Qualifier Select 1 Register.
volatile uint32_t GPAQSEL2 GPIO A Qualifier Select 2 Register.
volatile uint32_t GPASET GPIO A Set Register.
volatile uint32_t GPATOGGLE GPIO A Toggle Register.
volatile uint32_t GPBCLEAR GPIO B Clear Register.
volatile uint32_t GPBCTRL GPIO B Control Register.
volatile uint32_t GPBDAT GPIO B Data Register.
volatile uint32_t GPBDIR GPIO B Direction Register.
volatile uint32_t GPBMUX1 GPIO B MUX 1 Register.
volatile uint32_t GPBMUX2 GPIO B MUX 2 Register.
volatile uint32_t GPBPUD GPIO B Pull Up Disable Register.
volatile uint32_t GPBQSEL1 GPIO B Qualifier Select 1 Register.
volatile uint32_t GPBQSEL2 GPIO B Qualifier Select 2 Register.
volatile uint32_t GPBSET GPIO B Set Register.
volatile uint32_t GPBTOGGLE GPIO B Toggle Register.
volatile uint32_t GPIOLPMSEL GPIO Low Power Mode Wakeup Select Register.
volatile uint16_t GPIOXINTnSEL[3] XINT1-3 Source Select Registers.
volatile uint16_t rsvd_1[2] Reserved.
volatile uint16_t rsvd_4[24] Reserved.
volatile uint16_t rsvd_5[2] Reserved.
volatile uint16_t rsvd_6[4] Reserved.
volatile uint16_t rsvd_7[8] Reserved.
volatile uint16_t rsvd_8[5] Reserved.

Macro Definition Documentation

#define GPIO_BASE_ADDR   (0x00006F80)

Defines the base address of the general purpose I/O (GPIO) registers.

Definition at line 66 of file gpio.h.

#define GPIO_GPMUX_CONFIG_BITS   (3 << 0)

Defines the location of the CONFIG bits in the GPMUX register.

Definition at line 71 of file gpio.h.

Referenced by GPIO_setMode().

#define GPIO_GPMUX_NUMGPIOS_PER_REG   16

Defines number of GPIOs covered by each GPxMUX register.

Definition at line 74 of file gpio.h.

Referenced by GPIO_setMode().

#define GPIO_GPxCTRL_QUALPRDx_BITS   0xFF

Defines the location of the GPIOx bits in the GPxQSELy register.

Definition at line 88 of file gpio.h.

Referenced by GPIO_setQualificationPeriod().

#define GPIO_GPxCTRL_QUALPRDx_NUMBITS_PER_REG   8

Defines number of bits per QUALPRDx field per GPxCTRL register.

Definition at line 92 of file gpio.h.

Referenced by GPIO_setQualificationPeriod().

#define GPIO_GPxQSELx_NUMGPIOS_PER_REG   16

Defines number of GPIOs covered by each GPxQSELy register.

Definition at line 83 of file gpio.h.

Referenced by GPIO_setQualification().

#define GPIO_GPxQSELy_GPIOx_BITS   3

Defines the location of the GPIOx bits in the GPxQSELy register.

Definition at line 79 of file gpio.h.

Referenced by GPIO_setQualification().

Typedef Documentation

typedef struct _GPIO_Obj_* GPIO_Handle

Defines the general purpose I/O (GPIO) handle.

Definition at line 466 of file gpio.h.

typedef struct _GPIO_Obj_ GPIO_Obj

Defines the General Purpose I/O (GPIO) object.

Enumeration Type Documentation

Enumeration to define the general purpose I/O (GPIO) directions.

Enumerator
GPIO_Direction_Input 

Denotes an input direction.

GPIO_Direction_Output 

Denotes an output direction.

Definition at line 323 of file gpio.h.

Enumeration to define the general purpose I/O (GPIO) modes for each pin.

Enumerator
GPIO_0_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_0_Mode_EPWM1A 

Denotes a EPWM1A function.

GPIO_0_Mode_Rsvd_2 

Denotes a reserved function.

GPIO_0_Mode_Rsvd_3 

Denotes a reserved function.

GPIO_1_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_1_Mode_EPWM1B 

Denotes a EPWM1B function.

GPIO_1_Mode_Rsvd_2 

Denotes a reserved function.

GPIO_1_Mode_COMP1OUT 

Denotes a COMP1OUT function.

GPIO_2_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_2_Mode_EPWM2A 

Denotes a EPWM2A function.

GPIO_2_Mode_Rsvd_2 

Denotes a reserved function.

GPIO_2_Mode_Rsvd_3 

Denotes a reserved function.

GPIO_3_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_3_Mode_EPWM2B 

Denotes a EPWM2B function.

GPIO_3_Mode_SPISOMIA 

Denotes a SPISOMIA function.

GPIO_3_Mode_COMP2OUT 

Denotes a COMP2OUT function.

GPIO_4_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_4_Mode_EPWM3A 

Denotes a EPWM3A function.

GPIO_4_Mode_Rsvd_2 

Denotes a reserved function.

GPIO_4_Mode_Rsvd_3 

Denotes a reserved function.

GPIO_5_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_5_Mode_EPWM3B 

Denotes a EPWM3B function.

GPIO_5_Mode_SPISIMOA 

Denotes a SPISOMIA function.

GPIO_5_Mode_ECAP1 

Denotes a ECAP1 function.

GPIO_6_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_6_Mode_EPWM4A 

Denotes a EPWM4A function.

GPIO_6_Mode_EPWMSYNCI 

Denotes a EPWMSYNCI function.

GPIO_6_Mode_EPWMSYNCO 

Denotes a EPWMSYNCO function.

GPIO_7_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_7_Mode_EPWM4B 

Denotes a EPWM4B function.

GPIO_7_Mode_SCIRXDA 

Denotes a SCIRXDA function.

GPIO_7_Mode_ECAP2 

Denotes a ECAP2 function.

GPIO_8_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_8_Mode_EPWM5A 

Denotes a EPWM5A function.

GPIO_8_Mode_Rsvd_2 

Denotes a reserved function.

GPIO_8_Mode_ADCSOCAO_NOT 

Denotes a ADCSICAO_NOT function.

GPIO_9_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_9_Mode_EPWM5B 

Denotes a EPWM5B function.

GPIO_9_Mode_SCITXDB 

Denotes a SCITXDB function.

GPIO_9_Mode_ECAP3 

Denotes a ECAP3 function.

GPIO_10_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_10_Mode_EPWM6A 

Denotes a EPWM6A function.

GPIO_10_Mode_Rsvd_2 

Denotes a reserved function.

GPIO_10_Mode_ADCSOCBO_NOT 

Denotes a ADCSOCBO_NOT function.

GPIO_11_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_11_Mode_EPWM6B 

Denotes a EPWM6B function.

GPIO_11_Mode_SCIRXDB 

Denotes a SCIRXDB function.

GPIO_11_Mode_ECAP1 

Denotes a ECAP1 function.

GPIO_12_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_12_Mode_TZ1_NOT 

Denotes a TZ1_NOT function.

GPIO_12_Mode_SCITXDA 

Denotes a SCITXDA function.

GPIO_12_Mode_SPISIMOB 

Denotes a SPISIMOB function.

GPIO_13_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_13_Mode_TZ2_NOT 

Denotes a TZ2_NOT function.

GPIO_13_Mode_Rsvd_2 

Denotes a reserved function.

GPIO_13_Mode_SPISOMIB 

Denotes a SPISOMIB function.

GPIO_14_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_14_Mode_TZ3_NOT 

Denotes a TZ3_NOT function.

GPIO_14_Mode_SCITXDB 

Denotes a SCITXDB function.

GPIO_14_Mode_SPICLKB 

Denotes a SPICLKB function.

GPIO_15_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_15_Mode_ECAP2 

Denotes a ECAP2 function.

GPIO_15_Mode_SCIRXDB 

Denotes a SCIRXDB function.

GPIO_15_Mode_SPISTEB_NOT 

Denotes a SPISTEB_NOT function.

GPIO_16_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_16_Mode_SPISIMOA 

Denotes a SPISIMOA function.

GPIO_16_Mode_Rsvd_2 

Denotes a reserved function.

GPIO_16_Mode_TZ2_NOT 

Denotes a TZ2_NOT function.

GPIO_17_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_17_Mode_SPISOMIA 

Denotes a SPISOMIA function.

GPIO_17_Mode_Rsvd_2 

Denotes a reserved function.

GPIO_17_Mode_TZ3_NOT 

Denotes a TZ3_NOT function.

GPIO_18_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_18_Mode_SPICLKA 

Denotes a SPICLKA function.

GPIO_18_Mode_SCITXDB 

Denotes a SCITXDB function.

GPIO_18_Mode_XCLKOUT 

Denotes a XCLKOUT function.

GPIO_19_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_19_Mode_SPISTEA_NOT 

Denotes a SPISTEA_NOT function.

GPIO_19_Mode_SCIRXDB 

Denotes a SCIRXDB function.

GPIO_19_Mode_ECAP1 

Denotes a ECAP1 function.

GPIO_20_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_20_Mode_EQEP1A 

Denotes a EQEP1A function.

GPIO_20_Mode_MDXA 

Denotes a MDXA function.

GPIO_20_Mode_COMP1OUT 

Denotes a COMP1OUT function.

GPIO_21_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_21_Mode_EQEP1B 

Denotes a EQEP1B function.

GPIO_21_Mode_MDRA 

Denotes a MDRA function.

GPIO_21_Mode_COMP2OUT 

Denotes a COMP2OUT function.

GPIO_22_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_22_Mode_EQEP1S 

Denotes a EQEP1S function.

GPIO_22_Mode_MCLKXA 

Denotes a MCLKXA function.

GPIO_22_Mode_SCITXDB 

Denotes a SCITXDB function.

GPIO_23_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_23_Mode_EQEP1I 

Denotes a EQEP1I function.

GPIO_23_Mode_MFSXA 

Denotes a MFSXA function.

GPIO_23_Mode_SCIRXDB 

Denotes a SCIRXDB function.

GPIO_24_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_24_Mode_ECAP1 

Denotes a ECAP1 function.

GPIO_24_Mode_EQEP2A 

Denotes a EQEP2A function.

GPIO_24_Mode_SPISIMOB 

Denotes a SPISIMOB function.

GPIO_25_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_25_Mode_ECAP2 

Denotes a ECAP2 function.

GPIO_25_Mode_EQEP2B 

Denotes a EQEP2B function.

GPIO_25_Mode_SPISOMIB 

Denotes a SPISOMIB function.

GPIO_26_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_26_Mode_ECAP3 

Denotes a ECAP3 function.

GPIO_26_Mode_EQEP2I 

Denotes a EQEP2I function.

GPIO_26_Mode_SPICLKB 

Denotes a SPICLKB function.

GPIO_27_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_27_Mode_HRCAP2 

Denotes a HRCAP2 function.

GPIO_27_Mode_EQEP2S 

Denotes a EQEP2S function.

GPIO_27_Mode_SPISTEB_NOT 

Denotes a SPISTEB function.

GPIO_28_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_28_Mode_SCIRXDA 

Denotes a SCIRXDA function.

GPIO_28_Mode_SDDA 

Denotes a SDDA function.

GPIO_28_Mode_TZ2_NOT 

Denotes a TZ2_NOT function.

GPIO_29_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_29_Mode_SCITXDA 

Denotes a SCITXDA function.

GPIO_29_Mode_SCLA 

Denotes a SCLA function.

GPIO_29_Mode_TZ3_NOT 

Denotes a TZ3_NOT function.

GPIO_30_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_30_Mode_CANRXA 

Denotes a CANRXA function.

GPIO_30_Mode_EQEP2I 

Denotes a EQEP2I function.

GPIO_30_Mode_EPWM7A 

Denotes a EPWM7A function.

GPIO_31_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_31_Mode_CANTXA 

Denotes a CANTXA function.

GPIO_31_Mode_EQEP2S 

Denotes a EQEP2S function.

GPIO_31_Mode_EPWM8A 

Denotes a EPWM8A function.

GPIO_32_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_32_Mode_SDAA 

Denotes a SDDA function.

GPIO_32_Mode_EPWMSYNCI 

Denotes a EPWMSYNCI function.

GPIO_32_Mode_ADCSOCAO_NOT 

Denotes a ADCSOCAO_NOT function.

GPIO_33_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_33_Mode_SCLA 

Denotes a SCLA function.

GPIO_33_Mode_EPWMSYNCO 

Denotes a EPWMSYNCO function.

GPIO_33_Mode_ADCSOCBO_NOT 

Denotes a ADCSOCBO_NOT function.

GPIO_34_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_34_Mode_COMP2OUT 

Denotes a COMP2OUT function.

GPIO_34_Mode_Rsvd_2 

Denotes a reserved function.

GPIO_34_Mode_COMP3OUT 

Denotes a COMP3OUT function.

GPIO_35_Mode_JTAG_TDI 

Denotes a JTAG_TDI function.

GPIO_35_Mode_Rsvd_1 

Denotes a reserved function.

GPIO_35_Mode_Rsvd_2 

Denotes a reserved function.

GPIO_35_Mode_Rsvd_3 

Denotes a reserved function.

GPIO_36_Mode_JTAG_TMS 

Denotes a JTAG_TMS function.

GPIO_36_Mode_Rsvd_1 

Denotes a reserved function.

GPIO_36_Mode_Rsvd_2 

Denotes a reserved function.

GPIO_36_Mode_Rsvd_3 

Denotes a reserved function.

GPIO_37_Mode_JTAG_TDO 

Denotes a JTAG_TDO function.

GPIO_37_Mode_Rsvd_1 

Denotes a reserved function.

GPIO_37_Mode_Rsvd_2 

Denotes a reserved function.

GPIO_37_Mode_Rsvd_3 

Denotes a reserved function.

GPIO_38_Mode_JTAG_TCK 

Denotes a JTAG_TCK function.

GPIO_38_Mode_Rsvd_1 

Denotes a reserved function.

GPIO_38_Mode_Rsvd_2 

Denotes a reserved function.

GPIO_38_Mode_Rsvd_3 

Denotes a reserved function.

GPIO_39_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_39_Mode_Rsvd_1 

Denotes a reserved function.

GPIO_39_Mode_Rsvd_2 

Denotes a reserved function.

GPIO_39_Mode_Rsvd_3 

Denotes a reserved function.

GPIO_40_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_40_Mode_EPWM7A 

Denotes a EPWM7A function.

GPIO_40_Mode_SCITXDB 

Denotes a SCITXDB function.

GPIO_40_Mode_Rsvd_3 

Denotes a reserved function.

GPIO_41_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_41_Mode_EPWM7B 

Denotes a EPWM7B function.

GPIO_41_Mode_SCIRXDB 

Denotes a SCIRXDB function.

GPIO_41_Mode_Rsvd_3 

Denotes a reserved function.

GPIO_42_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_42_Mode_EPWM8A 

Denotes a EPWM8A function.

GPIO_42_Mode_TZ1_NOT 

Denotes a TZ1_NOT function.

GPIO_42_Mode_COMP1OUT 

Denotes a COMP1OUT function.

GPIO_43_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_43_Mode_EPWM8B 

Denotes a EPWM8B function.

GPIO_43_Mode_TZ2_NOT 

Denotes a TZ2_NOT function.

GPIO_43_Mode_COMP2OUT 

Denotes a COMP2OUT function.

GPIO_44_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_44_Mode_MFSRA 

Denotes a MFSRA function.

GPIO_44_Mode_SCIRXDB 

Denotes a SCIRXDB function.

GPIO_44_Mode_EPWM7B 

Denotes a EPWM7B function.

GPIO_50_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_50_Mode_EQEP1A 

Denotes a EQEP1A function.

GPIO_50_Mode_MDXA 

Denotes a MDXA function.

GPIO_50_Mode_TZ1_NOT 

Denotes a TZ1_NOT function.

GPIO_51_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_51_Mode_EQEP1B 

Denotes a EQEP1B function.

GPIO_51_Mode_MDRA 

Denotes a MDRA function.

GPIO_51_Mode_TZ2_NOT 

Denotes a TZ2_NOT function.

GPIO_52_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_52_Mode_EQEP1S 

Denotes a EQEP1S function.

GPIO_52_Mode_MCLKXA 

Denotes a MCLKXA function.

GPIO_52_Mode_TZ3_NOT 

Denotes a TZ3_NOT function.

GPIO_53_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_53_Mode_EQEP1I 

Denotes a EQEP1I function.

GPIO_53_Mode_MFSXA 

Denotes a MFSXA function.

GPIO_53_Mode_Rsvd_1 

Denotes a reserved function.

GPIO_54_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_54_Mode_SPISIMOA 

Denotes a SPISIMOA function.

GPIO_54_Mode_EQEP2A 

Denotes a EQEP2A function.

GPIO_54_Mode_HRCAP1 

Denotes a HRCAP1 function.

GPIO_55_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_55_Mode_SPISOMIA 

Denotes a SPISOMIA function.

GPIO_55_Mode_EQEP2B 

Denotes a EQEP2B function.

GPIO_55_Mode_HRCAP2 

Denotes a HRCAP2 function.

GPIO_56_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_56_Mode_SPICLKA 

Denotes a SPICLKA function.

GPIO_56_Mode_EQEP2I 

Denotes a EQEP2I function.

GPIO_56_Mode_HRCAP3 

Denotes a HRCAP3 function.

GPIO_57_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_57_Mode_SPISTEA_NOT 

Denotes a SPISTEA_NOT function.

GPIO_57_Mode_EQEP2S 

Denotes a EQEP2S function.

GPIO_57_Mode_HRCAP4 

Denotes a HRCAP4 function.

GPIO_58_Mode_GeneralPurpose 

Denotes a general purpose function.

GPIO_58_Mode_MCLKRA 

Denotes a MCLKRA function.

GPIO_58_Mode_SCITXDB 

Denotes a SCITXDB function.

GPIO_58_Mode_EPWM7A 

Denotes a EPWM7A function.

Definition at line 100 of file gpio.h.

Enumeration to define the general purpose I/O (GPIO) numbers.

Enumerator
GPIO_Number_0 

Denotes GPIO number 0.

GPIO_Number_1 

Denotes GPIO number 1.

GPIO_Number_2 

Denotes GPIO number 2.

GPIO_Number_3 

Denotes GPIO number 3.

GPIO_Number_4 

Denotes GPIO number 4.

GPIO_Number_5 

Denotes GPIO number 5.

GPIO_Number_6 

Denotes GPIO number 6.

GPIO_Number_7 

Denotes GPIO number 7.

GPIO_Number_8 

Denotes GPIO number 8.

GPIO_Number_9 

Denotes GPIO number 9.

GPIO_Number_10 

Denotes GPIO number 10.

GPIO_Number_11 

Denotes GPIO number 11.

GPIO_Number_12 

Denotes GPIO number 12.

GPIO_Number_13 

Denotes GPIO number 13.

GPIO_Number_14 

Denotes GPIO number 14.

GPIO_Number_15 

Denotes GPIO number 15.

GPIO_Number_16 

Denotes GPIO number 16.

GPIO_Number_17 

Denotes GPIO number 17.

GPIO_Number_18 

Denotes GPIO number 18.

GPIO_Number_19 

Denotes GPIO number 19.

GPIO_Number_20 

Denotes GPIO number 20.

GPIO_Number_21 

Denotes GPIO number 21.

GPIO_Number_22 

Denotes GPIO number 22.

GPIO_Number_23 

Denotes GPIO number 23.

GPIO_Number_24 

Denotes GPIO number 24.

GPIO_Number_25 

Denotes GPIO number 25.

GPIO_Number_26 

Denotes GPIO number 26.

GPIO_Number_27 

Denotes GPIO number 27.

GPIO_Number_28 

Denotes GPIO number 28.

GPIO_Number_29 

Denotes GPIO number 29.

GPIO_Number_30 

Denotes GPIO number 30.

GPIO_Number_31 

Denotes GPIO number 31.

GPIO_Number_32 

Denotes GPIO number 32.

GPIO_Number_33 

Denotes GPIO number 33.

GPIO_Number_34 

Denotes GPIO number 34.

GPIO_Number_35 

Denotes GPIO number 35.

GPIO_Number_36 

Denotes GPIO number 36.

GPIO_Number_37 

Denotes GPIO number 37.

GPIO_Number_38 

Denotes GPIO number 38.

GPIO_Number_39 

Denotes GPIO number 39.

GPIO_Number_40 

Denotes GPIO number 40.

GPIO_Number_41 

Denotes GPIO number 41.

GPIO_Number_42 

Denotes GPIO number 42.

GPIO_Number_43 

Denotes GPIO number 43.

GPIO_Number_44 

Denotes GPIO number 44.

GPIO_Number_50 

Denotes GPIO number 50.

GPIO_Number_51 

Denotes GPIO number 51.

GPIO_Number_52 

Denotes GPIO number 52.

GPIO_Number_53 

Denotes GPIO number 53.

GPIO_Number_54 

Denotes GPIO number 54.

GPIO_Number_55 

Denotes GPIO number 55.

GPIO_Number_56 

Denotes GPIO number 56.

GPIO_Number_57 

Denotes GPIO number 57.

GPIO_Number_58 

Denotes GPIO number 58.

GPIO_numGpios 

Definition at line 361 of file gpio.h.

Enumeration to define the general purpose I/O (GPIO) ports.

Enumerator
GPIO_Port_A 

GPIO Port A.

GPIO_Port_B 

GPIO Port B.

Definition at line 352 of file gpio.h.

Enumeration to define the general purpose I/O (GPIO) pullups.

Enumerator
GPIO_Pullup_Enable 

Denotes a pullup enabled.

GPIO_Pullup_Disable 

Denotes a pullup disabled.

Definition at line 332 of file gpio.h.

Enumeration to define the general purpose I/O (GPIO) qualification.

Enumerator
GPIO_Qual_Sync 

Denotes input will be synchronized to SYSCLK.

GPIO_Qual_Sample_3 

Denotes input is qualified with 3 samples.

GPIO_Qual_Sample_6 

Denotes input is qualified with 6 samples.

GPIO_Qual_ASync 

Denotes input is asynchronous.

Definition at line 341 of file gpio.h.

Function Documentation

bool GPIO_getData ( GPIO_Handle  gpioHandle,
const GPIO_Number_e  gpioNumber 
)

Returns the data value present on a pin (either input or output)

Parameters
[in]gpioHandleThe general purpose I/O (GPIO) object handle
[in]gpioNumberThe GPIO number
Returns
The boolean state of a pin (high/low)

Definition at line 57 of file gpio.c.

References _GPIO_Obj_::GPADAT, _GPIO_Obj_::GPBDAT, and GPIO_Number_32.

uint16_t GPIO_getPortData ( GPIO_Handle  gpioHandle,
const GPIO_Port_e  gpioPort 
)

Returns the data value present on a GPIO port.

Parameters
[in]gpioHandleThe general purpose I/O (GPIO) object handle
[in]gpioPortThe GPIO port
Returns
The data values for the specified port

Definition at line 74 of file gpio.c.

References _GPIO_Obj_::GPADAT, _GPIO_Obj_::GPBDAT, GPIO_Port_A, and GPIO_Port_B.

GPIO_Handle GPIO_init ( void *  pMemory,
const size_t  numBytes 
)

Initializes the general purpose I/O (GPIO) object handle.

Parameters
[in]pMemoryA pointer to the base address of the GPIO registers
[in]numBytesThe number of bytes allocated for the GPIO object, bytes
Returns
The general purpose I/O (GPIO) object handle

Definition at line 92 of file gpio.c.

void GPIO_lpmSelect ( GPIO_Handle  gpioHandle,
const GPIO_Number_e  gpioNumber 
)

Selects a gpio pin to wake up device from STANDBY and HALT LPM.

Parameters
[in]gpioHandleThe general purpose I/O (GPIO) object handle
[in]gpioNumberThe GPIO number

Definition at line 461 of file gpio.c.

References DISABLE_PROTECTED_REGISTER_WRITE_MODE, ENABLE_PROTECTED_REGISTER_WRITE_MODE, and _GPIO_Obj_::GPIOLPMSEL.

bool GPIO_read ( GPIO_Handle  gpioHandle,
const GPIO_Number_e  gpioNumber 
)

Reads the specified general purpose I/O (GPIO)

Parameters
[in]gpioHandleThe general purpose I/O (GPIO) object handle
[in]gpioNumberThe GPIO number
Returns
The general purpose I/O (GPIO) state, HIGH or LOW

Definition at line 185 of file gpio.c.

References _GPIO_Obj_::GPADAT, _GPIO_Obj_::GPBDAT, and GPIO_Number_32.

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.

Parameters
[in]gpioHandleThe general purpose I/O (GPIO) object handle
[in]gpioNumberThe GPIO number
[in]directionThe signal direction

Definition at line 139 of file gpio.c.

References DISABLE_PROTECTED_REGISTER_WRITE_MODE, ENABLE_PROTECTED_REGISTER_WRITE_MODE, _GPIO_Obj_::GPADIR, _GPIO_Obj_::GPBDIR, and GPIO_Number_32.

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.

Parameters
[in]gpioHandleThe general purpose I/O (GPIO) object handle
[in]gpioNumberThe GPIO number
[in]intNumberThe interrupt number

Definition at line 169 of file gpio.c.

References DISABLE_PROTECTED_REGISTER_WRITE_MODE, ENABLE_PROTECTED_REGISTER_WRITE_MODE, and _GPIO_Obj_::GPIOXINTnSEL.

void GPIO_setHigh ( GPIO_Handle  gpioHandle,
const GPIO_Number_e  gpioNumber 
)

Sets the specified general purpose I/O (GPIO) signal high.

Parameters
[in]gpioHandleThe general purpose I/O (GPIO) object handle
[in]gpioNumberThe GPIO number

Definition at line 215 of file gpio.c.

References DISABLE_PROTECTED_REGISTER_WRITE_MODE, ENABLE_PROTECTED_REGISTER_WRITE_MODE, _GPIO_Obj_::GPASET, _GPIO_Obj_::GPBSET, and GPIO_Number_32.

Referenced by DRV8301_enable().

void GPIO_setLow ( GPIO_Handle  gpioHandle,
const GPIO_Number_e  gpioNumber 
)

Sets the specified general purpose I/O (GPIO) signal low.

Parameters
[in]gpioHandleThe general purpose I/O (GPIO) object handle
[in]gpioNumberThe GPIO number

Definition at line 237 of file gpio.c.

References DISABLE_PROTECTED_REGISTER_WRITE_MODE, ENABLE_PROTECTED_REGISTER_WRITE_MODE, _GPIO_Obj_::GPACLEAR, _GPIO_Obj_::GPBCLEAR, and GPIO_Number_32.

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.

Parameters
[in]gpioHandleThe general purpose I/O (GPIO) object handle
[in]gpioNumberThe GPIO number
[in]modeThe mode

Definition at line 259 of file gpio.c.

References DISABLE_PROTECTED_REGISTER_WRITE_MODE, ENABLE_PROTECTED_REGISTER_WRITE_MODE, _GPIO_Obj_::GPAMUX1, _GPIO_Obj_::GPAMUX2, _GPIO_Obj_::GPBMUX1, _GPIO_Obj_::GPBMUX2, GPIO_GPMUX_CONFIG_BITS, and GPIO_GPMUX_NUMGPIOS_PER_REG.

void GPIO_setPortData ( GPIO_Handle  gpioHandle,
const GPIO_Port_e  gpioPort,
const uint16_t  data 
)

Sets data output on a given GPIO port.

Parameters
[in]gpioHandleThe general purpose I/O (GPIO) object handle
[in]gpioPortThe GPIO number
[in]dataThe data to write to the port

Definition at line 321 of file gpio.c.

References DISABLE_PROTECTED_REGISTER_WRITE_MODE, ENABLE_PROTECTED_REGISTER_WRITE_MODE, _GPIO_Obj_::GPADAT, _GPIO_Obj_::GPBDAT, GPIO_Port_A, and GPIO_Port_B.

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.

Parameters
[in]gpioHandleThe general purpose I/O (GPIO) object handle
[in]gpioNumberThe GPIO number
[in]pullupThe pullup enable or disable signal

Definition at line 109 of file gpio.c.

References DISABLE_PROTECTED_REGISTER_WRITE_MODE, ENABLE_PROTECTED_REGISTER_WRITE_MODE, _GPIO_Obj_::GPAPUD, _GPIO_Obj_::GPBPUD, and GPIO_Number_32.

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)

Parameters
[in]gpioHandleThe general purpose I/O (GPIO) object handle
[in]gpioNumberThe GPIO number
[in]qualificationThe desired input qualification

Definition at line 341 of file gpio.c.

References DISABLE_PROTECTED_REGISTER_WRITE_MODE, ENABLE_PROTECTED_REGISTER_WRITE_MODE, _GPIO_Obj_::GPAQSEL1, _GPIO_Obj_::GPAQSEL2, _GPIO_Obj_::GPBQSEL1, _GPIO_Obj_::GPBQSEL2, GPIO_GPxQSELx_NUMGPIOS_PER_REG, and GPIO_GPxQSELy_GPIOx_BITS.

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)

Parameters
[in]gpioHandleThe general purpose I/O (GPIO) object handle
[in]gpioNumberThe GPIO number
[in]periodThe desired input qualification period

Definition at line 378 of file gpio.c.

References DISABLE_PROTECTED_REGISTER_WRITE_MODE, ENABLE_PROTECTED_REGISTER_WRITE_MODE, _GPIO_Obj_::GPACTRL, _GPIO_Obj_::GPBCTRL, GPIO_GPxCTRL_QUALPRDx_BITS, and GPIO_GPxCTRL_QUALPRDx_NUMBITS_PER_REG.

void GPIO_toggle ( GPIO_Handle  gpioHandle,
const GPIO_Number_e  gpioNumber 
)

Toggles the specified general purpose I/O (GPIO) signal.

Parameters
[in]gpioHandleThe general purpose I/O (GPIO) object handle
[in]gpioNumberThe GPIO number

Definition at line 439 of file gpio.c.

References DISABLE_PROTECTED_REGISTER_WRITE_MODE, ENABLE_PROTECTED_REGISTER_WRITE_MODE, _GPIO_Obj_::GPATOGGLE, _GPIO_Obj_::GPBTOGGLE, and GPIO_Number_32.