Refactoring menu code to be non-blocking

Added macros for GPIO read/write
This commit is contained in:
2025-05-16 07:56:18 -05:00
parent a3ef12e24a
commit da0dd55b20
11 changed files with 316 additions and 41 deletions

View File

@@ -28,6 +28,7 @@
#include <stdio.h>
#include "hwFixes.h"
#include "System\system.h"
#include "io.h"
//#define ON 1
@@ -130,9 +131,13 @@ void Select_Bypass(RELAY_SELECT_t Bypass) // Bypass allows transmitting w/o full
void Select_Estop(RELAY_SELECT_t E_stop)
{
if (E_stop)
GPIO_PinWrite(GPIO, 1, ESTOP, 0); // Isolated
{
GPIO_WRITE(PIN_ESTOP, LOW);
//GPIO_PinWrite(GPIO, 1, ESTOP, 0); // Isolated
}
else
GPIO_PinWrite(GPIO, 1, ESTOP, 1); // Not Isolated
//GPIO_PinWrite(GPIO, 1, ESTOP, 1); // Not Isolated
GPIO_WRITE(PIN_ESTOP, HIGH);
}
void Select_Transformer()