Minor code improvements

This commit is contained in:
giomba 2018-12-31 14:16:58 +01:00
parent a38f8f359b
commit c4342f1b89
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,9 @@
#include <dbg.h>
#include <stdint.h>
/* WARNING: use of static variable is not thread safe!! */
static char string[32];
/* Never call this function directly: always use the printk,
* which disables and reenables interrupts */
extern "C" int c_printk(const char* msg) {
@ -18,8 +21,6 @@ extern "C" int printkl(const char* msg) {
return 0;
}
static char string[11];
/* TODO: WARNING: this is not thread safe!! */
extern "C" const char* itoa(uint32_t n) {
string[10] = '\0';
string[0] = '0'; string[1] = 'x';