URL
https://opencores.org/ocsvn/usb_fpga_1_11/usb_fpga_1_11/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 2 |
Rev 3 |
Line 35... |
Line 35... |
#define[NOP;][_asm
|
#define[NOP;][_asm
|
nop
|
nop
|
_endasm;
|
_endasm;
|
]
|
]
|
|
|
#define[MSB(][)][((BYTE)(((unsigned short)($0)) >> 8))]
|
#define[MSB(][)][((BYTE)((((unsigned short)($0)) >> 8) & 0xff)) ]
|
#define[LSB(][)][((BYTE)($0))]
|
#define[LSB(][)][((BYTE)($0))]
|
#define[HI(][)][((BYTE)(((unsigned short)($0)) >> 8))]
|
#define[HI(][)][((BYTE)((((unsigned short)($0)) >> 8) & 0xff)) ]
|
#define[LO(][)][((BYTE)($0))]
|
#define[LO(][)][((BYTE)($0))]
|
|
|
typedef unsigned char BYTE;
|
typedef unsigned char BYTE;
|
typedef unsigned short WORD;
|
typedef unsigned short WORD;
|
typedef unsigned long DWORD;
|
typedef unsigned long DWORD;
|
Line 115... |
Line 115... |
This will work too:
|
This will work too:
|
MEM_COPY1(fpga_checksum,EP0BUF+1,6);
|
MEM_COPY1(fpga_checksum,EP0BUF+1,6);
|
*/
|
*/
|
|
|
#define[MEM_COPY1(][,$1,$2);][{
|
#define[MEM_COPY1(][,$1,$2);][{
|
|
AUTOPTRL1=LO(&($0));
|
|
AUTOPTRH1=HI(&($0));
|
|
AUTOPTRL2=LO(&($1));
|
|
AUTOPTRH2=HI(&($1));
|
_asm
|
_asm
|
push ar2
|
push ar2
|
mov _AUTOPTRL1,#(_$0)
|
|
mov _AUTOPTRH1,#((_$0) >> 8)
|
|
mov _AUTOPTRL2,#(_$1)
|
|
mov _AUTOPTRH2,#((_$1) >> 8)
|
|
mov r2,#($2);
|
mov r2,#($2);
|
lcall _MEM_COPY1_int
|
lcall _MEM_COPY1_int
|
pop ar2
|
pop ar2
|
_endasm;
|
_endasm;
|
}]
|
}]
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.