You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
941 B
C

/*
* EmbeddedSystemProject.c
*
* Created: 21/10/2021 16:55:21
* Author : n0x
*/
#include "Led.h"
#include "Taster.h"
#include "Timer.h"
#include "Tasks.h"
#include "StopLight.h"
#include "UART.h"
#include <avr/interrupt.h>
#define F_CPU 1000000
#include <util/delay.h>
/* function declarations */
void buttonTest (void);
/* functions */
int
main (void)
{
sei();
/* Initialize the LEDs, Buttons, etc. */
//Led_init();
//Taster_init();
//Timer_init();
//initTasks();
//uart_init();
uart_init_isr();
while (1)
{
//buttonTest();
//runningLight();
//blinkLedWithTimer();
//runStopLightTask1();
//runStopLightTask2();
//uart_send ("Hello World\n");
uart_send_isr ("Hello World\n");
}
}
void
buttonTest (void)
{
Taster1_get() ? Led1_On() : Led1_Off();
Taster2_get() ? Led2_On() : Led2_Off();
Taster3_get() ? Led3_On() : Led3_Off();
Taster4_get() ? Led4_On() : Led4_Off();
}