Add flipped connector for parallel arduino

This commit is contained in:
Jeremy Soller 2020-01-16 14:38:53 -07:00
parent fca09adf56
commit 97eb217650
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1

View File

@ -52,6 +52,8 @@
DATA_BIT(6) \ DATA_BIT(6) \
DATA_BIT(7) DATA_BIT(7)
#define FLIP
#if !defined(FLIP)
// Mapping of 24-pin ribbon cable to GPIOs // Mapping of 24-pin ribbon cable to GPIOs
static struct Gpio GPIOS[24] = { static struct Gpio GPIOS[24] = {
GPIO(L, 4), GPIO(L, 5), GPIO(L, 4), GPIO(L, 5),
@ -67,6 +69,24 @@ static struct Gpio GPIOS[24] = {
GPIO(A, 3), GPIO(A, 2), GPIO(A, 3), GPIO(A, 2),
GPIO(A, 1), GPIO(A, 0), GPIO(A, 1), GPIO(A, 0),
}; };
#else // !defined(FLIP)
// Mapping of 24-pin ribbon cable to GPIOs, flipped
static struct Gpio GPIOS[24] = {
GPIO(L, 5), GPIO(L, 4),
GPIO(L, 7), GPIO(L, 6),
GPIO(G, 1), GPIO(G, 0),
GPIO(D, 7), GPIO(G, 2),
GPIO(C, 1), GPIO(C, 0),
GPIO(C, 3), GPIO(C, 2),
GPIO(C, 5), GPIO(C, 4),
GPIO(C, 7), GPIO(C, 6),
GPIO(A, 6), GPIO(A, 7),
GPIO(A, 4), GPIO(A, 5),
GPIO(A, 2), GPIO(A, 3),
GPIO(A, 0), GPIO(A, 1),
};
#endif // !defined(FLIP)
// Parallel struct definition // Parallel struct definition
// See http://efplus.com/techref/io/parallel/1284/eppmode.htm // See http://efplus.com/techref/io/parallel/1284/eppmode.htm