Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.
Joseph Ryan edited this page Aug 19, 2017 · 4 revisions

Go to the source code for gpio.h

Includes

  • #include "common.h"

Functions

Function Documention


InitializeGPIO

Initializes GPIO

void InitializeGPIO(void);


GetPin

Gets pin value as a boolean

tBoolean GetPin(tPin pin);

Parameters:

  • pin The pin being checked

Returns:

  • The boolean value of given pin

SetPin

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

SetPinZ

Sets a pin into high impedance mode

void SetPinZ(tPin pin);

Parameters:

  • pin The pin being set to high impedance mode

PullUpPin

Adds a weak pull up resistor to the pin

void PullUpPin(tPin pin);

Parameters:

  • pin The pin getting a weak pull up resistor

PullDownPin

Adds a weak pull down resistor to the pin

void PullDownPin(tPin pin);

Parameters:

  • pin The pin getting a weak pull down resistor

CallOnPin

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

Clone this wiki locally