     SWDWriteBit(false);
   }
 }
+
+
 
 uint32_t SWDTransaction(bool APnDP, bool RnW, uint8_t A23, uint32_t data)
 {


    // turn around time
    SWDReadBit();         // trn
    
    for(uint8_t i=0; i<32; i++)
    { 
      if (data >= 0x80000000)
        SWDWriteBit(true);
      else
        SWDWriteBit(false);
      data <<= 1;
    }

    // TODO: generate correct parity
    SWDWriteBit(false);

    SWDIdle();    
  }
  else
  {

  {
    SWDWriteBit(true);
  }

  /*
  SWDWord(0x6DB7);
    
  for(uint32_t i=0; i<64; i++)
  {
    SWDWriteBit(true);
  }*/
  
  SWDIdle();
  
