aboutsummaryrefslogtreecommitdiff
path: root/kernel/tasks.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/tasks.h')
-rw-r--r--kernel/tasks.h34
1 files changed, 29 insertions, 5 deletions
diff --git a/kernel/tasks.h b/kernel/tasks.h
index 4137402..cf386c7 100644
--- a/kernel/tasks.h
+++ b/kernel/tasks.h
@@ -18,6 +18,29 @@
#ifndef __TASKS_H
#define __TASKS_H
+#define ADCCHANNELS 6
+#define ADCPRESCALE 32
+
+#if (ADCPRESCALE == 1)
+#define ADC_FLAGS 0
+#elif (ADCPRESCALE == 2)
+#define ADC_FLAGS _BV(ADPS0)
+#elif (ADCPRESCALE == 4)
+#define ADC_FLAGS _BV(ADPS1)
+#elif (ADCPRESCALE == 8)
+#define ADC_FLAGS (_BV(ADPS1) | _BV(ADPS0))
+#elif (ADCPRESCALE == 16)
+#define ADC_FLAGS _BV(ADPS2)
+#elif (ADCPRESCALE == 32)
+#define ADC_FLAGS (_BV(ADPS2) | _BV(ADPS0))
+#elif (ADCPRESCALE == 64)
+#define ADC_FLAGS (_BV(ADPS2) | _BV(ADPS1))
+#elif (ADCPRESCALE == 128)
+#define ADC_FLAGS (_BV(ADPS2) | _BV(ADPS1) | _BV(ADPS0))
+#else
+#warning "invalid ADCPRESCALE value"
+#endif
+
struct rgbarg {
uint8_t *r, *g, *b;
};
@@ -25,17 +48,18 @@ struct rgbarg {
struct pwmarg {
uint8_t *value;
uint8_t pin;
- uint32_t d;
- uint32_t r;
};
struct adcarg {
- uint32_t d;
- uint32_t r;
- uint8_t channel;
uint16_t *value;
};
+struct lcdarg {
+ char *first;
+ char *second;
+ uint16_t *adc;
+};
+
void init_uart(void);
void heartbeat(void *);