diff --git a/src/board/arduino/mega2560/parallel.c b/src/board/arduino/mega2560/parallel.c index 136fde6..5c79cd6 100644 --- a/src/board/arduino/mega2560/parallel.c +++ b/src/board/arduino/mega2560/parallel.c @@ -10,6 +10,8 @@ #include // Mapping of 24-pin ribbon cable to parallel pins. See schematic +#define IT8587 +#if defined(IT8587) #define PINS \ /* Data (KSO0 - KSO7) - bi-directional */ \ PIN(d0, 1) \ @@ -41,6 +43,42 @@ /* Strap1 (KSI5) */ \ /* 1K-Ohm pull-down resistor */ \ PIN(strap_1, 12) +#elif defined(IT5570) +#define PINS \ + /* Data (KSO0 - KSO7) - bi-directional */ \ + PIN(d0, 24) \ + PIN(d1, 23) \ + PIN(d2, 22) \ + PIN(d3, 18) \ + PIN(d4, 16) \ + PIN(d5, 15) \ + PIN(d6, 12) \ + PIN(d7, 9) \ + /* Wait# (KSO9) - input */ \ + /* low to indicate cycle may begin, high to indicate cycle may end */ \ + PIN(wait_n, 7) \ + /* Write# (KSI0) - output */ \ + /* low to indicate write cycle, high to indicate read cycle */ \ + PIN(write_n, 21) \ + /* DataStrobe# (KSI1) - output */ \ + /* low indicates a data cycle */ \ + PIN(data_n, 20) \ + /* Reset# (KSI2) - output */ \ + /* low requests device reset */ \ + PIN(reset_n, 19) \ + /* AddressStrobe# (KSI3) - output */ \ + /* low indicates an address cycle */ \ + PIN(addr_n, 17) \ + /* Strap0 (KSI4) */ \ + /* 1K-Ohm pull-down resistor */ \ + PIN(strap_0, 14) \ + /* Strap1 (KSI5) */ \ + /* 1K-Ohm pull-down resistor */ \ + PIN(strap_1, 13) +#else + #error "Unknown pin configuration: EC not specified" +#endif + #define DATA_BITS \ DATA_BIT(0) \