Copyright 2021 (C) Jeremy Grosser
SPDX-License-Identifier: BSD-3-Clause
procedure Acknowledge_Interrupt
(Pin : GPIO_Pin;
Trigger : Interrupt_Triggers)
subtype ADC_Pin is GPIO_Pin range 26 .. 29;
procedure Clear
(This : in out GPIO_Point)
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
procedure Disable_Interrupt
(This : in out GPIO_Point;
Trigger : Interrupt_Triggers)
procedure Enable
procedure Enable_Interrupt
(This : in out GPIO_Point;
Trigger : Interrupt_Triggers)
function Enabled return Boolean
function Get
(This : GPIO_Point)
return Boolean
type GPIO_Config_Mode is (Input, Output, Analog);
type GPIO_Drive is (Drive_2mA, Drive_4mA, Drive_8mA, Drive_12mA);
type GPIO_Function is
(SPI, UART, I2C, PWM, SIO, PIO0, PIO1, CLOCK, USB, HI_Z);
type GPIO_Pin is range 0 .. 29;
type GPIO_Point is new HAL.GPIO.GPIO_Point with
record
Pin : GPIO_Pin;
end record;
type GPIO_Pull_Mode is (Floating, Pull_Up, Pull_Down, Pull_Both);
function Interrupt_Status
(Pin : GPIO_Pin;
Trigger : Interrupt_Triggers)
return Boolean
type Interrupt_Triggers is (Low_Level, High_Level, Falling_Edge, Rising_Edge)
with Size => 4;
function Mode
(This : GPIO_Point)
return HAL.GPIO.GPIO_Mode
function Pull_Resistor
(This : GPIO_Point)
return HAL.GPIO.GPIO_Pull_Resistor
function Set
(This : GPIO_Point)
return Boolean
procedure Set
(This : in out GPIO_Point)
procedure Set_Mode
(This : in out GPIO_Point;
Mode : HAL.GPIO.GPIO_Config_Mode)
procedure Set_Pull_Resistor
(This : in out GPIO_Point;
Pull : HAL.GPIO.GPIO_Pull_Resistor)
function Support
(This : GPIO_Point;
Capa : HAL.GPIO.Capability)
return Boolean
procedure Toggle
(This : in out GPIO_Point)