SAE Teensy ECU
IIT SAE Microcontroller programming
|
Get and set values to predefined pins. More...
Typedefs | |
typedef void(* | PinHandler) (uint8_t CAN_GPIO_Pin, int &value) |
A typedef for pin handler functions. | |
Functions | |
int | getCanPinValue (uint8_t CAN_GPIO_Pin) |
Get the pin value of a predefined canbus pin. | |
int | getPinValue (uint8_t GPIO_Pin) |
Get the pin value of a predefined pin. | |
void | setPinValue (uint8_t GPIO_Pin, int value) |
Set the pin value of a predefined pin. | |
void | setInternalValue (uint8_t Internal_Pin, int value) |
Set the value of an internal pin. | |
void | resetPhysicalPins () |
Resets physical pins to their inital state. | |
void | update (void) |
Poll analog pin values. | |
void | stopCanPins (void) |
Stops background interrupts from sending canPins. | |
void | startCanPins (void) |
Starts background interrupts to send canPins, if any are to be sent. | |
void | initialize (void) |
Initialize all predefined pins. | |
void | debugPrint (void) |
Used for debugging. | |
Get and set values to predefined pins.
Manage defined pins and ensure only defined pins are accessed
Refer to Pins.h for more info.
typedef void(* Pins::PinHandler) (uint8_t CAN_GPIO_Pin, int &value) |
int Pins::getCanPinValue | ( | uint8_t | CAN_GPIO_Pin | ) |
Get the pin value of a predefined canbus pin.
CAN_GPIO_Pin | The canbus GPIO pin to get a value from |
int Pins::getPinValue | ( | uint8_t | GPIO_Pin | ) |
Get the pin value of a predefined pin.
GPIO_Pin | The GPIO pin to get a value from |
void Pins::resetPhysicalPins | ( | ) |
Resets physical pins to their inital state.
This function sets pins as input/output and, if an output pin, sets them to their given init value. This is defined in PinConfig.def
void Pins::setInternalValue | ( | uint8_t | Internal_Pin, |
int | value | ||
) |
Set the value of an internal pin.
These are fake pins that are usefully for sending gpio like values over canbus, See PinConfig.def for more info
Internal_Pin | The Internal pin to set |
value | The value to set the analog/digital pin to |
void Pins::setPinValue | ( | uint8_t | GPIO_Pin, |
int | value | ||
) |
Set the pin value of a predefined pin.
GPIO_Pin | The GPIO pin to set |
value | The value to set the analog/digital pin to |
void Pins::update | ( | void | ) |
Poll analog pin values.