The comment above the function is correct, but the code set
the GPIO with wrong (reversed) polarity.
Change-Id: Ifd09688150d3d2018af73521e0da3926bb1b7f84
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4847
Tested-by: jenkins
Reviewed-by: Grzegorz Kostka <kostka.grzegorz@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
static int imx_gpio_reset(int trst, int srst)
{
if (trst_gpio != -1)
- trst ? gpio_set(trst_gpio) : gpio_clear(trst_gpio);
+ trst ? gpio_clear(trst_gpio) : gpio_set(trst_gpio);
if (srst_gpio != -1)
- srst ? gpio_set(srst_gpio) : gpio_clear(srst_gpio);
+ srst ? gpio_clear(srst_gpio) : gpio_set(srst_gpio);
return ERROR_OK;
}