12345678910111213141516171819202122232425262728293031323334 |
- #include <stddef.h>
- #include <stdint.h>
- #include "io.h"
- void die(void)
- {
- while (1)
- ;
- }
- void _start(void)
- {
- static const char hello[] = "Hello, World!\r\n";
- const char *p;
- uint8_t led = 0;
- con_set_baudrate(115000);
- set_led(led = 0);
- for (p = hello; *p; p++)
- CONSOLE = *p;
- while ( 1 ) {
- for (int x = 0; x < 10000000; x++)
- /* nothing */;
- led = (led << 1) | ((~led >> 2) & 1);
- set_led(led);
- udelay(400000);
- CONSOLE = '*';
- }
- die();
- }
|