#NEWLINE# def swdConfigure( self , conf = 0 ) : #NEWLINE# #INDENT# cmd = [ ] #NEWLINE# cmd . append ( COMMAND_ID [ 'DAP_SWD_CONFIGURE' ] ) #NEWLINE# cmd . append ( conf ) #NEWLINE# self . interface . write ( cmd ) #NEWLINE# resp = self . interface . read ( ) #NEWLINE# if ( cmd [ 0 ] != COMMAND_ID [ 'DAP_SWD_CONFIGURE' ] ) : #NEWLINE# #INDENT# raise DAPAccessIntf . DeviceError ( ) #NEWLINE# #UNINDENT# if ( resp [ 1 ] != DAP_OK ) : #NEWLINE# #INDENT# raise DAPAccessIntf . CommandError ( ) #NEWLINE# #UNINDENT# return resp [ 1 ]