Changeset 6087 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Dec 15, 2007 5:02:19 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 26786
- Location:
- trunk/src/VBox/Devices/Serial
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Serial/DevSerial.cpp
r6073 r6087 421 421 } 422 422 423 static DECLCALLBACK(int) serialNotifyStatusLinesChanged(PPDMICHARPORT pInterface, PDMICHARSTATUSLINESnewStatusLines)423 static DECLCALLBACK(int) serialNotifyStatusLinesChanged(PPDMICHARPORT pInterface, uint32_t newStatusLines) 424 424 { 425 425 SerialState *pData = PDMICHARPORT_2_SERIALSTATE(pInterface); -
trunk/src/VBox/Devices/Serial/DrvChar.cpp
r6027 r6087 271 271 * @returns VBox status code 272 272 * @param pInterface Pointer to the interface structure. 273 * @param RequestToSend Set to 1if this control line should be made active.274 * @param DataTerminalReady Set to 1if this control line should be made active.275 */ 276 static DECLCALLBACK(int) drvCharSetModemLines(PPDMICHAR pInterface, unsigned RequestToSend, unsignedDataTerminalReady)273 * @param RequestToSend Set to true if this control line should be made active. 274 * @param DataTerminalReady Set to true if this control line should be made active. 275 */ 276 static DECLCALLBACK(int) drvCharSetModemLines(PPDMICHAR pInterface, bool RequestToSend, bool DataTerminalReady) 277 277 { 278 278 /* Nothing to do here. */ -
trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp
r6016 r6087 51 51 */ 52 52 #ifndef TIOCM_LOOP 53 # define TIOCM_LOOP 53 # define TIOCM_LOOP 0x8000 54 54 #endif 55 55 … … 690 690 #endif 691 691 692 if (pThread->enmState == PDMTHREADSTATE_INITIALIZING) 693 return VINF_SUCCESS; 694 692 695 while (pThread->enmState == PDMTHREADSTATE_RUNNING) 693 696 { 694 PDMICHARSTATUSLINESnewStatusLine = 0;697 uint32_t newStatusLine = 0; 695 698 696 699 #if defined(RT_OS_LINUX) … … 769 772 * @returns VBox status code 770 773 * @param pInterface Pointer to the interface structure. 771 * @param RequestToSend Set to 1 if this control line should be made active. 772 * @param DataTerminalReady Set to 1 if this control line should be made active. 773 */ 774 static DECLCALLBACK(int) drvHostSerialSetModemLines(PPDMICHAR pInterface, unsigned RequestToSend, unsigned DataTerminalReady) 775 { 774 * @param RequestToSend Set to true if this control line should be made active. 775 * @param DataTerminalReady Set to true if this control line should be made active. 776 */ 777 static DECLCALLBACK(int) drvHostSerialSetModemLines(PPDMICHAR pInterface, bool RequestToSend, bool DataTerminalReady) 778 { 779 PDRVHOSTSERIAL pData = PDMICHAR_2_DRVHOSTSERIAL(pInterface); 780 776 781 #ifdef RT_OS_LINUX 777 PDRVHOSTSERIAL pData = PDMICHAR_2_DRVHOSTSERIAL(pInterface);778 int modemState = 0;782 int modemStateSet = 0; 783 int modemStateClear = 0; 779 784 780 785 if (RequestToSend) 781 {782 modemState |= TIOCM_RTS;783 }786 modemStateSet |= TIOCM_RTS; 787 else 788 modemStateClear |= TIOCM_RTS; 784 789 785 790 if (DataTerminalReady) 786 { 787 modemState |= TIOCM_DTR; 788 } 789 790 ioctl(pData->DeviceFile, TIOCMBIS, &modemState); 791 modemStateSet |= TIOCM_DTR; 792 else 793 modemStateClear |= TIOCM_DTR; 794 795 if (modemStateSet) 796 ioctl(pData->DeviceFile, TIOCMBIS, &modemStateSet); 797 798 if (modemStateClear) 799 ioctl(pData->DeviceFile, TIOCMBIC, &modemStateClear); 800 #elif defined(RT_OS_WINDOWS) 801 if (RequestToSend) 802 EscapeCommFunction(pData->hDeviceFile, SETRTS); 803 else 804 EscapeCommFunction(pData->hDeviceFIle, CLRRTS); 805 806 if (DataTerminalReady) 807 EscapeCommFunction(pData->hDeviceFile, SETDTR); 808 else 809 EscapeCommFunction(pData->hDeviceFIle, CLRDTR); 791 810 #endif 792 811
Note:
See TracChangeset
for help on using the changeset viewer.