updated the Cmake and main file to include and link the enable module.
This commit is contained in:
parent
0fe08d7612
commit
ee63806a22
|
@ -8,6 +8,7 @@ target_link_libraries(${PROJECT_NAME}
|
|||
TriacOut
|
||||
zero_cross_detection
|
||||
load
|
||||
Enable
|
||||
)
|
||||
|
||||
# Ensure the build rules are defined
|
||||
|
|
12
src/main.c
12
src/main.c
|
@ -20,6 +20,7 @@
|
|||
#include "ADC.h"
|
||||
#include "TriacOut.h"
|
||||
#include "load.h"
|
||||
#include "Enable.h"
|
||||
#include <avr/cpufunc.h> /* Required header file */
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue