FreeCalypso > hg > freecalypso-hwlab
comparison lcdtest/busops.c @ 27:4b7cac119fb5
lcdtest: added our own local exitcodes.h header
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 27 May 2018 21:49:46 +0000 |
parents | 5a602e512b12 |
children |
comparison
equal
deleted
inserted
replaced
26:225556110fa6 | 27:4b7cac119fb5 |
---|---|
1 #include <sys/types.h> | 1 #include <sys/types.h> |
2 #include <stdio.h> | 2 #include <stdio.h> |
3 #include <stdlib.h> | 3 #include <stdlib.h> |
4 #include <unistd.h> | 4 #include <unistd.h> |
5 #include <ftdi.h> | 5 #include <ftdi.h> |
6 #include "exitcodes.h" | |
6 | 7 |
7 extern struct ftdi_context ftdi; | 8 extern struct ftdi_context ftdi; |
8 | 9 |
9 do_ftdi_write(cmd, cmdlen) | 10 do_ftdi_write(cmd, cmdlen) |
10 u_char *cmd; | 11 u_char *cmd; |
11 { | 12 { |
12 if (ftdi_write_data(&ftdi, cmd, cmdlen) != cmdlen) { | 13 if (ftdi_write_data(&ftdi, cmd, cmdlen) != cmdlen) { |
13 fprintf(stderr, "FTDI write error: %s\n", ftdi.error_str); | 14 fprintf(stderr, "FTDI write error: %s\n", ftdi.error_str); |
14 exit(1); | 15 exit(ERROR_FTDI); |
15 } | 16 } |
16 } | 17 } |
17 | 18 |
18 set_gpio_pins(rs, reset) | 19 set_gpio_pins(rs, reset) |
19 { | 20 { |