Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -r96bff7c1a8c755eb28a89e131a737dc1c4a7d9fc -r2bb447181c2519690441d81f83563d17e0882ef2 --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 96bff7c1a8c755eb28a89e131a737dc1c4a7d9fc) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 2bb447181c2519690441d81f83563d17e0882ef2) @@ -18,8 +18,9 @@ #include #endif -#include "can.h" #include "etpwm.h" +#include "gio.h" +#include "mibspi.h" #include "Common.h" #include "FPGA.h" @@ -90,14 +91,14 @@ NUM_OF_DIAL_IN_FLOW_SELF_TEST_STATES } DIAL_IN_FLOW_SELF_TEST_STATE_T; -// CAN3 port pin assignments for pump stop and direction outputs -#define STOP_CAN3_PORT_MASK 0x00000002 // (Tx - re-purposed as output GPIO for dialIn pump stop signal) -#define DIR_CAN3_PORT_MASK 0x00000002 // (Rx - re-purposed as output GPIO for dialIn pump direction signal) +// pin assignments for pump stop and direction outputs +#define STOP_DI_PUMP_GIO_PORT_PIN 2U +#define DIR_DI_PUMP_SPI5_PORT_MASK 0x00000100 // (ENA - re-purposed as output GPIO) // dialIn pump stop and direction macros -#define SET_DIP_DIR() {canREG3->RIOC |= DIR_CAN3_PORT_MASK;} -#define SET_DIP_STOP() {canREG3->TIOC |= STOP_CAN3_PORT_MASK;} -#define CLR_DIP_DIR() {canREG3->RIOC &= ~DIR_CAN3_PORT_MASK;} -#define CLR_DIP_STOP() {canREG3->TIOC &= ~STOP_CAN3_PORT_MASK;} +#define SET_DIP_DIR() {mibspiREG5->PC3 |= DIR_DI_PUMP_SPI5_PORT_MASK;} +#define SET_DIP_STOP() gioSetBit( gioPORTA, STOP_DI_PUMP_GIO_PORT_PIN, PIN_SIGNAL_HIGH ) +#define CLR_DIP_DIR() {mibspiREG5->PC3 &= ~DIR_DI_PUMP_SPI5_PORT_MASK;} +#define CLR_DIP_STOP() gioSetBit( gioPORTA, STOP_DI_PUMP_GIO_PORT_PIN, PIN_SIGNAL_LOW ) // ********** private data **********