URL
https://opencores.org/ocsvn/tv80/tv80/trunk
[/] [tv80/] [trunk/] [tests/] [basic_uart.c] - Diff between revs 70 and 77
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 70 |
Rev 77 |
Line 60... |
Line 60... |
} while ((status & 0x01) == 0);
|
} while ((status & 0x01) == 0);
|
|
|
// fail if status byte indicates anything other
|
// fail if status byte indicates anything other
|
// than data ready and transmitter empty
|
// than data ready and transmitter empty
|
if (status != 0x61) {
|
if (status != 0x61) {
|
print ("Incorrect status byte");
|
print ("Incorrect status byte\n");
|
sim_ctl_port = 0x02;
|
sim_ctl_port = 0x02;
|
}
|
}
|
|
|
// read the sent byte and fail if it's not what we sent
|
// read the sent byte and fail if it's not what we sent
|
data = uart_dm0;
|
data = uart_dm0;
|
if (data != pattern) {
|
if (data != pattern) {
|
print ("Data miscompare");
|
print ("Data miscompare\n");
|
sim_ctl_port = 0x02;
|
sim_ctl_port = 0x02;
|
}
|
}
|
}
|
}
|
|
|
int main ()
|
int main ()
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.