X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/70284d390f524e84e0539ad1e869366aaf94cf24..a7dd98444674e407ef58d70d60b3d89fd548cd58:/LUFA/Drivers/Misc/RingBuffer.h diff --git a/LUFA/Drivers/Misc/RingBuffer.h b/LUFA/Drivers/Misc/RingBuffer.h index 5c8c8403b..023cc25c4 100644 --- a/LUFA/Drivers/Misc/RingBuffer.h +++ b/LUFA/Drivers/Misc/RingBuffer.h @@ -66,7 +66,7 @@ * RingBuffer_t Buffer; * uint8_t BufferData[128]; * - * // Initialise the buffer with the created storage array + * // Initialize the buffer with the created storage array * RingBuffer_InitBuffer(&Buffer, BufferData, sizeof(BufferData)); * * // Insert some data into the buffer @@ -125,8 +125,8 @@ { GCC_FORCE_POINTER_ACCESS(Buffer); - uint_reg_t CurrentGlobalInt = USB_INT_GetGlobalEnableState(); - USB_INT_GlobalDisable(); + uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask(); + GlobalInterruptDisable(); Buffer->In = DataPtr; Buffer->Out = DataPtr; @@ -135,7 +135,7 @@ Buffer->Size = Size; Buffer->Count = 0; - USB_INT_SetGlobalEnableState(CurrentGlobalInt); + SetGlobalInterruptMask(CurrentGlobalInt); } /** Retrieves the minimum number of bytes stored in a particular buffer. This value is computed @@ -155,12 +155,12 @@ { uint16_t Count; - uint_reg_t CurrentGlobalInt = USB_INT_GetGlobalEnableState(); - USB_INT_GlobalDisable(); + uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask(); + GlobalInterruptDisable(); Count = Buffer->Count; - USB_INT_SetGlobalEnableState(CurrentGlobalInt); + SetGlobalInterruptMask(CurrentGlobalInt); return Count; } @@ -213,12 +213,12 @@ if (++Buffer->In == Buffer->End) Buffer->In = Buffer->Start; - uint_reg_t CurrentGlobalInt = USB_INT_GetGlobalEnableState(); - USB_INT_GlobalDisable(); + uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask(); + GlobalInterruptDisable(); Buffer->Count++; - USB_INT_SetGlobalEnableState(CurrentGlobalInt); + SetGlobalInterruptMask(CurrentGlobalInt); } /** Removes an element from the ring buffer. @@ -240,12 +240,12 @@ if (++Buffer->Out == Buffer->End) Buffer->Out = Buffer->Start; - uint_reg_t CurrentGlobalInt = USB_INT_GetGlobalEnableState(); - USB_INT_GlobalDisable(); + uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask(); + GlobalInterruptDisable(); Buffer->Count--; - USB_INT_SetGlobalEnableState(CurrentGlobalInt); + SetGlobalInterruptMask(CurrentGlobalInt); return Data; }