forked from mirror/qmk_firmware
Added const modifiers to device mode class drivers.
Added parameter directions to function parameter documentation. Added new experimental FAST_STREAM_FUNCTIONS compile time option to speed up stream transfers at the expense of a higher FLASH consumption (needs testing to verify improved throughput).
This commit is contained in:
@@ -206,7 +206,7 @@ void EVENT_USB_UnhandledControlPacket(void)
|
||||
/** Reads or writes a block of EEPROM or FLASH memory to or from the appropriate CDC data endpoint, depending
|
||||
* on the AVR910 protocol command issued.
|
||||
*
|
||||
* \param Command Single character AVR910 protocol command indicating what memory operation to perform
|
||||
* \param[in] Command Single character AVR910 protocol command indicating what memory operation to perform
|
||||
*/
|
||||
static void ReadWriteMemoryBlock(const uint8_t Command)
|
||||
{
|
||||
@@ -343,7 +343,7 @@ static uint8_t FetchNextCommandByte(void)
|
||||
/** Writes the next response byte to the CDC data IN endpoint, and sends the endpoint back if needed to free up the
|
||||
* bank when full ready for the next byte in the packet to the host.
|
||||
*
|
||||
* \param Response Next response byte to send to the host
|
||||
* \param[in] Response Next response byte to send to the host
|
||||
*/
|
||||
static void WriteNextResponseByte(const uint8_t Response)
|
||||
{
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
* type define so that the same macro can be used for functional descriptors of varying data lengths,
|
||||
* while allowing the sizeof() operator to return correct results.
|
||||
*
|
||||
* \param DataSize Size of the functional descriptor's data payload, in bytes
|
||||
* \param[in] DataSize Size of the functional descriptor's data payload, in bytes
|
||||
*/
|
||||
#define CDC_FUNCTIONAL_DESCRIPTOR(DataSize) \
|
||||
struct \
|
||||
|
||||
@@ -454,7 +454,7 @@ void EVENT_USB_UnhandledControlPacket(void)
|
||||
/** Routine to discard the specified number of bytes from the control endpoint stream. This is used to
|
||||
* discard unused bytes in the stream from the host, including the memory program block suffix.
|
||||
*
|
||||
* \param NumberOfBytes Number of bytes to discard from the host from the control endpoint
|
||||
* \param[in] NumberOfBytes Number of bytes to discard from the host from the control endpoint
|
||||
*/
|
||||
static void DiscardFillerBytes(uint8_t NumberOfBytes)
|
||||
{
|
||||
|
||||
@@ -76,16 +76,16 @@
|
||||
|
||||
/** Convenience macro, used to determine if the issued command is the given one-byte long command.
|
||||
*
|
||||
* \param dataarr Command byte array to check against
|
||||
* \param cb1 First command byte to check
|
||||
* \param[in] dataarr Command byte array to check against
|
||||
* \param[in] cb1 First command byte to check
|
||||
*/
|
||||
#define IS_ONEBYTE_COMMAND(dataarr, cb1) (dataarr[0] == cb1)
|
||||
|
||||
/** Convenience macro, used to determine if the issued command is the given two-byte long command.
|
||||
*
|
||||
* \param dataarr Command byte array to check against
|
||||
* \param cb1 First command byte to check
|
||||
* \param cb2 Second command byte to check
|
||||
* \param[in] dataarr Command byte array to check against
|
||||
* \param[in] cb1 First command byte to check
|
||||
* \param[in] cb2 Second command byte to check
|
||||
*/
|
||||
#define IS_TWOBYTE_COMMAND(dataarr, cb1, cb2) ((dataarr[0] == cb1) && (dataarr[1] == cb2))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user