debug output for cdc example
This commit is contained in:
parent
2e338dff8a
commit
1710ad8b07
|
@ -4,6 +4,11 @@
|
|||
#include "core/usbcdc/usbhw.h"
|
||||
#include "core/usbcdc/cdcuser.h"
|
||||
#include "core/usbcdc/cdc_buf.h"
|
||||
#include <sysinit.h>
|
||||
#include "basic/basic.h"
|
||||
#include "lcd/render.h"
|
||||
#include "lcd/allfonts.h"
|
||||
|
||||
|
||||
volatile unsigned int lastTick;
|
||||
int puts(const char * str)
|
||||
|
@ -36,7 +41,11 @@ int puts(const char * str)
|
|||
|
||||
void main_cdc(void)
|
||||
{
|
||||
int dx = 0;
|
||||
//lastTick = systickGetTicks(); // Used to control output/printf timing
|
||||
|
||||
lcdPrintln("Init USB"); lcdRefresh();
|
||||
|
||||
CDC_Init(); // Initialise VCOM
|
||||
USB_Init(); // USB Initialization
|
||||
USB_Connect(TRUE); // USB Connect
|
||||
|
@ -48,6 +57,8 @@ void main_cdc(void)
|
|||
delayms(10); // Wait 10ms
|
||||
usbTimeout++;
|
||||
}
|
||||
lcdPrintln("Done"); lcdRefresh();
|
||||
|
||||
uint8_t buf[2] = {0,0};
|
||||
int l;
|
||||
while(1){
|
||||
|
@ -56,6 +67,8 @@ void main_cdc(void)
|
|||
l = 1;
|
||||
CDC_RdOutBuf (buf, &l);
|
||||
puts(buf);
|
||||
dx=DoString(dx,0,buf);
|
||||
lcdDisplay(0);
|
||||
}
|
||||
//puts("hello world\r\n");
|
||||
//delayms(1);
|
||||
|
|
Loading…
Reference in New Issue