HAHAHA I DON'T FUCKING NEED YOU ANY LONGER
This commit is contained in:
parent
d5aea747d0
commit
06503a3510
4 changed files with 1 additions and 30 deletions
10
avr/send.c
10
avr/send.c
|
@ -35,16 +35,6 @@ int main() {
|
||||||
|
|
||||||
sei();
|
sei();
|
||||||
|
|
||||||
while (1) {
|
|
||||||
uart_putchar('O', NULL);
|
|
||||||
|
|
||||||
c = uart_getchar(NULL);
|
|
||||||
|
|
||||||
if (c == 'K') {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
c = uart_getchar(NULL);
|
c = uart_getchar(NULL);
|
||||||
|
|
||||||
|
|
|
@ -81,8 +81,6 @@ typedef struct _tabby_printer_response {
|
||||||
uint8_t status;
|
uint8_t status;
|
||||||
} tabby_printer_response;
|
} tabby_printer_response;
|
||||||
|
|
||||||
int tabby_printer_link_init(int fd);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For receiving printer data packets from a Game Boy Camera
|
* For receiving printer data packets from a Game Boy Camera
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -25,7 +25,7 @@ int tabby_link_open(const char *dev) {
|
||||||
attr.c_cc[VTIME] = 0;
|
attr.c_cc[VTIME] = 0;
|
||||||
attr.c_cc[VMIN] = 1;
|
attr.c_cc[VMIN] = 1;
|
||||||
|
|
||||||
if (tcsetattr(fd, TCSANOW, &attr) < 0) {
|
if (tcsetattr(fd, TCSAFLUSH, &attr) < 0) {
|
||||||
goto error_io;
|
goto error_io;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,23 +9,6 @@
|
||||||
|
|
||||||
#define PACKET_RECV_ERROR_THRESHOLD 30
|
#define PACKET_RECV_ERROR_THRESHOLD 30
|
||||||
|
|
||||||
int tabby_printer_link_init(int fd) {
|
|
||||||
uint8_t out = 'K',
|
|
||||||
in;
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
read(fd, &in, 1);
|
|
||||||
|
|
||||||
if (in == 'O') {
|
|
||||||
write(fd, &out, 1);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static uint16_t checksum(tabby_printer_packet *header, void *body) {
|
static uint16_t checksum(tabby_printer_packet *header, void *body) {
|
||||||
uint16_t checksum = header->data[2]
|
uint16_t checksum = header->data[2]
|
||||||
+ header->data[3]
|
+ header->data[3]
|
||||||
|
|
Loading…
Add table
Reference in a new issue