1.6.13.5 1.7.14.5 1.10.11.5 1.11.11.5 1.12.11.5 1.13.10.5 1.14.10.5 1.15.10.5 1.16.8.5 1.17.8.5 1.18.9.5 1.19.8.5 1.20.8.5 1.21.9.5 1.22.13.5 1.23.12.5 1.24.9.5 GPIO_PortSet Function
C
void GPIO_PortSet(GPIO_PORT port, uint32_t mask)
Summary
Set the selected IO pins of a port.
Description
This function sets (to '1') the selected IO pins of a port.
Precondition
Pins of the port must be made output before setting.
Parameters
Param | Description |
---|---|
port | One of the IO ports from the enum GPIO_PORT |
mask | A 32 bit value in which positions of 0s and 1s decide which IO pins of the selected port will be set. |
-
1's Will set corresponding IO pins to high (to 1).
-
0's Will remain unchanged.
Returns
None.
Example
// Set RC5 and RC7 pins to 1 GPIO_PortSet(GPIO_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.