Add conio
Also removes print statements from the interrupt handler (except for the button interrupt)
This commit is contained in:
26
sw/main.c
26
sw/main.c
@@ -1,24 +1,20 @@
|
||||
#include <stdint.h>
|
||||
#include <conio.h>
|
||||
|
||||
#include "sevenseg.h"
|
||||
#include "uart.h"
|
||||
|
||||
void puts(const char* s)
|
||||
{
|
||||
while (*s) {
|
||||
uart_txb_block(*s);
|
||||
if (*s == '\n')
|
||||
uart_txb_block('\r');
|
||||
|
||||
s++;
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
hex_enable(0x3f);
|
||||
hex_set_24(0xabcdef);
|
||||
char s[16];
|
||||
|
||||
clrscr();
|
||||
cprintf("Hello, world!\n");
|
||||
|
||||
while (1) {
|
||||
cscanf("%15s", s);
|
||||
cprintf("Read string: %s\n", s);
|
||||
}
|
||||
|
||||
|
||||
puts("Hello, World!\n");
|
||||
while(1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user