That comment better belongs in <tabby/avr.h> now
This commit is contained in:
parent
a2cb39f782
commit
3e2a43529a
2 changed files with 15 additions and 12 deletions
14
avr/send.c
14
avr/send.c
|
@ -12,20 +12,10 @@ static tabby_printer_response response;
|
||||||
|
|
||||||
static uint8_t body[TABBY_PRINTER_PACKET_MAX_SIZE];
|
static uint8_t body[TABBY_PRINTER_PACKET_MAX_SIZE];
|
||||||
|
|
||||||
|
static uint8_t sheet[TABBY_PRINTER_SHEET_SIZE];
|
||||||
|
|
||||||
static uint16_t sum;
|
static uint16_t sum;
|
||||||
|
|
||||||
/*
|
|
||||||
* So like, we're abusing pins here. So badly, it's beyond. So here's
|
|
||||||
* what's going down: We want to retain the same physical I/O connections
|
|
||||||
* between both the sending and receiving flavors of the whole Game Boy
|
|
||||||
* Printer endeavor, and that mean/s that we must absolutely bit bang MOSI
|
|
||||||
* and MISO opposite from their ordinary roles. The reason being: There is
|
|
||||||
* no notion of MISO or MOSI from the Game Boy's (nor its peripherals')
|
|
||||||
* point of view. The SI and SO pins over a link cable are crossed over, so
|
|
||||||
* SI on one end always connects to SO on the other, and vice-versa. The SI
|
|
||||||
* and SO pins do not switch roles based on role, unlike on AVR SPI
|
|
||||||
* implementations.
|
|
||||||
*/
|
|
||||||
static void spi_init() {
|
static void spi_init() {
|
||||||
SC_OUTPUT();
|
SC_OUTPUT();
|
||||||
SO_OUTPUT();
|
SO_OUTPUT();
|
||||||
|
|
|
@ -1,6 +1,19 @@
|
||||||
#ifndef _TABBY_AVR_H
|
#ifndef _TABBY_AVR_H
|
||||||
#define _TABBY_AVR_H
|
#define _TABBY_AVR_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* So like, we're abusing pins here. So badly, it's beyond. So here's
|
||||||
|
* what's going down: We want to retain the same physical I/O connections
|
||||||
|
* between both the sending and receiving flavors of the whole Game Boy
|
||||||
|
* Printer endeavor, and that mean/s that we must absolutely bit bang MOSI
|
||||||
|
* and MISO opposite from their ordinary roles. The reason being: There is
|
||||||
|
* no notion of MISO or MOSI from the Game Boy's (nor its peripherals')
|
||||||
|
* point of view. The SI and SO pins over a link cable are crossed over, so
|
||||||
|
* SI on one end always connects to SO on the other, and vice-versa. The SI
|
||||||
|
* and SO pins do not switch roles based on role, unlike on AVR SPI
|
||||||
|
* implementations.
|
||||||
|
*/
|
||||||
|
|
||||||
#define SPI_PULSE_USEC 61
|
#define SPI_PULSE_USEC 61
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue