Account
| ArmsysApi 0.12.18 |
BGpio Class Reference
#include <BGpio.h>
Public Types | |
| enum | Mode { ModeInput = 0x00, ModeOutput = 0x01, ModeAlternate = 0x02, ModeAnalog = 0x03 } |
| enum | OutType { OutTypePushPull = 0x00, OutTypeOpenDrain = 0x01 } |
| enum | Pull { PullNone = 0x00, PullUp = 0x01, PullDown = 0x02 } |
| enum | Speed { Speed1MHz = 0x00, Speed25MHz = 0x01, Speed50MHz = 0x02, Speed100MHz = 0x03 } |
| enum | Source { Source0 = 0x00, Source1 = 0x01, Source2 = 0x02, Source3 = 0x03, Source4 = 0x04, Source5 = 0x05, Source6 = 0x06, Source7 = 0x07, Source8 = 0x08, Source9 = 0x09, Source10 = 0x0a, Source11 = 0x0b, Source12 = 0x0c, Source13 = 0x0d, Source14 = 0x0e, Source15 = 0x0f, SourceTim1 = 0x01, SourceTim2 = 0x01, SourceTim3 = 0x02, SourceTim4 = 0x02, SourceTim5 = 0x02, SourceTim8 = 0x03, SourceTim9 = 0x03, SourceTim10 = 0x03, SourceTim11 = 0x03, SourceTim12 = 0x09, SourceTim13 = 0x09, SourceTim14 = 0x09, SourceSpi1 = 0x05, SourceSpi2 = 0x05, SourceSpi3 = 0x06, SourceI2c1 = 0x04, SourceI2c2 = 0x04, SourceI2c3 = 0x04, SourceUart123 = 0x07, SourceUart456 = 0x08, SourceCan = 0x09, SourceFsmc = 0x0c, SourceSdio = 0x0c } |
Public Member Functions | |
| BGpio () | |
| void | init () |
| Initialise the gpio system. More... | |
| void | initPin (Pin pin, Mode mode, OutType outType=OutTypePushPull, Pull pull=PullNone, Speed speed=Speed100MHz, Source source=Source0) |
| Set the pins mode. More... | |
| void | setAlternateSource (Pin pin, Source source) |
| Set the pins alternate source. More... | |
| void | setPin (Pin pin, BUInt8 state) |
| Set the ping to the given state, Off = 0, On = 1. More... | |
| void | togglePin (Pin pin) |
| Toggle the pins state. More... | |
| BUInt8 | getPin (Pin pin) |
| Get the pins state. More... | |
Member Enumeration Documentation
◆ Mode
| enum BGpio::Mode |
◆ OutType
| enum BGpio::OutType |
◆ Pull
| enum BGpio::Pull |
◆ Source
| enum BGpio::Source |
◆ Speed
| enum BGpio::Speed |
Constructor & Destructor Documentation
◆ BGpio()
| BGpio::BGpio | ( | ) |
Member Function Documentation
◆ getPin()
◆ init()
| void BGpio::init | ( | ) |
Initialise the gpio system.
◆ initPin()
| void BGpio::initPin | ( | Pin | pin, |
| Mode | mode, | ||
| OutType | outType = OutTypePushPull, | ||
| Pull | pull = PullNone, | ||
| Speed | speed = Speed100MHz, | ||
| Source | source = Source0 | ||
| ) |
Set the pins mode.
◆ setAlternateSource()
◆ setPin()
◆ togglePin()
| void BGpio::togglePin | ( | Pin | pin | ) |
Toggle the pins state.
The documentation for this class was generated from the following files:
Generated by
1.8.15 