X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/1d433d4506113c95285f633e3553ff62d4cfd05d..b35f93a372d8c872aebab4e3626bfc58d85b84d7:/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c?ds=inline diff --git a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c index 965a3cc3f..d19e5a4f0 100644 --- a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c +++ b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c @@ -37,7 +37,7 @@ #include "RNDISEthernetHost.h" /** Buffer to hold incoming and outgoing Ethernet packets. */ -uint8_t PacketBuffer[1024]; +static int8_t PacketBuffer[1024]; /** LUFA RNDIS Class driver interface configuration and state information. This structure is * passed to all RNDIS Class driver functions, so that multiple instances of the same class @@ -60,6 +60,7 @@ USB_ClassInfo_RNDIS_Host_t Ethernet_RNDIS_Interface = }, }; + /** Main program entry point. This routine configures the hardware required by the application, then * enters a loop to run the application tasks in sequence. */ @@ -190,9 +191,12 @@ void SetupHardware(void) clock_prescale_set(clock_div_1); /* Hardware Initialization */ - SerialStream_Init(9600, false); + Serial_Init(9600, false); LEDs_Init(); USB_Init(); + + /* Create a stdio stream for the serial port for stdin and stdout */ + Serial_CreateStream(NULL); } /** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and @@ -224,7 +228,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void) /** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */ void EVENT_USB_Host_HostError(const uint8_t ErrorCode) { - USB_ShutDown(); + USB_Disable(); printf_P(PSTR(ESC_FG_RED "Host Mode Error\r\n" " -- Error Code %d\r\n" ESC_FG_WHITE), ErrorCode);