Changeset 233 in xtideuniversalbios for trunk/Serial_Server/library/Image.cpp
- Timestamp:
- Feb 4, 2012, 6:21:22 PM (13 years ago)
- google:author:
- gregli@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Serial_Server/library/Image.cpp
r219 r233 137 137 #define ATA_dwLBACnt 60 138 138 139 #define ATA_ VendorSpecific_ReturnPortBaud 158139 #define ATA_wVendor 159 140 140 141 141 #define ATA_wCaps_LBA 0x200 … … 164 164 }; 165 165 166 void Image::respondInquire( unsigned short *buff, struct baudRate *baudRate, unsigned char portAndBaud ) 167 { 168 unsigned short comPort = 0; 169 struct comPorts *cp; 170 171 if( portAndBaud ) 172 { 173 for( cp = supportedComPorts; cp->port && cp->port != ((portAndBaud << 3) + 0x260); cp++ ) ; 174 if( cp->port ) 175 comPort = cp->com; 176 } 177 166 void Image::respondInquire( unsigned short *buff, struct baudRate *baudRate, unsigned short port, unsigned char scan ) 167 { 178 168 memset( &buff[0], 0, 514 ); 179 169 180 if( comPort ) 181 sprintf( (char *) &buff[ATA_strModel], "%.20s (COM%d/%s)", shortFileName, comPort, baudRate->display ); 182 else 183 sprintf( (char *) &buff[ATA_strModel], "%.30s (%s baud)", shortFileName, baudRate->display ); 184 185 // strncpy( (char *) &buff[ATA_strModel], img->shortFileName, 40 ); 170 if( scan ) 171 { 172 unsigned short comPort = 0; 173 struct comPorts *cp; 174 175 if( port ) 176 { 177 for( cp = supportedComPorts; cp->port && cp->port != port; cp++ ) ; 178 if( cp->port ) 179 comPort = cp->com; 180 } 181 182 if( comPort ) 183 sprintf( (char *) &buff[ATA_strModel], "%.15s (COM%c/%s)", shortFileName, comPort, baudRate->display ); 184 else 185 sprintf( (char *) &buff[ATA_strModel], "%.25s (%s baud)", shortFileName, baudRate->display ); 186 } 187 else 188 sprintf( (char *) &buff[ATA_strModel], "%.30s", shortFileName ); 186 189 187 190 strncpy( (char *) &buff[ATA_strSerial], "serial", 20 );
Note:
See TracChangeset
for help on using the changeset viewer.