aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/dmx.c13
-rw-r--r--kernel/tasks.h4
2 files changed, 7 insertions, 10 deletions
diff --git a/kernel/dmx.c b/kernel/dmx.c
index ba5638b..cb2ac44 100644
--- a/kernel/dmx.c
+++ b/kernel/dmx.c
@@ -21,9 +21,13 @@
#include "kernel.h"
#include "tasks.h"
-uint16_t adcval[ADCCHANNELS];
+struct adcarg adcarg;
-struct rgbarg rgbargs = { 0, 0, 0, 0, &adcval[0] };
+struct lcdarg lcdarg;
+
+struct clockarg clockarg = { &lcdarg, &adcarg };
+
+struct rgbarg rgbargs = { 0, 0, 0, 0, &adcarg.value[0] };
struct pwmarg pwmargs[] = {
{ &rgbargs.r, PB2, &rgbargs.m },
@@ -31,11 +35,6 @@ struct pwmarg pwmargs[] = {
{ &rgbargs.b, PB4, &rgbargs.m }
};
-struct adcarg adcarg = { adcval };
-
-struct lcdarg lcdarg;
-struct clockarg clockarg = { &lcdarg, &adcarg };
-
int
main()
{
diff --git a/kernel/tasks.h b/kernel/tasks.h
index 8b798d1..eeb96f9 100644
--- a/kernel/tasks.h
+++ b/kernel/tasks.h
@@ -56,9 +56,7 @@ struct pwmarg {
};
struct adcarg {
- uint16_t *value;
- uint16_t *max;
- uint16_t *min;
+ uint16_t value[ADCCHANNELS];
};
struct lcdarg {