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
|
TriacOut
|
||||||
zero_cross_detection
|
zero_cross_detection
|
||||||
load
|
load
|
||||||
|
Enable
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ensure the build rules are defined
|
# Ensure the build rules are defined
|
||||||
|
|
12
src/main.c
12
src/main.c
|
@ -20,6 +20,7 @@
|
||||||
#include "ADC.h"
|
#include "ADC.h"
|
||||||
#include "TriacOut.h"
|
#include "TriacOut.h"
|
||||||
#include "load.h"
|
#include "load.h"
|
||||||
|
#include "Enable.h"
|
||||||
#include <avr/cpufunc.h> /* Required header file */
|
#include <avr/cpufunc.h> /* Required header file */
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <util/delay.h>
|
#include <util/delay.h>
|
||||||
|
@ -29,15 +30,6 @@
|
||||||
//Set the function pointer for the delay func
|
//Set the function pointer for the delay func
|
||||||
void (*Delay_MicroSeconds)(double us) = _delay_us;
|
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)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
@ -53,7 +45,7 @@ int main(int argc, char **argv)
|
||||||
//The G1 pin is low at this point.
|
//The G1 pin is low at this point.
|
||||||
_delay_ms(2500);
|
_delay_ms(2500);
|
||||||
ZCD_Poll();
|
ZCD_Poll();
|
||||||
//setEnablePinsHigh();
|
Enable_SetPinsHigh();
|
||||||
while(true){
|
while(true){
|
||||||
; //Do nothing until new Power cycle/reset occurs
|
; //Do nothing until new Power cycle/reset occurs
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue