|
CSE Home | About Us | Search | Contact Info |
runme()
wait_for_n_cycles(int)
- delay loop for the number of cycles (don't use for small ints)
volatile
chars or ints depending on the situation. We have included a header file (board.h) that defines some of the important addresses. The following are some of the basic pointers and methods of access that you will want to use for I/O purposes:
Serial Data Check: | volatile char * SERIALDATAPRESENT = (volatile char*)0x80000000 | |
Serial Command Code: | volatile char * SERIALDATACOMMCODE = (volatile char*)0x80000001 | |
Serial Data: | volatile int * SERIALDATA = (volatile int*)0x80000004 | |
Serial NextData: | volatile char * SERIALNEXT = (volatile char*) 0x80000003 | |
Serial Room to Send: | volatile char * SERIALTXFREE = (volatile char*) 0x80000002 | |
Serial Send: | volatile int * SERIALTX = (volatile int*) 0x80000008 |
volatile char* LED = (volatile char*) LED_IO_PORT
volatile int* BUTTONS = (volatile int*) BUTTON_IO_PORT
Check UP: | int UP_Pressed = ((*(BUTTONS) & PB_UP) == PB_UP); | |
Check DOWN: | int DOWN_Pressed = ((*(BUTTONS) & PB_DOWN) == PB_DOWN); | |
Check LEFT: | int LEFT_Pressed = ((*(BUTTONS) & PB_LEFT) == PB_LEFT); | |
Check RIGHT: | int RIGHT_Pressed = ((*(BUTTONS) & PB_RIGHT) == PB_RIGHT); | |
Check ENTER: | int ENTER_Pressed = ((*(BUTTONS) & PB_ENTER) == PB_ENTER); |
volatile BYTE * VGA = (volatile BYTE *) VGA_TEXT_PLANE
volatile BYTE * VGA_Color = (volatile BYTE *) VGA_COLOR_PLANE
Computer Science & Engineering University of Washington Box 352350 Seattle, WA 98195-2350 (206) 543-1695 voice, (206) 543-2969 FAX [comments to Shen] |