Renamed the PRNT_Host_SendString(), CDC_Host_SendString() and CDC_Device_SendString() functions to *_SendData(), and added new versions of the *_SendString() routines that expect a null terminated string instead.

Added new Serial_SendData() function to the Serial driver.
This commit is contained in:
Dean Camera 2011-01-30 21:02:31 +00:00
parent afd828c095
commit 43c4735305
14 changed files with 147 additions and 32 deletions

View file

@ -81,3 +81,8 @@ void Serial_SendString(const char* StringPtr)
}
}
void Serial_SendData(const uint8_t* Buffer, uint16_t Length)
{
while (Length--)
Serial_SendByte(*(Buffer++));
}

View file

@ -117,6 +117,13 @@
*/
void Serial_SendString(const char* StringPtr) ATTR_NON_NULL_PTR_ARG(1);
/** Transmits a given buffer located in SRAM memory through the USART.
*
* \param[in] Buffer Pointer to a buffer containing the data to send.
* \param[in] Length Length of the data to send, in bytes.
*/
void Serial_SendData(const uint8_t* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);
/* Inline Functions: */
/** Initializes the USART, ready for serial data transmission and reception. This initializes the interface to
* standard 8-bit, no parity, 1 stop bit settings suitable for most applications.