OpenCores
URL https://opencores.org/ocsvn/adv_debug_sys/adv_debug_sys/trunk

Subversion Repositories adv_debug_sys

[/] [adv_debug_sys/] [trunk/] [Software/] [adv_jtag_bridge/] [cable_parallel.c] - Diff between revs 21 and 22

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 21 Rev 22
Line 148... Line 148...
 
 
uint8_t cable_xess_inout(uint8_t value, uint8_t *inval)
uint8_t cable_xess_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 |= 0x04; /* D2 pin 4 */
 
  if(value & TRST_BIT)
 
    out |= 0x08; /* D3 pin 5 */
 
  if(value & TDI_BIT)
 
    out |= 0x10; /* D4 pin 6 */
 
  if(value & TMS_BIT)
 
    out |= 0x20; /* D3 pin 5 */
 
 
 
  retval = cable_parallel_inout(out, &in);
 
 
  if(in & 0x20) /* S5 pin 12*/
  if(in & 0x20) /* S5 pin 12*/
    *inval = 1;
    *inval = 1;
  else
  else
    *inval = 0;
    *inval = 0;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.