#NEWLINE# def setSWJPins( self , output , pin , wait = 0 ) : #NEWLINE# #INDENT# cmd = [ ] #NEWLINE# cmd . append ( COMMAND_ID [ 'DAP_SWJ_PINS' ] ) #NEWLINE# try : #NEWLINE# #INDENT# p = PINS [ pin ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# logging . error ( 'cannot find %s pin' , pin ) #NEWLINE# return #NEWLINE# #UNINDENT# cmd . append ( ( output & 255 ) ) #NEWLINE# cmd . append ( p ) #NEWLINE# cmd . append ( ( wait & 255 ) ) #NEWLINE# cmd . append ( ( ( wait >> 8 ) & 255 ) ) #NEWLINE# cmd . append ( ( ( wait >> 16 ) & 255 ) ) #NEWLINE# cmd . append ( ( ( wait >> 24 ) & 255 ) ) #NEWLINE# self . interface . write ( cmd ) #NEWLINE# resp = self . interface . read ( ) #NEWLINE# if ( resp [ 0 ] != COMMAND_ID [ 'DAP_SWJ_PINS' ] ) : #NEWLINE# #INDENT# raise DAPAccessIntf . DeviceError ( ) #NEWLINE# #UNINDENT# return resp [ 1 ]