|
MotorWare f2806x Driver API Documentation
|
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... | |
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... | |
| struct _GPIO_Obj_ |
| #define GPIO_BASE_ADDR (0x00006F80) |
| #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 struct _GPIO_Obj_* GPIO_Handle |
| typedef struct _GPIO_Obj_ GPIO_Obj |
Defines the General Purpose I/O (GPIO) object.
| enum GPIO_Direction_e |
| enum GPIO_Mode_e |
Enumeration to define the general purpose I/O (GPIO) modes for each pin.
| enum GPIO_Number_e |
Enumeration to define the general purpose I/O (GPIO) numbers.
| enum GPIO_Port_e |
| enum GPIO_Pullup_e |
| enum GPIO_Qual_e |
Enumeration to define the general purpose I/O (GPIO) qualification.
| bool GPIO_getData | ( | GPIO_Handle | gpioHandle, |
| const GPIO_Number_e | gpioNumber | ||
| ) |
Returns the data value present on a pin (either input or output)
| [in] | gpioHandle | The general purpose I/O (GPIO) object handle |
| [in] | gpioNumber | The GPIO number |
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.
| [in] | gpioHandle | The general purpose I/O (GPIO) object handle |
| [in] | gpioPort | The GPIO 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 | ||
| ) |
| void GPIO_lpmSelect | ( | GPIO_Handle | gpioHandle, |
| const GPIO_Number_e | gpioNumber | ||
| ) |
Selects a gpio pin to wake up device from STANDBY and HALT LPM.
| [in] | gpioHandle | The general purpose I/O (GPIO) object handle |
| [in] | gpioNumber | The 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)
| [in] | gpioHandle | The general purpose I/O (GPIO) object handle |
| [in] | gpioNumber | The GPIO number |
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.
| [in] | gpioHandle | The general purpose I/O (GPIO) object handle |
| [in] | gpioNumber | The GPIO number |
| [in] | direction | The 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.
| [in] | gpioHandle | The general purpose I/O (GPIO) object handle |
| [in] | gpioNumber | The GPIO number |
| [in] | intNumber | The 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.
| [in] | gpioHandle | The general purpose I/O (GPIO) object handle |
| [in] | gpioNumber | The 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.
| [in] | gpioHandle | The general purpose I/O (GPIO) object handle |
| [in] | gpioNumber | The 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.
| [in] | gpioHandle | The general purpose I/O (GPIO) object handle |
| [in] | gpioNumber | The GPIO number |
| [in] | mode | The 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.
| [in] | gpioHandle | The general purpose I/O (GPIO) object handle |
| [in] | gpioPort | The GPIO number |
| [in] | data | The 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.
| [in] | gpioHandle | The general purpose I/O (GPIO) object handle |
| [in] | gpioNumber | The GPIO number |
| [in] | pullup | The 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)
| [in] | gpioHandle | The general purpose I/O (GPIO) object handle |
| [in] | gpioNumber | The GPIO number |
| [in] | qualification | The 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)
| [in] | gpioHandle | The general purpose I/O (GPIO) object handle |
| [in] | gpioNumber | The GPIO number |
| [in] | period | The 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.
| [in] | gpioHandle | The general purpose I/O (GPIO) object handle |
| [in] | gpioNumber | The 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.
1.8.9.1