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
|
.section .text.boot
|
||||||
_start:
|
_start:
|
||||||
CPSID aif //Disable interrupts
|
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
|
ldr sp, =svc_stack
|
||||||
push {r0,r1,r2}
|
push {r0,r1,r2}
|
||||||
//set other stacks
|
//set other stacks
|
||||||
|
|
|
@ -34,7 +34,7 @@ auto Serial::serial_puti(int i) -> void {
|
||||||
char buf[65];
|
char buf[65];
|
||||||
char *ptr=buf+63;
|
char *ptr=buf+63;
|
||||||
ptr[1]=0;
|
ptr[1]=0;
|
||||||
char *chars = "0123456789";
|
const char *chars = "0123456789";
|
||||||
do {
|
do {
|
||||||
*(ptr--) = chars[i%10];
|
*(ptr--) = chars[i%10];
|
||||||
i/=10;
|
i/=10;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include "uart.hpp"
|
#include "uart.hpp"
|
||||||
static volatile uint32_t x;
|
auto delay = [](uint32_t count) {
|
||||||
auto delay = [&x](uint32_t count) {
|
for(uint32_t x=0;x<count;x++);
|
||||||
for(x=0;x<count;x++);
|
|
||||||
};
|
};
|
||||||
UART &UART::getInstance() {
|
UART &UART::getInstance() {
|
||||||
static UART instance;
|
static UART instance;
|
||||||
|
|
Loading…
Reference in a new issue