Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Neyzoter committed Apr 23, 2019
1 parent 189a4da commit b491539
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HARDWARE/QUEUE/queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ void queue_arr_memcpy(Queue * pQueue, u8 * buf , u8 len){
memcpy((u8 *)&(pQueue->arr[pQueue->tail]),buf,len);

}else{
memcpy((u8 *)&(pQueue->arr[pQueue->tail]),buf,QUEUE_SIZE - pQueue->tail - 1);
memcpy((u8 *)&(pQueue->arr[0]),buf+QUEUE_SIZE - pQueue->tail - 1,len - QUEUE_SIZE + pQueue->tail + 1);
memcpy((u8 *)&(pQueue->arr[pQueue->tail]),buf,QUEUE_SIZE - pQueue->tail);
memcpy((u8 *)&(pQueue->arr[0]),buf+QUEUE_SIZE - pQueue->tail,len - QUEUE_SIZE + pQueue->tail);
}
pQueue->tail = (pQueue->tail + len) % QUEUE_SIZE;

Expand Down

0 comments on commit b491539

Please sign in to comment.