00001
00027
00028
00029
00030
00031
00032
00033
00034
00035 #include "asuro.h"
00036
00037
00038
00039
00068 inline void StatusLED (
00069 unsigned char color)
00070 {
00071 if (color == OFF)
00072 {
00073 GREEN_LED_OFF;
00074 RED_LED_OFF;
00075 }
00076 if (color == GREEN)
00077 {
00078 GREEN_LED_ON;
00079 RED_LED_OFF;
00080 }
00081 if (color == YELLOW)
00082 {
00083 GREEN_LED_ON;
00084 RED_LED_ON;
00085 }
00086 if (color == RED)
00087 {
00088 GREEN_LED_OFF;
00089 RED_LED_ON;
00090 }
00091 }
00092
00093
00094
00095
00120 inline void FrontLED (
00121 unsigned char status)
00122 {
00123 PORTD = (PORTD &~(1 << PD6)) | (status << PD6);
00124 }
00125
00126
00127
00128
00155 void BackLED (
00156 unsigned char left,
00157 unsigned char right)
00158 {
00159 if (left || right)
00160 {
00161 PORTD &= ~(1 << PD7);
00162 DDRC |= (1 << PC0) | (1 << PC1);
00163 PORTC |= (1 << PC0) | (1 << PC1);
00164 }
00165 if (!left)
00166 PORTC &= ~(1 << PC1);
00167 if (!right)
00168 PORTC &= ~(1 << PC0);
00169 }