+#include <avr/io.h>
+
#include "lights.h"
typedef struct {
};
pattern_t blink_pattern[] = {
- { 1, 5 },
- { 0, 5 },
+ { 1, 0x4 },
+ { 0, 0x8 },
+ PATTERN_END
+};
+
+pattern_t pattern_num[] = {
+ { 1, 0x1 },
+ { 0, 0x4 },
+ { 1, 0x1 },
+ { 0, 0x4 },
+ { 1, 0x1 },
+ { 0, 0x4 },
+ { 1, 0x1 },
+ { 0, 0x4 },
+ { 1, 0x1 },
+ { 0, 0x4 },
+ { 1, 0x1 },
+ { 0, 0x4 },
+ { 1, 0x1 },
+ { 0, 0x4 },
+ { 1, 0x1 },
+ { 0, 0x4 },
+ { 1, 0x1 },
+ { 0, 0x1F },
PATTERN_END
};
}
}
+static inline pattern_t *pattern_select(unsigned char n)
+{
+ log_byte(ambient_zone);
+ return pattern_num + sizeof(pattern_num)/sizeof(pattern_t)
+ - 1 - 2*(1+ambient_zone);;
+}
+
+static void inline led_off(unsigned char n)
+{
+ if (n == N_PWMLEDS) {
+ gpio_set(GPIO_LED2, 0);
+ }
+}
+
+static void inline led_set_level(unsigned char n, unsigned char level)
+{
+ if (n == N_PWMLEDS) {
+ gpio_set(GPIO_LED2, 1);
+ }
+}
+
void patterns_next_tick()
{
unsigned char i;