/*
 * led_test.c
 *
 * Created: 03/12/2021 15:28:35
 *  Author: 40008304
 */ 

#include "led_test.h"

void testLed(void)
{
	char sendingData = compareLed(5,5);
	switch(sendingData)
	{
		case NOTHING:
		PORTB |= (1<<PINB0);	//les deux sont eteintes
		PORTB |= (1<<PINB2);
		break;
		case FRONT:
		PORTB &= ~(1<<PINB0);	//les deux sont allumees
		PORTB &= ~(1<<PINB2);
		break;
		case RIGHT:
		PORTB &= ~(1<<PINB0);	//a droite allumee (led0)
		PORTB |= (1<<PINB2);
		break;
		case LEFT:
		PORTB |= (1<<PINB0);	//a gauche allumee (led1)
		PORTB &= ~(1<<PINB2);
		break;
		default:
		break;
	};
}