RP.GPIO

Entities

Simple Types

Tagged Types

Subtypes

Subprograms

Description

Copyright 2021 (C) Jeremy Grosser

SPDX-License-Identifier: BSD-3-Clause

Acknowledge_Interrupt

procedure Acknowledge_Interrupt
   (Pin     : GPIO_Pin;
    Trigger : Interrupt_Triggers)
Parameters
Pin
Trigger

ADC_Pin

subtype ADC_Pin is GPIO_Pin range 26 .. 29;

Clear

procedure Clear
   (This : in out GPIO_Point)
Parameters
This

Configure

procedure Configure
   (This      : in out 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_4mA)

In Analog mode, Pull and Func are ignored and set to Floating and HI_Z

Parameters
This
Mode
Pull
Func
Schmitt
Slew_Fast
Drive

Disable_Interrupt

procedure Disable_Interrupt
   (This    : in out GPIO_Point;
    Trigger : Interrupt_Triggers)
Parameters
This
Trigger

Enable

procedure Enable

Enable_Interrupt

procedure Enable_Interrupt
   (This    : in out GPIO_Point;
    Trigger : Interrupt_Triggers)
Parameters
This
Trigger

Enabled

function Enabled return Boolean
Return Value

Get

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

GPIO_Config_Mode

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

GPIO_Drive

type GPIO_Drive is (Drive_2mA, Drive_4mA, Drive_8mA, Drive_12mA);
Enumeration Literal
Drive_2mA
Drive_4mA
Drive_8mA
Drive_12mA

GPIO_Function

type GPIO_Function is
   (SPI, UART, I2C, PWM, SIO, PIO0, PIO1, CLOCK, USB, HI_Z);
Enumeration Literal
SPI
UART
I2C
PWM
SIO
PIO0
PIO1
CLOCK
USB
HI_Z

GPIO_Pin

type GPIO_Pin is range 0 .. 29;

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

Interrupt_Status

function Interrupt_Status
   (Pin     : GPIO_Pin;
    Trigger : Interrupt_Triggers)
   return Boolean
Parameters
Pin
Trigger
Return Value

Interrupt_Triggers

type Interrupt_Triggers is (Low_Level, High_Level, Falling_Edge, Rising_Edge)
   with Size => 4;
Enumeration Literal
Low_Level
High_Level
Falling_Edge
Rising_Edge

Mode

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

Pull_Resistor

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

Set

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

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

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