URL
https://opencores.org/ocsvn/eco32/eco32/trunk
Subversion Repositories eco32
Compare Revisions
- This comparison shows the changes necessary to convert path
/eco32
- from Rev 131 to Rev 132
- ↔ Reverse comparison
Rev 131 → Rev 132
/trunk/hwtests/serial/fpga2pc/receive.c
12,8 → 12,6
#include <termios.h> |
|
|
#define SERIAL_PORT "/dev/ttyS0" |
|
#define NUM_TRIES 10 |
|
#define SYN 0x16 |
49,10 → 47,10
} |
|
|
void serialOpen(void) { |
sfd = open(SERIAL_PORT, O_RDWR | O_NOCTTY | O_NDELAY); |
void serialOpen(char *serialPort) { |
sfd = open(serialPort, O_RDWR | O_NOCTTY | O_NDELAY); |
if (sfd == -1) { |
error("cannot open serial port '%s'", SERIAL_PORT); |
error("cannot open serial port '%s'", serialPort); |
} |
tcgetattr(sfd, &origOptions); |
currOptions = origOptions; |
96,14 → 94,16
|
|
int main(int argc, char *argv[]) { |
char *serialPort; |
unsigned char prev, curr; |
int count, errors; |
|
if (argc != 1) { |
printf("Usage: %s\n", argv[0]); |
if (argc != 2) { |
printf("Usage: %s <serial port>\n", argv[0]); |
exit(1); |
} |
serialOpen(); |
serialPort = argv[1]; |
serialOpen(serialPort); |
count = 0; |
errors = 0; |
while (!serialRcv(&prev)) ; |
/trunk/hwtests/serial/fpga2pc/send1.s
8,7 → 8,7
; $11 counter |
; $31 return address |
|
.set tba,0xF0300010 |
.set tba,0xF0301000 |
|
add $8,$0,tba |
add $11,$0,0 |
/trunk/hwtests/serial/pc2fpga/receive1.s
10,7 → 10,7
; $13 error |
; $31 return address |
|
.set tba,0xF0300010 |
.set tba,0xF0301000 |
|
add $8,$0,tba |
add $12,$0,100000 |
/trunk/hwtests/serial/pc2fpga/send.c
12,8 → 12,6
#include <termios.h> |
|
|
#define SERIAL_PORT "/dev/ttyS0" |
|
#define NUM_TRIES 10 |
|
#define SYN 0x16 |
49,10 → 47,10
} |
|
|
void serialOpen(void) { |
sfd = open(SERIAL_PORT, O_RDWR | O_NOCTTY | O_NDELAY); |
void serialOpen(char *serialPort) { |
sfd = open(serialPort, O_RDWR | O_NOCTTY | O_NDELAY); |
if (sfd == -1) { |
error("cannot open serial port '%s'", SERIAL_PORT); |
error("cannot open serial port '%s'", serialPort); |
} |
tcgetattr(sfd, &origOptions); |
currOptions = origOptions; |
96,14 → 94,16
|
|
int main(int argc, char *argv[]) { |
char *serialPort; |
unsigned char curr; |
int count; |
|
if (argc != 1) { |
printf("Usage: %s\n", argv[0]); |
if (argc != 2) { |
printf("Usage: %s <serial port>\n", argv[0]); |
exit(1); |
} |
serialOpen(); |
serialPort = argv[1]; |
serialOpen(serialPort); |
curr = 0; |
count = 0; |
while (count < 100000) { |
/trunk/hwtests/serial/sertest/echo1.s
2,7 → 2,7
; echo.s -- test the serial interface |
; |
|
.set sba,0xF0300010 ; serial base address |
.set sba,0xF0301000 ; serial base address |
|
add $8,$0,sba ; set serial base address |
L1: |
/trunk/hwtests/serial/sertest/sertest.c
12,8 → 12,6
#include <termios.h> |
|
|
#define SERIAL_PORT "/dev/ttyS0" |
|
#define NUM_TRIES 10 |
|
#define SYN 0x16 |
50,10 → 48,10
} |
|
|
void serialOpen(void) { |
sfd = open(SERIAL_PORT, O_RDWR | O_NOCTTY | O_NDELAY); |
void serialOpen(char *serialPort) { |
sfd = open(serialPort, O_RDWR | O_NOCTTY | O_NDELAY); |
if (sfd == -1) { |
error("cannot open serial port '%s'", SERIAL_PORT); |
error("cannot open serial port '%s'", serialPort); |
} |
tcgetattr(sfd, &origOptions); |
currOptions = origOptions; |
127,13 → 125,15
|
|
int main(int argc, char *argv[]) { |
char *serialPort; |
int i; |
|
if (argc != 1) { |
printf("Usage: %s\n", argv[0]); |
if (argc != 2) { |
printf("Usage: %s <serial port>\n", argv[0]); |
exit(1); |
} |
serialOpen(); |
serialPort = argv[1]; |
serialOpen(serialPort); |
errors = 0; |
for (i = 1; i <= 100; i++) { |
block(); |