Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void task8(void* pdata){
- volatile int * PS2_ptr = (int *)PS2_0_BASE;
- int PS2_data, RVALID;
- char byte = 0;
- *(PS2_ptr) = 0xFF;
- while(1){
- PS2_data = *(PS2_ptr); // read the Data register in the PS/2 port
- RVALID = PS2_data & 0x8000; // extract the RVALID field
- if (RVALID) {
- /* shift the next data byte into the display */
- byte = PS2_data & 0xFF;
- *znak=byte;
- printf("%d\n",byte);
- /*if ((byte2 == (char)0xAA) && (byte3 == (char)0x00))
- // mouse inserted; initialize sending of data
- *(PS2_ptr) = 0xF4;*/
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement