The MCUXpresso SDK provides a peripheral driver for the Rapid General-Purpose Input/Output (RGPIO) module of MCUXpresso SDK devices.
Typical use case
Output Operation
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/rgpio 
Input Operation
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/rgpio 
|  | 
| static void | RGPIO_PinWrite (RGPIO_Type *base, uint32_t pin, uint8_t output) | 
|  | Sets the output level of the multiple RGPIO pins to the logic 1 or 0.  More... 
 | 
|  | 
| static void | RGPIO_WritePinOutput (RGPIO_Type *base, uint32_t pin, uint8_t output) | 
|  | Sets the output level of the multiple RGPIO pins to the logic 1 or 0.  More... 
 | 
|  | 
| static void | RGPIO_PortSet (RGPIO_Type *base, uint32_t mask) | 
|  | Sets the output level of the multiple RGPIO pins to the logic 1.  More... 
 | 
|  | 
| static void | RGPIO_SetPinsOutput (RGPIO_Type *base, uint32_t mask) | 
|  | Sets the output level of the multiple RGPIO pins to the logic 1.  More... 
 | 
|  | 
| static void | RGPIO_PortClear (RGPIO_Type *base, uint32_t mask) | 
|  | Sets the output level of the multiple RGPIO pins to the logic 0.  More... 
 | 
|  | 
| static void | RGPIO_ClearPinsOutput (RGPIO_Type *base, uint32_t mask) | 
|  | Sets the output level of the multiple RGPIO pins to the logic 0.  More... 
 | 
|  | 
| static void | RGPIO_PortToggle (RGPIO_Type *base, uint32_t mask) | 
|  | Reverses the current output logic of the multiple RGPIO pins.  More... 
 | 
|  | 
| static void | RGPIO_TogglePinsOutput (RGPIO_Type *base, uint32_t mask) | 
|  | Reverses the current output logic of the multiple RGPIO pins.  More... 
 | 
|  | 
|  | 
| static uint32_t | RGPIO_PinRead (RGPIO_Type *base, uint32_t pin) | 
|  | Reads the current input value of the RGPIO port.  More... 
 | 
|  | 
| static uint32_t | RGPIO_ReadPinInput (RGPIO_Type *base, uint32_t pin) | 
|  | Reads the current input value of the RGPIO port.  More... 
 | 
|  | 
To initialize the RGPIO, define a pin configuration, as either input or output, in the user file. Then, call the RGPIO_PinInit() function.
This is an example to define an input pin or an output pin configuration. 
* 
* {
*   0,
* }
* 
* {
*   0,
* }
* 
- Parameters
- 
  
    | base | RGPIO peripheral base pointer (RGPIOA, RGPIOB, RGPIOC, and so on.) |  | pin | RGPIO port pin number |  | config | RGPIO pin configuration pointer |  
 
 
 
      
        
          | uint32_t RGPIO_GetInstance | ( | RGPIO_Type * | base | ) |  | 
      
 
- Parameters
- 
  
    | base | RGPIO peripheral base pointer(PTA, PTB, PTC, etc.) |  
 
- Return values
- 
  
  
 
 
  
  | 
        
          | static void RGPIO_PinWrite | ( | RGPIO_Type * | base, |  
          |  |  | uint32_t | pin, |  
          |  |  | uint8_t | output |  
          |  | ) |  |  |  | inlinestatic | 
 
- Parameters
- 
  
    | base | RGPIO peripheral base pointer (RGPIOA, RGPIOB, RGPIOC, and so on.) |  | pin | RGPIO pin number |  | output | RGPIO pin output logic level. 
0: corresponding pin output low-logic level.1: corresponding pin output high-logic level.  |  
 
 
 
  
  | 
        
          | static void RGPIO_WritePinOutput | ( | RGPIO_Type * | base, |  
          |  |  | uint32_t | pin, |  
          |  |  | uint8_t | output |  
          |  | ) |  |  |  | inlinestatic | 
 
 
  
  | 
        
          | static void RGPIO_PortSet | ( | RGPIO_Type * | base, |  
          |  |  | uint32_t | mask |  
          |  | ) |  |  |  | inlinestatic | 
 
- Parameters
- 
  
    | base | RGPIO peripheral base pointer (RGPIOA, RGPIOB, RGPIOC, and so on.) |  | mask | RGPIO pin number macro |  
 
 
 
  
  | 
        
          | static void RGPIO_SetPinsOutput | ( | RGPIO_Type * | base, |  
          |  |  | uint32_t | mask |  
          |  | ) |  |  |  | inlinestatic | 
 
 
  
  | 
        
          | static void RGPIO_PortClear | ( | RGPIO_Type * | base, |  
          |  |  | uint32_t | mask |  
          |  | ) |  |  |  | inlinestatic | 
 
- Parameters
- 
  
    | base | RGPIO peripheral base pointer (RGPIOA, RGPIOB, RGPIOC, and so on.) |  | mask | RGPIO pin number macro |  
 
 
 
  
  | 
        
          | static void RGPIO_ClearPinsOutput | ( | RGPIO_Type * | base, |  
          |  |  | uint32_t | mask |  
          |  | ) |  |  |  | inlinestatic | 
 
- Parameters
- 
  
    | base | RGPIO peripheral base pointer (RGPIOA, RGPIOB, RGPIOC, and so on.) |  | mask | RGPIO pin number macro |  
 
 
 
  
  | 
        
          | static void RGPIO_PortToggle | ( | RGPIO_Type * | base, |  
          |  |  | uint32_t | mask |  
          |  | ) |  |  |  | inlinestatic | 
 
- Parameters
- 
  
    | base | RGPIO peripheral base pointer (RGPIOA, RGPIOB, RGPIOC, and so on.) |  | mask | RGPIO pin number macro |  
 
 
 
  
  | 
        
          | static void RGPIO_TogglePinsOutput | ( | RGPIO_Type * | base, |  
          |  |  | uint32_t | mask |  
          |  | ) |  |  |  | inlinestatic | 
 
 
  
  | 
        
          | static uint32_t RGPIO_PinRead | ( | RGPIO_Type * | base, |  
          |  |  | uint32_t | pin |  
          |  | ) |  |  |  | inlinestatic | 
 
- Parameters
- 
  
    | base | RGPIO peripheral base pointer (RGPIOA, RGPIOB, RGPIOC, and so on.) |  | pin | RGPIO pin number |  
 
- Return values
- 
  
    | RGPIO | port input value 
0: corresponding pin input low-logic level.1: corresponding pin input high-logic level.  |  
 
 
 
  
  | 
        
          | static uint32_t RGPIO_ReadPinInput | ( | RGPIO_Type * | base, |  
          |  |  | uint32_t | pin |  
          |  | ) |  |  |  | inlinestatic |