mirror of https://github.com/YosysHQ/icestorm.git
iceprog: Use open-drain output to drive SS and Reset line
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
parent
c5a8beffec
commit
98d8bee04f
|
|
@ -96,16 +96,16 @@ enum flash_cmd {
|
||||||
static void set_cs_creset(int cs_b, int creset_b)
|
static void set_cs_creset(int cs_b, int creset_b)
|
||||||
{
|
{
|
||||||
uint8_t gpio = 0;
|
uint8_t gpio = 0;
|
||||||
uint8_t direction = 0x93;
|
uint8_t direction = 0x03;
|
||||||
|
|
||||||
if (cs_b) {
|
if (!cs_b) {
|
||||||
// ADBUS4 (GPIOL0)
|
// ADBUS4 (GPIOL0)
|
||||||
gpio |= 0x10;
|
direction |= 0x10;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (creset_b) {
|
if (!creset_b) {
|
||||||
// ADBUS7 (GPIOL3)
|
// ADBUS7 (GPIOL3)
|
||||||
gpio |= 0x80;
|
direction |= 0x80;
|
||||||
}
|
}
|
||||||
|
|
||||||
mpsse_set_gpio(gpio, direction);
|
mpsse_set_gpio(gpio, direction);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue