diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2b831fa..883430d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -8,6 +8,7 @@ target_link_libraries(${PROJECT_NAME} TriacOut zero_cross_detection load + Enable ) # Ensure the build rules are defined diff --git a/src/main.c b/src/main.c index e443be2..c6f5842 100644 --- a/src/main.c +++ b/src/main.c @@ -20,6 +20,7 @@ #include "ADC.h" #include "TriacOut.h" #include "load.h" +#include "Enable.h" #include /* Required header file */ #include #include @@ -29,15 +30,6 @@ //Set the function pointer for the delay func void (*Delay_MicroSeconds)(double us) = _delay_us; -static void setEnablePinsHigh(void) -{ - //Pins 12, 6 and 7 are all set high. - PORTA.DIR |= (1<<2); //PA2= pin 12 - PORTB.DIR |= (1<<2)|(1<<3); //PB2 = pin 7, PB3 = pin 6 - - PORTA.OUT |= (1<<2); - PORTB.OUT |= (1<<2)|(1<<3); -} int main(int argc, char **argv) { @@ -53,7 +45,7 @@ int main(int argc, char **argv) //The G1 pin is low at this point. _delay_ms(2500); ZCD_Poll(); - //setEnablePinsHigh(); + Enable_SetPinsHigh(); while(true){ ; //Do nothing until new Power cycle/reset occurs }