|
|
@ -118,7 +118,7 @@ RTMODEL "__rt_version", "3"
|
|
|
|
# define polyH r21
|
|
|
|
# define polyH r21
|
|
|
|
# define scratch r23
|
|
|
|
# define scratch r23
|
|
|
|
|
|
|
|
|
|
|
|
#else /* __IAR_SYSTEMS_ASM__ */
|
|
|
|
#else /* __IAR_SYSTEMS_ASM__ */
|
|
|
|
/* Register assignments for usbCrc16 on gcc */
|
|
|
|
/* Register assignments for usbCrc16 on gcc */
|
|
|
|
/* Calling conventions on gcc:
|
|
|
|
/* Calling conventions on gcc:
|
|
|
|
* First parameter passed in r24/r25, second in r22/23 and so on.
|
|
|
|
* First parameter passed in r24/r25, second in r22/23 and so on.
|
|
|
@ -151,7 +151,7 @@ RTMODEL "__rt_version", "3"
|
|
|
|
; unsigned table(unsigned char x)
|
|
|
|
; unsigned table(unsigned char x)
|
|
|
|
; {
|
|
|
|
; {
|
|
|
|
; unsigned value;
|
|
|
|
; unsigned value;
|
|
|
|
;
|
|
|
|
;
|
|
|
|
; value = (unsigned)x << 6;
|
|
|
|
; value = (unsigned)x << 6;
|
|
|
|
; value ^= (unsigned)x << 7;
|
|
|
|
; value ^= (unsigned)x << 7;
|
|
|
|
; if(parity(x))
|
|
|
|
; if(parity(x))
|
|
|
@ -161,7 +161,7 @@ RTMODEL "__rt_version", "3"
|
|
|
|
; unsigned usbCrc16(unsigned char *argPtr, unsigned char argLen)
|
|
|
|
; unsigned usbCrc16(unsigned char *argPtr, unsigned char argLen)
|
|
|
|
; {
|
|
|
|
; {
|
|
|
|
; unsigned crc = 0xffff;
|
|
|
|
; unsigned crc = 0xffff;
|
|
|
|
;
|
|
|
|
;
|
|
|
|
; while(argLen--)
|
|
|
|
; while(argLen--)
|
|
|
|
; crc = table(lo8(crc) ^ *argPtr++) ^ hi8(crc);
|
|
|
|
; crc = table(lo8(crc) ^ *argPtr++) ^ hi8(crc);
|
|
|
|
; return ~crc;
|
|
|
|
; return ~crc;
|
|
|
@ -299,7 +299,7 @@ usbCrc16Append:
|
|
|
|
# define cnt16H r31
|
|
|
|
# define cnt16H r31
|
|
|
|
# define cntH r18
|
|
|
|
# define cntH r18
|
|
|
|
|
|
|
|
|
|
|
|
#else /* __IAR_SYSTEMS_ASM__ */
|
|
|
|
#else /* __IAR_SYSTEMS_ASM__ */
|
|
|
|
/* Register assignments for usbMeasureFrameLength on gcc */
|
|
|
|
/* Register assignments for usbMeasureFrameLength on gcc */
|
|
|
|
/* Calling conventions on gcc:
|
|
|
|
/* Calling conventions on gcc:
|
|
|
|
* First parameter passed in r24/r25, second in r22/23 and so on.
|
|
|
|
* First parameter passed in r24/r25, second in r22/23 and so on.
|
|
|
|