VirtualBox

Changeset 4147 in vbox


Ignore:
Timestamp:
Aug 14, 2007 12:01:46 PM (17 years ago)
Author:
vboxsync
Message:

Corrected style and docs of the PDMICHAR::pfnSetParameters method.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/pdmifs.h

    r4142 r4147  
    11261126     * @returns VBox status code.
    11271127     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
    1128      * @param   speed           Speed of the serial connection.
    1129      * @param   parity          Enable parity
    1130      * @param   data_bits       Number of data bits
    1131      * @param   stop_bits       Number of stop bits
    1132      * @thread  Any thread.
    1133      */
    1134     DECLR3CALLBACKMEMBER(int, pfnSetParameters,(PPDMICHAR pInterface, int speed, int parity, int data_bits, int stop_bits));
     1128     * @param   Bps             Speed of the serial connection. (bits per second)
     1129     * @param   chParity        Parity method: 'E' - even, 'O' - odd, 'N' - none.
     1130     * @param   cDataBits       Number of data bits.
     1131     * @param   cStopBits       Number of stop bits.
     1132     * @thread  Any thread.
     1133     */
     1134    DECLR3CALLBACKMEMBER(int, pfnSetParameters,(PPDMICHAR pInterface, unsigned Bps, char chParity, unsigned cDataBits, unsigned cStopBits));
    11351135
    11361136} PDMICHAR;
  • trunk/src/VBox/Devices/Serial/DrvChar.cpp

    r4142 r4147  
    128128
    129129/** @copydoc PDMICHAR::pfnSetParameters */
    130 static DECLCALLBACK(int) drvCharSetParameters(PPDMICHAR pInterface, int speed, int parity, int data_bits, int stop_bits)
    131 {
    132     PDRVCHAR pData = PDMICHAR_2_DRVCHAR(pInterface);
    133 
    134     LogFlow(("%s: speed=%d parity=%c data_bits=%d stop_bits=%d\n", __FUNCTION__, speed, parity, data_bits, stop_bits));
     130static DECLCALLBACK(int) drvCharSetParameters(PPDMICHAR pInterface, unsigned Bps, char chParity, unsigned cDataBits, unsigned cStopBits)
     131{
     132    /*PDRVCHAR pData = PDMICHAR_2_DRVCHAR(pInterface); - unused*/
     133
     134    LogFlow(("%s: Bps=%u chParity=%c cDataBits=%u cStopBits=%u\n", __FUNCTION__, Bps, chParity, cDataBits, cStopBits));
    135135    return VINF_SUCCESS;
    136136}
     
    159159         * Write the character to the attached stream (if present).
    160160         */
    161         if (    !pData->fShutdown 
     161        if (    !pData->fShutdown
    162162            &&  pData->pDrvStream)
    163163        {
     
    329329    PDMDrvHlpSTAMRegisterF(pDrvIns, &pData->StatBytesWritten,    STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_BYTES, "Nr of bytes written",         "/Devices/Char%d/Written", pDrvIns->iInstance);
    330330    PDMDrvHlpSTAMRegisterF(pDrvIns, &pData->StatBytesRead,       STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_BYTES, "Nr of bytes read",            "/Devices/Char%d/Read", pDrvIns->iInstance);
    331    
     331
    332332    return VINF_SUCCESS;
    333333}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette