The incomplete StandaloneProgrammer project now uses Host and Device Mass storage classes, so that program data can either be loaded onto the device's Dataflash storage, or read off an attached USB memory stick.

The USB target family and allowable USB mode tokens are now public and documented (USB_CAN_BE_*, USB_SERIES_*_AVR).

The SCSI_Request_Sense_Response_t and SCSI_Inquiry_Response_t type defines are now part of the Mass Storage Class driver common defines, rather than being defined in the Host mode Class driver section only.

The USB_MODE_HOST token is now defined even when host mode is not available.

Added missing CDC_Host_CreateBlockingStream() function code to the CDC Host Class driver.
This commit is contained in:
Dean Camera 2009-11-23 12:40:14 +00:00
parent 6e867f7d9b
commit aaa0bed556
23 changed files with 602 additions and 490 deletions

View file

@ -340,6 +340,12 @@ void CDC_Host_CreateStream(USB_ClassInfo_CDC_Host_t* CDCInterfaceInfo, FILE* Str
fdev_set_udata(Stream, CDCInterfaceInfo);
}
void CDC_Host_CreateBlockingStream(USB_ClassInfo_CDC_Host_t* CDCInterfaceInfo, FILE* Stream)
{
*Stream = (FILE)FDEV_SETUP_STREAM(CDC_Host_putchar, CDC_Host_getchar_Blocking, _FDEV_SETUP_RW);
fdev_set_udata(Stream, CDCInterfaceInfo);
}
static int CDC_Host_putchar(char c, FILE* Stream)
{
return CDC_Host_SendByte((USB_ClassInfo_CDC_Host_t*)fdev_get_udata(Stream), c) ? _FDEV_ERR : 0;