#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>

#include "utils.h"
#include "bitmanip.h"


void rgb_d5_roll_colors() {
	MODE_OUTPUT(RGB5_RED);
	MODE_OUTPUT(RGB5_GEEN);
	MODE_OUTPUT(RGB5_BLUE);
	while(1) {
		SET_ELEM(RGB5_RED);
		_delay_ms(1000);
		CLEAR_ELEM(RGB5_RED);
		SET_ELEM(RGB5_GEEN);
		_delay_ms(1000);
		CLEAR_ELEM(RGB5_GEEN);
		SET_ELEM(RGB5_BLUE);
		_delay_ms(1000);
		CLEAR_ELEM(RGB5_BLUE);
	}
}

// led RGB D5 must turns on in red then green then blue in a loop
int main() {

	while(1) {
		rgb_d5_roll_colors();
	}
}
