fix: made raspi2 compile
This commit is contained in:
parent
f1fc8f872e
commit
270f493256
3 changed files with 9 additions and 4 deletions
|
@ -7,6 +7,12 @@
|
|||
.section .text.boot
|
||||
_start:
|
||||
CPSID aif //Disable interrupts
|
||||
//check if current cpu is cpu0
|
||||
1:
|
||||
mrc p15, 0, r0, c0, c0, 5;
|
||||
ands r0, #3
|
||||
wfine
|
||||
bne 1b
|
||||
ldr sp, =svc_stack
|
||||
push {r0,r1,r2}
|
||||
//set other stacks
|
||||
|
|
|
@ -34,7 +34,7 @@ auto Serial::serial_puti(int i) -> void {
|
|||
char buf[65];
|
||||
char *ptr=buf+63;
|
||||
ptr[1]=0;
|
||||
char *chars = "0123456789";
|
||||
const char *chars = "0123456789";
|
||||
do {
|
||||
*(ptr--) = chars[i%10];
|
||||
i/=10;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include "uart.hpp"
|
||||
static volatile uint32_t x;
|
||||
auto delay = [&x](uint32_t count) {
|
||||
for(x=0;x<count;x++);
|
||||
auto delay = [](uint32_t count) {
|
||||
for(uint32_t x=0;x<count;x++);
|
||||
};
|
||||
UART &UART::getInstance() {
|
||||
static UART instance;
|
||||
|
|
Loading…
Reference in a new issue