| Index: embios/trunk/tools/libembios.py | 
| — | — | @@ -117,7 +117,14 @@ | 
| 118 | 118 |      
 | 
| 119 | 119 |      def getversioninfo(self):
 | 
| 120 | 120 |          """ This returns the emBIOS version and device information. """
 | 
| 121 |   | -        return self.lib.monitorcommand(struct.pack("IIII", 1, 0, 0, 0), "IBBBBI", ("revision", "majorv", "minorv", "patchv", "swtypeid", "hwtypeid"))
 | 
|   | 121 | +        resp = self.lib.monitorcommand(struct.pack("IIII", 1, 0, 0, 0), "IBBBBI", ("revision", "majorv", "minorv", "patchv", "swtypeid", "hwtypeid"))
 | 
|   | 122 | +        self.lib.dev.version.revision = resp.revision
 | 
|   | 123 | +        self.lib.dev.version.majorv = resp.majorv
 | 
|   | 124 | +        self.lib.dev.version.minorv = resp.minorv
 | 
|   | 125 | +        self.lib.dev.version.patchv = resp.patchv
 | 
|   | 126 | +        self.lib.dev.swtypeid = resp.swtypeid
 | 
|   | 127 | +        self.lib.dev.hwtypeid = resp.hwtypeid
 | 
|   | 128 | +        return resp
 | 
| 122 | 129 |      
 | 
| 123 | 130 |      def getpacketsizeinfo(self):
 | 
| 124 | 131 |          """ This returns the emBIOS max packet size information.
 | 
| — | — | @@ -132,7 +139,10 @@ | 
| 133 | 140 |      
 | 
| 134 | 141 |      def getusermemrange(self):
 | 
| 135 | 142 |          """ This returns the memory range the user has access to. """
 | 
| 136 |   | -        return self.lib.monitorcommand(struct.pack("IIII", 1, 2, 0, 0), "III", ("lower", "upper", None))
 | 
|   | 143 | +        resp = self.lib.monitorcommand(struct.pack("IIII", 1, 2, 0, 0), "III", ("lower", "upper", None))
 | 
|   | 144 | +        self.lib.dev.usermem.lower = resp.lower
 | 
|   | 145 | +        self.lib.dev.usermem.upper = resp.upper
 | 
|   | 146 | +        return resp
 | 
| 137 | 147 |      
 | 
| 138 | 148 |      def reset(self, force=False):
 | 
| 139 | 149 |          """ Reboot the device """
 | 
| — | — | @@ -531,11 +541,23 @@ | 
| 532 | 542 |          self.connect()
 | 
| 533 | 543 |          self.findEndpoints()
 | 
| 534 | 544 |          
 | 
|   | 545 | +        
 | 
|   | 546 | +        # Device properties
 | 
| 535 | 547 |          self.packetsizelimit = {}
 | 
| 536 | 548 |          self.packetsizelimit['cout'] = None
 | 
| 537 | 549 |          self.packetsizelimit['cin'] = None
 | 
| 538 | 550 |          self.packetsizelimit['dout'] = None
 | 
| 539 | 551 |          self.packetsizelimit['din'] = None
 | 
|   | 552 | +        
 | 
|   | 553 | +        self.version.revision = None
 | 
|   | 554 | +        self.version.majorv = None
 | 
|   | 555 | +        self.version.minorv = None
 | 
|   | 556 | +        self.version.patchv = None
 | 
|   | 557 | +        self.swtypeid = None
 | 
|   | 558 | +        self.hwtypeid = None
 | 
|   | 559 | +        
 | 
|   | 560 | +        self.usermem.lower = None
 | 
|   | 561 | +        self.usermem.upper = None
 | 
| 540 | 562 |      
 | 
| 541 | 563 |      def __del__(self):
 | 
| 542 | 564 |          self.disconnect()
 |