Removed SerialStream module, rolled functionality into the base USART Serial peripheral driver instead through the new Serial_CreateStream() and Serial_CreateBlockingStream() methods.
Renamed the Serial byte send/receive functions to remain consistent with the CDC driver's byte functions. Altered the serial byte receive function to make it non-blocking.
This commit is contained in:
parent
30f6d2bfd8
commit
afd828c095
107 changed files with 518 additions and 560 deletions
|
@ -270,9 +270,14 @@
|
|||
uint8_t CDC_Host_Flush(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
|
||||
|
||||
/** Creates a standard character stream for the given CDC Device instance so that it can be used with all the regular
|
||||
* functions in the avr-libc \c <stdio.h> library that accept a FILE stream as a destination (e.g. fprintf). The created
|
||||
* functions in the avr-libc \c <stdio.h> library that accept a \c FILE stream as a destination (e.g. \c fprintf). The created
|
||||
* stream is bidirectional and can be used for both input and output functions.
|
||||
*
|
||||
* Reading data from this stream is non-blocking, i.e. in most instances, complete strings cannot be read in by a single
|
||||
* fetch, as the endpoint will not be ready at some point in the transmission, aborting the transfer. However, this may
|
||||
* be used when the read data is processed byte-per-bye (via \c getc()) or when the user application will implement its own
|
||||
* line buffering.
|
||||
*
|
||||
* \note The created stream can be given as stdout if desired to direct the standard output from all \c <stdio.h> functions
|
||||
* to the given CDC interface.
|
||||
*
|
||||
|
@ -282,7 +287,7 @@
|
|||
void CDC_Host_CreateStream(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
|
||||
FILE* const Stream);
|
||||
|
||||
/** Identical to CDC_Host_CreateStream(), except that reads are blocking until the calling stream function terminates
|
||||
/** Identical to \ref CDC_Host_CreateStream(), except that reads are blocking until the calling stream function terminates
|
||||
* the transfer. While blocking, the USB and CDC service tasks are called repeatedly to maintain USB communications.
|
||||
*
|
||||
* \param[in,out] CDCInterfaceInfo Pointer to a structure containing a CDC Class configuration and state.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue