static int wiggler_get_tdo (urj_cable_t *cable) { int status; urj_tap_parport_set_data (cable->link.port, PRM_TRST_LVL (cable) | PRM_TCK_INACT (cable) | PRM_UNUSED_BITS (cable)); urj_tap_cable_wait (cable); status = urj_tap_parport_get_status (cable->link.port); if (status == -1) return -1; return (status & (PRM_TDO_ACT (cable) | PRM_TDO_INACT (cable))) ^ PRM_TDO_ACT (cable) ? 0 : 1; }
static int triton_get_tdo (urj_cable_t *cable) { int trst = (PARAM_SIGNALS (cable) & URJ_POD_CS_TRST) ? 1 : 0; int sreset = (PARAM_SIGNALS (cable) & URJ_POD_CS_RESET) ? 1 : 0; int status; urj_tap_parport_set_data (cable->link.port, (trst << TRST) | (sreset << SRESET) | (0 << TCK)); PARAM_SIGNALS (cable) &= ~(URJ_POD_CS_TDI | URJ_POD_CS_TCK | URJ_POD_CS_TMS); urj_tap_cable_wait (cable); status = urj_tap_parport_get_status (cable->link.port); if (status == -1) return status; return (status >> TDO) & 1; }