55 #ifndef FOXBMS__PEX_H_
56 #define FOXBMS__PEX_H_
65 #define PEX_PIN_LOW (0u)
66 #define PEX_PIN_HIGH (1u)
84 extern void PEX_SetPin(uint8_t portExpander, uint8_t pin);
92 extern void PEX_ResetPin(uint8_t portExpander, uint8_t pin);
98 extern uint8_t
PEX_GetPin(uint8_t portExpander, uint8_t pin);
139 #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.