Fix SDK to build cleanly if PICO_DEFAULT_UART isn't defined (#223)

This commit is contained in:
Andrew Scheller 2021-03-04 14:45:30 +00:00 committed by GitHub
parent ae2f040e86
commit a1856a91e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 8 deletions

@ -1 +1 @@
Subproject commit e0aa405d19e35dbf58cf502b8106455c1a3c2a5c
Subproject commit 11c23f88bf42f64ce14b8a7b0b2a4e207dc4dd12

View File

@ -35,6 +35,7 @@ void hwdiv_sim() {
ui64 ntests=0;
#ifdef uart_default
void o1ch(int c) {
uart_putc(uart_default, c);
}
@ -73,6 +74,7 @@ void odec(int u) {
zf=odig(&v,10,zf);
zf=odig(&v,1,0);
}
#endif
int xdigval(int c) {
@ -97,6 +99,8 @@ unsigned int rnd32() {
//#define RANDOMISE
//#define rfn "/dev/random"
#ifdef uart_default
void test_divu64u64(ui64 y,ui64 x) {
ui64 q,r;
test_mulib_divu64u64(&y,&x,&q,&r);
@ -186,6 +190,7 @@ void test_random() {
odec(i+1); ostr("M\n");
}
}
#endif
uint32_t __attribute__((naked)) time_32(uint32_t a, uint32_t b, uint32_t (*func)(uint32_t a, uint32_t b)) {
asm(
@ -323,6 +328,9 @@ void perf_test() {
}
int main() {
#ifndef uart_default
#warning test/pico_divider requires a default uart
#else
#ifdef TURBO
vreg_set_voltage(VREG_VOLTAGE_MAX);
set_sys_clock_khz(48000*8, true);
@ -372,5 +380,6 @@ int main() {
ostr("END\n");
return 0;
#endif
}