59#define PINS_ANALOG_RES CONF_PINS_ANALOG_WRITE_RESOLUTION
63#define PINS_ANALOG_MAX pwrtwo(PINS_ANALOG_RES)
67#define PINS_ANALOG_HIGH (PINS_ANALOG_MAX - 1)
71#define PINS_ANALOG_MIN 0
76#define PINS_VOLT_TO_ANALOG(x) (int)min(max((x / 5) * PINS_ANALOG_HIGH, PINS_ANALOG_MIN), PINS_ANALOG_HIGH)
90typedef void (*
PinHandler)(uint8_t CAN_GPIO_Pin,
int &value);
Compilation of various helpful preprocessor macros.
Get and set values to predefined pins.
void stopCanPins(void)
Stops background interrupts from sending canPins.
void setPinValue(uint8_t GPIO_Pin, int value)
Set the pin value of a predefined pin.
void(* PinHandler)(uint8_t CAN_GPIO_Pin, int &value)
A typedef for pin handler functions.
int getCanPinValue(uint8_t CAN_GPIO_Pin)
Get the pin value of a predefined canbus pin.
void initialize(void)
Initialize all predefined pins.
int getPinValue(uint8_t GPIO_Pin)
Get the pin value of a predefined pin.
void update(void)
Poll analog pin values.
void startCanPins(void)
Starts background interrupts to send canPins, if any are to be sent.
void setInternalValue(uint8_t Internal_Pin, int value)
Set the value of an internal pin.
void debugPrint(void)
Used for debugging.
void resetPhysicalPins()
Resets physical pins to their inital state.