aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2018-03-07 15:25:55 -0500
committerClyne Sullivan <tullivan99@gmail.com>2018-03-07 15:25:55 -0500
commita774e33ceff6c3eef02aad4f58a11c7e23ff62bb (patch)
tree36555d06322d4bea7ffe4bf572cf282db2989fcd /src/main.c
parent77338a6b34d6a164fc2f70e6d736eca8a5b7d251 (diff)
basic graphing
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c
index 74ae6b7..71ce68f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -13,6 +13,7 @@
#include <script.h>
#include <random.h>
#include <keypad.h>
+#include <flash.h>
extern uint8_t _ebss;
extern char *itoa(int, char *, int);
@@ -24,7 +25,7 @@ int main(void)
{
asm("cpsid i");
// disable cached writes for precise debug info
- //*((uint32_t *)0xE000E008) |= 2;
+ *((uint32_t *)0xE000E008) |= 2;
// prepare flash latency for 80MHz operation
FLASH->ACR &= ~(FLASH_ACR_LATENCY);
@@ -58,14 +59,24 @@ void kmain(void)
dsp_cursoron();
task_start(task_interpreter, 4096);
+ /*char buf[2];
+ flash_init();
+ buf[0] = 'A';
+ flash_write(buf, 0, 1);
+ buf[0] = 0;
+ flash_read(buf, 0x00000000, 1);
+ buf[0] += ' ';
+ buf[1] = '\0';
+ dsp_puts(buf);*/
+
while (1) {
- gpio_dout(GPIOA, 5,
- (keypad_isdown(K0)));
- delay(10);
- /*gpio_dout(GPIOA, 5, 1);
+ //gpio_dout(GPIOA, 5,
+ // (keypad_isdown(K0)));
+ //delay(10);
+ gpio_dout(GPIOA, 5, 1);
delay(250);
gpio_dout(GPIOA, 5, 0);
- delay(250);*/
+ delay(250);
}
}
@@ -77,7 +88,7 @@ void task_interpreter(void)
char *s = initrd_getfile("init");
if (s == 0) {
- dsp_puts("init not found");
+ dsp_puts("can't find init");
goto end;
}