Digital port driver. More...
Functions | |
void | vexDigitalModeSet (tVexDigitalPin pin, tVexDigitalMode mode) |
Set digital port mode. More... | |
tVexDigitalMode | vexDigitalModeGet (tVexDigitalPin pin) |
Set digital port mode. More... | |
void | vexDigitalPinSet (tVexDigitalPin pin, tVexDigitalState state) |
Set digital pin state. More... | |
tVexDigitalState | vexDigitalPinGet (tVexDigitalPin pin) |
Get digital pin state. More... | |
void | vexDigitalIntrSet (tVexDigitalPin pin) |
Set digital pin to cause interrupt. More... | |
void | vexDigitalIntrRun () |
Enable any digital pin interrupts. More... | |
int32_t | vexDigitalIntrCountGet (tVexDigitalPin pin) |
Get the interrupt count for a given digital pin. More... | |
Variables | |
ioDef | vexioDefinition [kVexDigital_Num] |
definition of a digital IO pin More... | |
Digital port driver.
void vexDigitalModeSet | ( | tVexDigitalPin | pin, |
tVexDigitalMode | mode | ||
) |
Set digital port mode.
[in] | pin | The pin to set the new mode on |
[in] | mode | kVexDigitalInput or kVexDigitalOutput |
Change the type of a digital IO port All ports are initially initialized to be INPUTs unless the board.h file is changed (not recommended)
tVexDigitalMode vexDigitalModeGet | ( | tVexDigitalPin | pin) |
Set digital port mode.
[in] | pin | The pin to get the mode for |
void vexDigitalPinSet | ( | tVexDigitalPin | pin, |
tVexDigitalState | state | ||
) |
Set digital pin state.
[in] | pin | The pin to set the new state on |
[in] | state | kVexDigitalLow or kVexDigitalHigh |
Set a digital pin to a value, high or low. If the pin is an input then this enables the pullup or pulldown resistor.
tVexDigitalState vexDigitalPinGet | ( | tVexDigitalPin | pin) |
Get digital pin state.
[in] | pin | The pin to get the state of |
Read the value of a digital pin, if the pin is a digital output then the output value is returned.
void vexDigitalIntrSet | ( | tVexDigitalPin | pin) |
Set digital pin to cause interrupt.
[in] | pin | The pin |
This is used for testing at present, the interrupt just increments a counter
void vexDigitalIntrRun | ( | void | ) |
Enable any digital pin interrupts.
int32_t vexDigitalIntrCountGet | ( | tVexDigitalPin | pin) |
Get the interrupt count for a given digital pin.
[in] | pin | The pin |
This is used for testing at present, the interrupt just increments a counter
ioDef vexioDefinition[kVexDigital_Num] |
definition of a digital IO pin
This data structure is used to correlate a digital port(pin) number on the cortex with the port/pad pair on the STM32.