SAE Teensy ECU
IIT SAE Microcontroller programming
|
Pin Configuration. More...
Go to the source code of this file.
Macros | |
#define | CONF_PINS_CANBUS_UPDATE_INTERVAL_MICRO 50000 |
The interval in micros to update outgoing canPins. | |
#define | CONF_PINS_ANALOG_WRITE_RESOLUTION 12 |
The write resolution for analog pins. | |
#define | ECU_PINS |
The defintions of every physical pin. | |
#define | PINS_CANBUS_ANALOG_IN |
The defintions of every analog pin to be received over canbus. | |
#define | PINS_CANBUS_ANALOG_OUT X(ADD_CANPIN_ANALOG3, PINS_INTERNAL_STATE) |
Same as PINS_CANBUS_ANALOG_IN only for the analog pins that are outgoing. | |
#define | PINS_CANBUS_DIGITAL_IN |
The defintions of every digital pin to be received over canbus. | |
#define | PINS_CANBUS_DIGITAL_OUT |
Same as PINS_CANBUS_DIGITAL_IN only for the digital pins that are outgoing. | |
Pin Configuration.
This config file is used configure the Pin module.
It is mostly used to define pins and CanPins.
Because, at the moment, there are two ECUs on the car, the pin definitions are split in half by an if statement, one case is for the back ECU, the other for the front.
Only the back ECU has documentation, as the process for defining pins is the same on both ECUs.
Definition in file PinConfig.def.
#define CONF_PINS_ANALOG_WRITE_RESOLUTION 12 |
The write resolution for analog pins.
Definition at line 52 of file PinConfig.def.
#define CONF_PINS_CANBUS_UPDATE_INTERVAL_MICRO 50000 |
The interval in micros to update outgoing canPins.
Definition at line 47 of file PinConfig.def.
#define ECU_PINS |
The defintions of every physical pin.
The pinout setup for the ECU, set the specific pin, whether it is analog or digital, and whether we are taking input or giving an output on the pin
Unless it is the last entry, this is how to add a new pin
INITAL_STATE
is the value a pin should be set to on startup
It can be a number or NIL
, meaning that we do not care what it's starting output value is
All INPUT
pins should have this set to NIL
Only the last entry should NOT have a '\'
Definition at line 132 of file PinConfig.def.
#define PINS_CANBUS_ANALOG_IN |
The defintions of every analog pin to be received over canbus.
Unless it is the last entry, this is how to add a new pin
Only the last entry should NOT have a '\'
Definition at line 172 of file PinConfig.def.
#define PINS_CANBUS_ANALOG_OUT X(ADD_CANPIN_ANALOG3, PINS_INTERNAL_STATE) |
Same as PINS_CANBUS_ANALOG_IN only for the analog pins that are outgoing.
Definition at line 184 of file PinConfig.def.
#define PINS_CANBUS_DIGITAL_IN |
The defintions of every digital pin to be received over canbus.
Unless it is the last entry, this is how to add a new pin
Only the last entry should NOT have a '\'
Definition at line 204 of file PinConfig.def.
#define PINS_CANBUS_DIGITAL_OUT |
Same as PINS_CANBUS_DIGITAL_IN only for the digital pins that are outgoing.
Definition at line 213 of file PinConfig.def.