Digital port driver.
More...
#include "ch.h"
#include "hal.h"
#include "vex.h"
Set digital port mode.
- Parameters
-
[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)
Set digital port mode.
- Parameters
-
[in] | pin | The pin to get the mode for |
- Returns
- the mode for the given pin
Set digital pin state.
- Parameters
-
[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.
- Examples:
- vexuser.c.
Get digital pin state.
- Parameters
-
[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.
- Examples:
- vexdefault.c.
Set digital pin to cause interrupt.
- Parameters
-
This is used for testing at present, the interrupt just increments a counter
void vexDigitalIntrRun |
( |
void |
) | |
|
Enable any digital pin interrupts.
Get the interrupt count for a given digital pin.
- Parameters
-
This is used for testing at present, the interrupt just increments a counter
Initial value:
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.