static void swdptap_turnaround(uint8_t dir) { static uint8_t olddir = 0; DEBUG("%s", dir ? "\n-> ":"\n<- "); /* Don't turnaround if direction not changing */ if(dir == olddir) return; olddir = dir; if(dir) SWDIO_MODE_FLOAT(); swdptap_clock(); if(!dir) SWDIO_MODE_DRIVE(); }
static void swdptap_turnaround(uint8_t dir) { static uint8_t olddir = 0; /* Don't turnaround if direction not changing */ if(dir == olddir) return; olddir = dir; #ifdef DEBUG_SWD_BITS DEBUG("%s", dir ? "\n-> ":"\n<- "); #endif if(dir) SWDIO_MODE_FLOAT(); gpio_set(SWCLK_PORT, SWCLK_PIN); gpio_clear(SWCLK_PORT, SWCLK_PIN); if(!dir) SWDIO_MODE_DRIVE(); }