增加了串口调试和xprintf功能
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
#include "lib_driver_swiic_pan159.h"
|
||||
#include "lib_driver_pwm_pan159.h"
|
||||
#include "lib_driver_rfspi_pan159.h"
|
||||
#include "lib_driver_uart_pan159.h"
|
||||
//#include "lib_driver_uart_pan159.h"
|
||||
#include "lib_driver_timer_pan159.h"
|
||||
#include "lib_driver_wdt_pan159.h"
|
||||
#include "lib_driver_xn297l.h"
|
||||
@@ -27,6 +27,7 @@
|
||||
//debug
|
||||
#include "debug.h"
|
||||
#include "debug_rf.h"
|
||||
#include "myUart.h"
|
||||
|
||||
|
||||
uint32_t xx,yy;
|
||||
@@ -113,30 +114,34 @@ int main()
|
||||
adc_pan159_init();
|
||||
/* rf-297L */
|
||||
rf_init();
|
||||
/* uart */
|
||||
uart_init_pan159();
|
||||
/* TIMER0 */
|
||||
timer_pan159_init(500,sometingtest2);
|
||||
printf("adc value is");
|
||||
//below is for test
|
||||
rf_debug_init();
|
||||
timer_pan159_init(500,sometingtest2);
|
||||
/* uart debug */
|
||||
xprintf_init(115200);
|
||||
xputs(Banner);
|
||||
xputs("228-7045 Fixture monitor");
|
||||
xprintf(",Ver %u.%02u\n", 1,2);
|
||||
/* RF debug */
|
||||
rf_debug_init();
|
||||
/* led init */
|
||||
bsp_led_init();
|
||||
while(0) {
|
||||
bsp_led_blink(0x03);
|
||||
uart_send(somtingtest,3);
|
||||
adc_pan159_samp1(adc2_value);
|
||||
delay_ms(125);
|
||||
dbg_update();
|
||||
|
||||
/* main loop start here */
|
||||
while(1) {
|
||||
bsp_led_blink(0x03);
|
||||
adc_pan159_samp1(adc2_value);
|
||||
//xprintf("adc value is:%d\n",adc2_value[0]);
|
||||
delay_ms(125);
|
||||
dbg_update();
|
||||
xputc('>');
|
||||
xgets(Line, sizeof Line);
|
||||
Uart_wait_input();
|
||||
} //end while?
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // end main()?
|
||||
|
||||
|
||||
|
||||
/*
|
||||
//above is for test
|
||||
flash_pan159_erase(FMC_SPROM_BASE,1);
|
||||
flash_pan159_write(FMC_SPROM_BASE,testdata,13);
|
||||
@@ -145,7 +150,7 @@ int main()
|
||||
//pwm_pan159_setDuty(pwm_duty);
|
||||
//DrvWDT_Init(WDT_TIMEOUT_2POW6);
|
||||
while(1){
|
||||
uart_send(somtingtest,3);
|
||||
//uart_send(somtingtest,3);
|
||||
xn297l_tx_data(testdata,13);
|
||||
adc_pan159_samp1(adc2_value);
|
||||
//pwm_pan159_setDuty(pwm_duty);
|
||||
@@ -186,7 +191,6 @@ int main()
|
||||
// flash_pan159_read(FMC_SPROM_BASE,testdata,40);
|
||||
__enable_irq();
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
/*** (C) COPYRIGHT 2015 Nuvoton Technology Corp. ***/
|
||||
|
||||
Reference in New Issue
Block a user