RP.GPIO

Entities

Simple Types

Tagged Types

Constants

Subprograms

Description

------------------------- Low level interface -- -------------------------

Clear

procedure Clear
   (This : in out GPIO_Point)
Parameters
This

CLK

CLK   : constant GPIO_Function := RP.Device_Parameters.GPIO_CLK_Func;

RP2350 only

Configure

procedure Configure
   (This       : GPIO_Point;
    Mode       : GPIO_Config_Mode;
    Pull       : GPIO_Pull_Mode := Floating;
    Func       : GPIO_Function := SIO;
    Schmitt    : Boolean := False;
    Slew_Fast  : Boolean := False;
    Drive      : GPIO_Drive := Drive_2mA)
Parameters
This
Mode
Pull
Func
Schmitt
Slew_Fast
Drive

Drive

procedure Drive
   (Pin     : GPIO_Pin;
    Current : GPIO_Drive := 1)
Parameters
Pin
Current

Drive_12mA

Drive_12mA  : constant GPIO_Drive := 4;

Drive_2mA

Drive_2mA   : constant GPIO_Drive := 1;

Drive_4mA

Drive_4mA   : constant GPIO_Drive := 2;

Drive_8mA

Drive_8mA   : constant GPIO_Drive := 3;

Func

procedure Func
   (Pin  : GPIO_Pin;
    Func : GPIO_Function)
Parameters
Pin
Func

Get

function Get
   (This : GPIO_Point)
   return Boolean
Parameters
This
Return Value

Get

procedure Get
   (Pin  : GPIO_Pin;
    High : out Boolean)

Get the input level

Parameters
Pin
High

GPIO_Config_Mode

type GPIO_Config_Mode is (Input, Output, Analog);
Enumeration Literal
Input
Output
Analog

GPIO_Drive

type GPIO_Drive is range 0 .. 4;

GPIO_Function

type GPIO_Function is range 0 .. 11;

RP2350 only

GPIO_Pin

type GPIO_Pin is range 0 .. RP.Device_Parameters.Pin_Count - 1;

GPIO_Point

type GPIO_Point is new HAL.GPIO.GPIO_Point with record
   Pin : GPIO_Pin;
end record;
Record fields
Pin

GPIO_Pull_Mode

type GPIO_Pull_Mode is (Floating, Pull_Up, Pull_Down, Pull_Both);
Enumeration Literal
Floating
Pull_Up
Pull_Down
Pull_Both

HI_Z

HI_Z  : constant GPIO_Function := 0;

RP2350 only

HSTX

HSTX  : constant GPIO_Function := 0;

RP2350 only

I2C

I2C   : constant GPIO_Function := 3;

RP2350 only

Input_Enable

procedure Input_Enable
   (Pin    : GPIO_Pin;
    Enable : Boolean := True)

Enable the input buffer

Parameters
Pin
Enable

Isolate

procedure Isolate
   (Pin     : GPIO_Pin;
    Isolate : Boolean)

Isolate has no effect on RP2040

Parameters
Pin
Isolate

Mode

function Mode
   (This : GPIO_Point)
   return HAL.GPIO.GPIO_Mode
Parameters
This
Return Value

Off

Off         : constant GPIO_Drive := 0;

Output_Enable

procedure Output_Enable
   (Pin    : GPIO_Pin;
    Enable : Boolean := True)

Enable the output buffer

Parameters
Pin
Enable

PIO0

PIO0  : constant GPIO_Function := 6;

RP2350 only

PIO1

PIO1  : constant GPIO_Function := 7;

RP2350 only

PIO2

PIO2  : constant GPIO_Function := 8;

RP2350 only

Pull

procedure Pull
   (Pin  : GPIO_Pin;
    Up   : Boolean := False;
    Down : Boolean := False)

Enable pull resistors. Enabling both Up and Down simultaneously sets Bus Keeper Mode (9.6.1)

Parameters
Pin
Up
Down

Pull_Resistor

function Pull_Resistor
   (This : GPIO_Point)
   return HAL.GPIO.GPIO_Pull_Resistor
Parameters
This
Return Value

PWM

PWM   : constant GPIO_Function := 4;

RP2350 only

Set

function Set
   (This : GPIO_Point)
   return Boolean
Parameters
This
Return Value

Set

procedure Set
   (Pin  : GPIO_Pin;
    High : Boolean := True)

Set the output level

Parameters
Pin
High

Set

procedure Set
   (This : in out GPIO_Point)
Parameters
This

Set_Mode

procedure Set_Mode
   (This : in out GPIO_Point;
    Mode : HAL.GPIO.GPIO_Config_Mode)
Parameters
This
Mode

Set_Pull_Resistor

procedure Set_Pull_Resistor
   (This : in out GPIO_Point;
    Pull : HAL.GPIO.GPIO_Pull_Resistor)
Parameters
This
Pull

SIO

SIO   : constant GPIO_Function := 5;

RP2350 only

SPI

SPI   : constant GPIO_Function := 1;

RP2350 only

Support

function Support
   (This : GPIO_Point;
    Capa : HAL.GPIO.Capability)
    return Boolean
Parameters
This
Capa
Return Value

Toggle

procedure Toggle
   (This : in out GPIO_Point)
Parameters
This

UART

UART  : constant GPIO_Function := 2;

RP2350 only

UARTN

UARTN : constant GPIO_Function := 11;

RP2350 only

USB

USB   : constant GPIO_Function := RP.Device_Parameters.GPIO_USB_Func;

RP2350 only