Adds the usb code that we got in ECE 385. It will not work now, and parts that involve the timer are disabled. It does compile though, with a few warnings. The goal will be to add USB MSD support, which is not actually given to us so I will have to do myself or find some other code to base it off of.
10 lines
263 B
C
10 lines
263 B
C
/* Generic macros */
|
|
|
|
/* Word <> two chars. Works both ways */
|
|
#define LOBYTE(x) ((char*)(&(x)))[0]
|
|
#define HIBYTE(x) ((char*)(&(x)))[1]
|
|
|
|
/* Bit set/clear */
|
|
#define bitset(var, bitno) ((var) |= 1 << (bitno))
|
|
#define bitclr(var, bitno) ((var) &= ~(1 << (bitno)))
|