1.8.13.7 1.25.10.7 1.26.9.7 1.27.11.7 1.28.13.7 1.34.10.7 1.35.8.7 1.36.11.7 1.41.12.7 1.42.10.7 PIO_PortToggle Function
C
void PIO_PortToggle(PIO_PORT port, uint32_t mask)
Summary
Toggles the selected IO pins of a port.
Description
This function toggles (or invert) the selected IO pins of a port.
Precondition
PIO_Initialize() must have been called.
Parameters
Param | Description |
---|---|
port | One of the IO ports from the enum PIO_PORT |
mask | A 32 bit value in which positions of 0s and 1s decide which IO pins of the selected port will be toggled. |
-
1's Will toggle (invert) corresponding IO pins.
-
0's Will remain unchanged.
Returns
None.
Example
// Toggles PC5 and PC7 pins PIO_PortToggle(PIO_PORT_C, 0x00A0);
Remarks
If the port has less than 32-bits, unimplemented pins will be ignored. Implemented pins are Right aligned in the 32-bit value.