From 98d8bee04f2d51fa0e9d5804f0525e89618bce96 Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Tue, 2 Jun 2020 10:31:46 +0200 Subject: iceprog: Use open-drain output to drive SS and Reset line Signed-off-by: Sylvain Munaut --- iceprog/iceprog.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/iceprog/iceprog.c b/iceprog/iceprog.c index 34245e3..c671ac1 100644 --- a/iceprog/iceprog.c +++ b/iceprog/iceprog.c @@ -96,16 +96,16 @@ enum flash_cmd { static void set_cs_creset(int cs_b, int creset_b) { uint8_t gpio = 0; - uint8_t direction = 0x93; + uint8_t direction = 0x03; - if (cs_b) { + if (!cs_b) { // ADBUS4 (GPIOL0) - gpio |= 0x10; + direction |= 0x10; } - if (creset_b) { + if (!creset_b) { // ADBUS7 (GPIOL3) - gpio |= 0x80; + direction |= 0x80; } mpsse_set_gpio(gpio, direction); -- cgit v1.2.3