fixed some compiler warnings, removed dead code
This commit is contained in:
parent
6c824d91a1
commit
bebae321e2
|
@ -342,7 +342,7 @@ void CDC_BulkIn(void)
|
|||
{
|
||||
int numBytesRead, numBytesAvail;
|
||||
CDC_InBufAvailChar(&numBytesAvail);
|
||||
numBytesRead = CDC_RdInBuf(&BulkBufIn[0], &numBytesAvail);
|
||||
numBytesRead = CDC_RdInBuf((char*)&BulkBufIn[0], &numBytesAvail);
|
||||
// send over USB
|
||||
if (numBytesRead > 0) {
|
||||
//gpioSetValue (RB_LED0, 1);
|
||||
|
|
|
@ -24,6 +24,7 @@ extern int CDC_RdOutBuf (char *buffer, const int *length);
|
|||
extern int CDC_WrOutBuf (const char *buffer, int *length);
|
||||
extern int CDC_OutBufAvailChar (int *availChar);
|
||||
|
||||
extern int CDC_WrInBuf (const char *buffer, int *length);
|
||||
|
||||
/* CDC Data In/Out Endpoint Address */
|
||||
#define CDC_DEP_IN 0x83
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <sysinit.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "usbcdc/usb.h"
|
||||
#include "usbcdc/usbcore.h"
|
||||
|
@ -6,13 +7,6 @@
|
|||
#include "usbcdc/usbhw.h"
|
||||
#include "usbcdc/cdcuser.h"
|
||||
|
||||
#include "basic/basic.h"
|
||||
|
||||
volatile unsigned int lastTick;
|
||||
|
||||
// There must be at least 1ms between USB frames (of up to 64 bytes)
|
||||
// This buffers all data and writes it out from the buffer one frame
|
||||
// and one millisecond at a time
|
||||
int puts(const char * str){
|
||||
if(!USB_Configuration)
|
||||
return -1;
|
||||
|
@ -23,16 +17,10 @@ int puts(const char * str){
|
|||
}
|
||||
|
||||
int puts_plus(const char * str){
|
||||
if(!USB_Configuration)
|
||||
return -1;
|
||||
|
||||
int len = strlen(str);
|
||||
CDC_WrInBuf(str, &len);
|
||||
return 0;
|
||||
return puts(str);
|
||||
}
|
||||
|
||||
void usbCDCInit(){
|
||||
lastTick = systickGetTicks(); // Used to control output/printf timing
|
||||
CDC_Init(); // Initialise VCOM
|
||||
USB_Init(); // USB Initialization
|
||||
USB_Connect(TRUE); // USB Connect
|
||||
|
|
Loading…
Reference in New Issue