This section describes functions and macros of the driver's API.
|
#define | GPIO_Get(gpio) |
| Returns state of pin(s). More...
|
|
#define | GPIO_Set(gpio, mask) |
| Sets pin(s) of the port. More...
|
|
#define | GPIO_Clr(gpio, mask) |
| Clears pin(s) of the port. More...
|
|
#define | GPIO_Tgl(gpio, mask) |
| Toggles pin(s) of the port. More...
|
|
#define | PORT_InstallCallback(ip, callback) |
| Installs callback function for interrupt vector 33. More...
|
|
#define | PORT_EnableFilter(port, clksrc, length) |
| Enables digital filter on PORTE. More...
|
|
#define | PORT_Init(port, cfg, mask) |
| PORT pin(s) initialization. More...
|
|
#define | GPIO_Init(gpio, cfg, mask) |
| GPIO pin(s) initialization. More...
|
|
#define | GPIO_SetPortAttr(gpio, attr, lock) |
| Configures and lock access attributes for specified GPIO port. More...
|
|
#define | GPIO_LockAllPortsAttr() |
| Lock access to all enabled gpio ports attributes. More...
|
|
This macro returns state of pin(s).
- Parameters
-
gpio | GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF,GPIOG,GPIOH,GPIOI,FGPIOA, FGPIOB,FGPIOC,FGPIOD,FGPIOE,FGPIOF,FGPIOG,FGPIOH,FGPIOI. |
- Returns
- uint8 value.
- Note
- Implemented as an inline macro. Select FGPIOx parameter to read port state via single cycle IOPORT peripheral access rather than via peripheral bridge (AIPS).
- See also
- GPIO_Set, GPIO_Clr, GPIO_Tgl
#define GPIO_Set |
( |
|
gpio, |
|
|
|
mask |
|
) |
| |
This macro set(s) pins of the port.
- Parameters
-
gpio | GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF,GPIOG,GPIOH,GPIOI,FGPIOA, FGPIOB,FGPIOC,FGPIOD,FGPIOE,FGPIOF,FGPIOG,FGPIOH,FGPIOI. |
mask | Select one or more OR'ed GPIO Pins. |
- Note
- Implemented as an inline macro. Select FGPIOx parameter to read port state via single cycle IOPORT peripheral access rather than via peripheral bridge (AIPS).
- See also
- GPIO_Get, GPIO_Clr, GPIO_Tgl
#define GPIO_Clr |
( |
|
gpio, |
|
|
|
mask |
|
) |
| |
This macro clears pin(s) of the port.
- Parameters
-
gpio | GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF,GPIOG,GPIOH,GPIOI,FGPIOA, FGPIOB,FGPIOC,FGPIOD,FGPIOE,FGPIOF,FGPIOG,FGPIOH,FGPIOI. |
mask | Select one or more OR'ed GPIO Pins. |
- Note
- Implemented as an inline macro. Select FGPIOx parameter to read port state via single cycle IOPORT peripheral access rather than via peripheral bridge (AIPS).
- See also
- GPIO_Get, GPIO_Set, GPIO_Tgl
#define GPIO_Tgl |
( |
|
gpio, |
|
|
|
mask |
|
) |
| |
This macro toggles pin(s) of the port.
- Parameters
-
gpio | GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF,GPIOG,GPIOH,GPIOI,FGPIOA, FGPIOB,FGPIOC,FGPIOD,FGPIOE,FGPIOF,FGPIOG,FGPIOH,FGPIOI. |
mask | Select one or more OR'ed GPIO Pins. |
- Note
- Implemented as an inline macro. Select FGPIOx parameter to read port state via single cycle IOPORT peripheral access rather than via peripheral bridge (AIPS).
- See also
- GPIO_Get, GPIO_Set, GPIO_Clr
#define PORT_InstallCallback |
( |
|
ip, |
|
|
|
callback |
|
) |
| |
This function install callback function for interrupt vector 33.
- Parameters
-
- Note
- Implemented as a function call.
- Warning
- All PORT interrupt sources are OR'ed into single interrupt vector.
- See also
- PORT_Init
#define PORT_EnableFilter |
( |
|
port, |
|
|
|
clksrc, |
|
|
|
length |
|
) |
| |
This macro enables digital filter on PORTE. The digital filter configuration is valid in all digital pin muxing modes. Configures the maximum size of the glitches, in clock cycles that the digital filter absorbs for the enabled digital filters.
- Parameters
-
port | PORTE. |
clksrc | Select one of the PORT Digital Filter Clock Sources. |
length | uint8 filter length in range from 0 up 31; glitches that are longer than this setting will pass through the digital filter, and glitches that are equal to or less than this setting are filtered. |
- Note
- Implemented as an inline macro.
- Warning
- The clock to the PORTE must be enabled otherwise software freezes.
-
If the digital filters for the PORTE are configured to use the bus clock, then the digital filters are bypassed for the duration of Stop mode.
#define PORT_Init |
( |
|
port, |
|
|
|
cfg, |
|
|
|
mask |
|
) |
| |
#define GPIO_Init |
( |
|
gpio, |
|
|
|
cfg, |
|
|
|
mask |
|
) |
| |
This macro initializes selected pin(s) into either input or output mode.
- Parameters
-
gpio | GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF,GPIOG,GPIOH,GPIOI,FGPIOA, FGPIOB,FGPIOC,FGPIOD,FGPIOE,FGPIOF,FGPIOG,FGPIOH,FGPIOI. |
cfg | Select one of the GPIO Configuration Structures. |
mask | Select one or more OR'ed GPIO Pins. |
- Note
- Implemented as an inline macro. Select FGPIOx parameter to perform single cycle peripheral access via IOPORT rather than via peripheral bridge (AIPS).
- See also
- PORT_Init, GPIO_SetPortAttr, GPIO_LockAllPortsAttr
#define GPIO_SetPortAttr |
( |
|
gpio, |
|
|
|
attr, |
|
|
|
lock |
|
) |
| |
This macro configures and locks access attributes for specified GPIO port.
- Parameters
-
gpio | GPIOA,GPIOB,GPIOC,GPIOD,GPIOE,GPIOF,GPIOG,GPIOH,GPIOI,FGPIOA, FGPIOB,FGPIOC,FGPIOD,FGPIOE,FGPIOF,FGPIOG,FGPIOH,FGPIOI. |
attr | PORT Access Attributes to be applied to the selected gpio port. |
lock | TRUE (configuration locked until next power on reset)
FALSE (configuration left opened for further changes). |
- Note
- Implemented as an inline macro. Select FGPIOx parameter to perform single cycle peripheral access via IOPORT rather than via peripheral bridge (AIPS).
- See also
- GPIO_LockAllPortsAttr
#define GPIO_LockAllPortsAttr |
( |
| ) |
|
This macro locks access to all enabled gpio ports attributes. Once locked, any attempts to change gpio port access attributes are ignored until the next system reset.
- Note
- Implemented as an inline macro.
- See also
- GPIO_SetPortAttr