add prj debug print
This commit is contained in:
		
							parent
							
								
									5db0144d4c
								
							
						
					
					
						commit
						4cdd9a24c4
					
				
					 2 changed files with 191 additions and 0 deletions
				
			
		
							
								
								
									
										24
									
								
								myapps/practice/00b-uart-debug/src/main.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								myapps/practice/00b-uart-debug/src/main.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | |||
| // RXD3/TXD3: PA4/PA5
 | ||||
| 
 | ||||
| 
 | ||||
| #include "CH59x_common.h" | ||||
| #include <string.h> | ||||
| 
 | ||||
| 
 | ||||
| int main() | ||||
| { | ||||
|   char *s = "Hello world\r\n"; | ||||
|   SetSysClock(CLK_SOURCE_PLL_60MHz); | ||||
|    | ||||
| #ifdef DEBUG | ||||
|   GPIOA_ModeCfg(bTXD3, GPIO_ModeOut_PP_5mA); | ||||
|   UART3_DefInit(); | ||||
| #endif | ||||
|    | ||||
|   while (1) { | ||||
|     //UART3_SendString((uint8_t *)s, strlen(s));
 | ||||
|     PRINT(s); | ||||
|     mDelaymS(1000); | ||||
|   } | ||||
|    | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue