54 #ifndef FOXBMS__PEX_H_
55 #define FOXBMS__PEX_H_
64 #define PEX_PIN_LOW (0u)
65 #define PEX_PIN_HIGH (1u)
83 extern void PEX_SetPin(uint8_t portExpander, uint8_t pin);
91 extern void PEX_ResetPin(uint8_t portExpander, uint8_t pin);
97 extern uint8_t
PEX_GetPin(uint8_t portExpander, uint8_t pin);
138 #ifdef UNITY_UNIT_TEST
uint8_t PEX_GetPin(uint8_t portExpander, uint8_t pin)
get pin state of port expander pins.
void PEX_SetPin(uint8_t portExpander, uint8_t pin)
sets pin to high.
void PEX_ResetPin(uint8_t portExpander, uint8_t pin)
sets pin to low.
void PEX_SetPinPolarityRetained(uint8_t portExpander, uint8_t pin)
sets pin polarity to retained.
void PEX_SetPinDirectionOutput(uint8_t portExpander, uint8_t pin)
sets pin to input.
void PEX_SetPinPolarityInverted(uint8_t portExpander, uint8_t pin)
sets pin polarity to inverted.
void PEX_Initialize(void)
initialize local variable containing state of port expander.
void PEX_SetPinDirectionInput(uint8_t portExpander, uint8_t pin)
sets pin direction to input.
void PEX_Trigger(void)
implements reading/writing to the port expander registers.
Headers for the configuration for the NXP PCA9539 port expander module.