URL
https://opencores.org/ocsvn/adv_debug_sys/adv_debug_sys/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 8 |
Rev 21 |
Line 104... |
Line 104... |
|
|
int cable_xpc3_inout(uint8_t value, uint8_t *inval)
|
int cable_xpc3_inout(uint8_t value, uint8_t *inval)
|
{
|
{
|
uint8_t in;
|
uint8_t in;
|
int retval;
|
int retval;
|
|
uint8_t out = 0;
|
|
|
retval = cable_parallel_inout(value, &in);
|
/* First convert the bits in value byte to the ones that the cable wants */
|
|
if(value & TCLK_BIT)
|
|
out |= 0x02; /* D1 pin 3 */
|
|
if(value & TRST_BIT)
|
|
out |= 0x10; /* Not used */
|
|
if(value & TDI_BIT)
|
|
out |= 0x01; /* D0 pin 2 */
|
|
if(value & TMS_BIT)
|
|
out |= 0x04; /* D2 pin 4 */
|
|
|
|
retval = cable_parallel_inout(out, &in);
|
|
|
if(in & 0x10) /* S6 pin 13 */
|
if(in & 0x10) /* S6 pin 13 */
|
*inval = 1;
|
*inval = 1;
|
else
|
else
|
*inval = 0;
|
*inval = 0;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.