aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/Misc
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2011-04-08 05:40:25 +0000
committerDean Camera <dean@fourwalledcubicle.com>2011-04-08 05:40:25 +0000
commitc263ea837ae7e3c0e963b798afdffd501790ce2c (patch)
treea899d943856b48f6889cf1fe9f5b97ccc58ca598 /LUFA/Drivers/Misc
parentde9bd767dc8578a45a195fb1e37dd4ff26ae9567 (diff)
downloadlufa-c263ea837ae7e3c0e963b798afdffd501790ce2c.tar.gz
lufa-c263ea837ae7e3c0e963b798afdffd501790ce2c.tar.bz2
lufa-c263ea837ae7e3c0e963b798afdffd501790ce2c.zip
Move global interrupt enable/disable functions out to Common.h and document them.
Diffstat (limited to 'LUFA/Drivers/Misc')
-rw-r--r--LUFA/Drivers/Misc/RingBuffer.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/LUFA/Drivers/Misc/RingBuffer.h b/LUFA/Drivers/Misc/RingBuffer.h
index 5c8c8403b..504029165 100644
--- a/LUFA/Drivers/Misc/RingBuffer.h
+++ b/LUFA/Drivers/Misc/RingBuffer.h
@@ -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;
}