Fix SDK to build cleanly if PICO_DEFAULT_UART isn't defined (#223)
This commit is contained in:
		
				
					committed by
					
						 graham sanderson
						graham sanderson
					
				
			
			
				
	
			
			
			
						parent
						
							9ba10751f8
						
					
				
				
					commit
					2b1dbfa3d2
				
			 Submodule lib/tinyusb updated: e0aa405d19...11c23f88bf
									
								
							| @ -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 | ||||
| } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user