-Changed's unsigned long's to u32. Should be more 64-bit compatible

This commit is contained in:
cyberwarriorx 2006-06-04 22:32:56 +00:00
parent 74257346de
commit ac6ea9b9a4
2 changed files with 9 additions and 9 deletions

View File

@ -23,7 +23,7 @@
void FIFOInit(FIFO * fifo)
{
unsigned long i;
u32 i;
fifo->begin = 0;
fifo->end = 0;
@ -34,7 +34,7 @@ void FIFOInit(FIFO * fifo)
fifo->error = FALSE;
}
void FIFOAdd(FIFO * fifo, unsigned long v)
void FIFOAdd(FIFO * fifo, u32 v)
{
if(fifo->full)
{
@ -47,14 +47,14 @@ void FIFOAdd(FIFO * fifo, unsigned long v)
fifo->empty = FALSE;
}
unsigned long FIFOValue(FIFO * fifo)
u32 FIFOValue(FIFO * fifo)
{
if(fifo->empty)
{
fifo->error = TRUE;
return 0;
}
unsigned long v = fifo->data[fifo->begin];
u32 v = fifo->data[fifo->begin];
fifo->begin = (fifo->begin + 1)& 0x1FFF;
fifo->empty = (fifo->begin == fifo->end);
return v;

View File

@ -30,17 +30,17 @@ extern "C" {
typedef struct
{
unsigned long data[0x2000];
unsigned long begin;
unsigned long end;
u32 data[0x2000];
u32 begin;
u32 end;
BOOL full;
BOOL empty;
BOOL error;
} FIFO;
void FIFOInit(FIFO * fifo);
void FIFOAdd(FIFO * fifo, unsigned long v);
unsigned long FIFOValue(FIFO * fifo);
void FIFOAdd(FIFO * fifo, u32 v);
u32 FIFOValue(FIFO * fifo);
#ifdef __cplusplus
}