X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstm-demo%2Fao_demo.c;h=93eb92f48c238e8d2ee698bf824cca5c80ec58b3;hb=07eecc0ff6e1104f911e5f83d67f3e14dc68c59c;hp=b0d03840c22348345fcf1b02e1ce32cf5adb6bf3;hpb=c6e57291d91f1f6c4de5c54a5cfd3eef66d9f830;p=fw%2Faltos diff --git a/src/stm-demo/ao_demo.c b/src/stm-demo/ao_demo.c index b0d03840..93eb92f4 100644 --- a/src/stm-demo/ao_demo.c +++ b/src/stm-demo/ao_demo.c @@ -27,35 +27,6 @@ struct ao_task demo_task; static inline int min(int a, int b) { return a < b ? a : b; } -void -ao_demo(void) -{ - char message[] = "Hello, Mike & Bdale --- "; - char part[7]; - int i = 0; - int len = sizeof(message) - 1; - int first, second; - - part[6] = '\0'; - for (;;) { - ao_delay(AO_MS_TO_TICKS(150)); - first = min(6, len - i); - second = 6 - first; - memcpy(part, message + i, first); - memcpy(part + first, message, second); - ao_lcd_font_string(part); - if (++i >= len) - i = 0; - } -} - -void _close() { } -void _sbrk() { } -void _isatty() { } -void _lseek() { } -void _exit () { } -void _read () { } -void _fstat() { } #define AO_DMA_TEST_INDEX STM_DMA_INDEX(4) @@ -125,7 +96,7 @@ ao_i2c_write(void) { for (i = 0; i < 10; i++) { ao_i2c_get(0); if (ao_i2c_start(0, 0x55)) - ao_i2c_send(data, 4, 0, TRUE); + ao_i2c_send(data, 4, 0, true); else { printf ("i2c start failed\n"); ao_i2c_put(0); @@ -215,7 +186,7 @@ main(void) ao_task_init(); - ao_led_init(LEDS_AVAILABLE); + ao_led_init(); ao_led_on(AO_LED_GREEN); ao_led_off(AO_LED_BLUE); ao_timer_init();