projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Code style fixes for the Device mode USB Audio Class driver to make it more in line...
[pub/USBasp.git]
/
LUFA
/
Drivers
/
Misc
/
RingBuffer.h
diff --git
a/LUFA/Drivers/Misc/RingBuffer.h
b/LUFA/Drivers/Misc/RingBuffer.h
index
5c8c840
..
023cc25
100644
(file)
--- a/
LUFA/Drivers/Misc/RingBuffer.h
+++ b/
LUFA/Drivers/Misc/RingBuffer.h
@@
-66,7
+66,7
@@
* RingBuffer_t Buffer;
\r
* uint8_t BufferData[128];
\r
*
\r
* RingBuffer_t Buffer;
\r
* uint8_t BufferData[128];
\r
*
\r
- * // Initiali
s
e the buffer with the created storage array
\r
+ * // Initiali
z
e the buffer with the created storage array
\r
* RingBuffer_InitBuffer(&Buffer, BufferData, sizeof(BufferData));
\r
*
\r
* // Insert some data into the buffer
\r
* RingBuffer_InitBuffer(&Buffer, BufferData, sizeof(BufferData));
\r
*
\r
* // Insert some data into the buffer
\r
@@
-125,8
+125,8
@@
{
\r
GCC_FORCE_POINTER_ACCESS(Buffer);
\r
\r
{
\r
GCC_FORCE_POINTER_ACCESS(Buffer);
\r
\r
- uint_reg_t CurrentGlobalInt =
USB_INT_GetGlobalEnableState
();
\r
-
USB_INT_Global
Disable();
\r
+ uint_reg_t CurrentGlobalInt =
GetGlobalInterruptMask
();
\r
+
GlobalInterrupt
Disable();
\r
\r
Buffer->In = DataPtr;
\r
Buffer->Out = DataPtr;
\r
\r
Buffer->In = DataPtr;
\r
Buffer->Out = DataPtr;
\r
@@
-135,7
+135,7
@@
Buffer->Size = Size;
\r
Buffer->Count = 0;
\r
\r
Buffer->Size = Size;
\r
Buffer->Count = 0;
\r
\r
-
USB_INT_SetGlobalEnableState
(CurrentGlobalInt);
\r
+
SetGlobalInterruptMask
(CurrentGlobalInt);
\r
}
\r
\r
/** Retrieves the minimum number of bytes stored in a particular buffer. This value is computed
\r
}
\r
\r
/** Retrieves the minimum number of bytes stored in a particular buffer. This value is computed
\r
@@
-155,12
+155,12
@@
{
\r
uint16_t Count;
\r
\r
{
\r
uint16_t Count;
\r
\r
- uint_reg_t CurrentGlobalInt =
USB_INT_GetGlobalEnableState
();
\r
-
USB_INT_Global
Disable();
\r
+ uint_reg_t CurrentGlobalInt =
GetGlobalInterruptMask
();
\r
+
GlobalInterrupt
Disable();
\r
\r
Count = Buffer->Count;
\r
\r
\r
Count = Buffer->Count;
\r
\r
-
USB_INT_SetGlobalEnableState
(CurrentGlobalInt);
\r
+
SetGlobalInterruptMask
(CurrentGlobalInt);
\r
return Count;
\r
}
\r
\r
return Count;
\r
}
\r
\r
@@
-213,12
+213,12
@@
if (++Buffer->In == Buffer->End)
\r
Buffer->In = Buffer->Start;
\r
\r
if (++Buffer->In == Buffer->End)
\r
Buffer->In = Buffer->Start;
\r
\r
- uint_reg_t CurrentGlobalInt =
USB_INT_GetGlobalEnableState
();
\r
-
USB_INT_Global
Disable();
\r
+ uint_reg_t CurrentGlobalInt =
GetGlobalInterruptMask
();
\r
+
GlobalInterrupt
Disable();
\r
\r
Buffer->Count++;
\r
\r
\r
Buffer->Count++;
\r
\r
-
USB_INT_SetGlobalEnableState
(CurrentGlobalInt);
\r
+
SetGlobalInterruptMask
(CurrentGlobalInt);
\r
}
\r
\r
/** Removes an element from the ring buffer.
\r
}
\r
\r
/** Removes an element from the ring buffer.
\r
@@
-240,12
+240,12
@@
if (++Buffer->Out == Buffer->End)
\r
Buffer->Out = Buffer->Start;
\r
\r
if (++Buffer->Out == Buffer->End)
\r
Buffer->Out = Buffer->Start;
\r
\r
- uint_reg_t CurrentGlobalInt =
USB_INT_GetGlobalEnableState
();
\r
-
USB_INT_Global
Disable();
\r
+ uint_reg_t CurrentGlobalInt =
GetGlobalInterruptMask
();
\r
+
GlobalInterrupt
Disable();
\r
\r
Buffer->Count--;
\r
\r
\r
Buffer->Count--;
\r
\r
-
USB_INT_SetGlobalEnableState
(CurrentGlobalInt);
\r
+
SetGlobalInterruptMask
(CurrentGlobalInt);
\r
\r
return Data;
\r
}
\r
\r
return Data;
\r
}
\r