This repository has been archived by the owner on Jun 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
gpio.h
Joseph Ryan edited this page Aug 19, 2017
·
4 revisions
Go to the source code for gpio.h
#include "common.h"
Initializes GPIO
void InitializeGPIO(void);
Gets pin value as a boolean
tBoolean GetPin(tPin pin);
Parameters:
-
pin
The pin being checked
Returns:
- The boolean value of given pin
Sets pin value as a boolean
void SetPin(tPin pin, tBoolean val);
Parameters:
-
pin
The pin being set -
val
The boolean value the pin is being set to
Sets a pin into high impedance mode
void SetPinZ(tPin pin);
Parameters:
-
pin
The pin being set to high impedance mode
Adds a weak pull up resistor to the pin
void PullUpPin(tPin pin);
Parameters:
-
pin
The pin getting a weak pull up resistor
Adds a weak pull down resistor to the pin
void PullDownPin(tPin pin);
Parameters:
-
pin
The pin getting a weak pull down resistor
Registers a callback to be called when the pin's value changes, the state of the
void CallOnPin(tCallback callback, void *data, tPin pin);
Parameters:
-
callback
Pointer to a function that will be called whenever the pin changes -
data
Pointer that will be sent as an argument to the callback everytime it -
pin
Pin being listened to