Rename variables to match defintion in header file.

This commit is contained in:
blckmn 2016-12-28 13:54:53 +11:00
parent b102435a34
commit 899de58d6f
1 changed files with 6 additions and 6 deletions

View File

@ -354,24 +354,24 @@ uint32_t CDC_Send_FreeBytes(void)
* @brief CDC_Send_DATA * @brief CDC_Send_DATA
* CDC received data to be send over USB IN endpoint are managed in * CDC received data to be send over USB IN endpoint are managed in
* this function. * this function.
* @param Buf: Buffer of data to be sent * @param ptrBuffer: Buffer of data to be sent
* @param Len: Number of data to be sent (in bytes) * @param sendLength: Number of data to be sent (in bytes)
* @retval Bytes sent * @retval Bytes sent
*/ */
uint32_t CDC_Send_DATA(const uint8_t* Buf, uint32_t Len) uint32_t CDC_Send_DATA(const uint8_t *ptrBuffer, uint32_t sendLength)
{ {
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef*)USBD_Device.pClassData; USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef*)USBD_Device.pClassData;
while(hcdc->TxState != 0); while(hcdc->TxState != 0);
for (uint32_t i = 0; i < Len; i++) for (uint32_t i = 0; i < sendLength; i++)
{ {
UserTxBuffer[UserTxBufPtrIn] = Buf[i]; UserTxBuffer[UserTxBufPtrIn] = ptrBuffer[i];
UserTxBufPtrIn = (UserTxBufPtrIn + 1) % APP_TX_DATA_SIZE; UserTxBufPtrIn = (UserTxBufPtrIn + 1) % APP_TX_DATA_SIZE;
while (CDC_Send_FreeBytes() == 0) { while (CDC_Send_FreeBytes() == 0) {
delay(1); delay(1);
} }
} }
return Len; return sendLength;
} }