Jump to content

ASYNC GETBAUDRATE: Difference between revisions

From EDM2
Created page with "This function returns the bit rate. ; Category: IOCTL_ASYNC (01h) ; Function: ASYNC_GETBAUDRATE (61h) ==Parameter Packet Format== None. Packet pointer must be NULL. ==Da..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This function returns the bit rate.  
{{DISPLAYTITLE:ASYNC_GETBAUDRATE}}
This function returns the bit rate.


; Category: IOCTL_ASYNC (01h)
;Category: IOCTL_ASYNC (01h)
; Function: ASYNC_GETBAUDRATE (61h)  
;Function: ASYNC_GETBAUDRATE (61h)


==Parameter Packet Format==
==Parameter Packet Format==
None. Packet pointer must be NULL.  
None. Packet pointer must be NULL.


==Data Packet Format==
==Data Packet Format==
<pre>
{|class="wikitable"
┌────────────────────────────────────┐
!Field||Length||C Datatype
│Field        Length     C Datatype
|-
├────────────────────────────────────┤
|Bit Rate||WORD||USHORT
│Bit Rate     WORD       USHORT     │
|}
└────────────────────────────────────┘
;Bit Rate:A binary integer representing the actual bit rate of the COM device in bits-per-second, rounded to the nearest whole number.
</pre>


==Returns==
==Returns==
If the call is made with an invalid Parameter Packet value, a general failure error is reported and valid information is not returned in the Data Packet.  
If the call is made with an invalid Parameter Packet value, a general failure error is reported and valid information is not returned in the Data Packet.


==Remarks==
==Remarks==
If a general failure error is not returned, the physical device driver returns the current bit rate of the COM device.  
If a general failure error is not returned, the physical device driver returns the current bit rate of the COM device.


;Note: If this function is called when the current bit rate setting of a COM port is greater than what can be stored in a 1-WORD field, the device driver sets the bit rate to 1200 bps (default value) and returns 1200 bps to the user.  
;Note: If this function is called when the current bit rate setting of a COM port is greater than what can be stored in a 1-WORD field, the device driver sets the bit rate to 1200 bps (default value) and returns 1200 bps to the user.


[[Category:IOCtl Commands]]
[[Category:IOCtl Function]]
{{DISPLAYTITLE:ASYNC_GETBAUDRATE (61h) }}

Latest revision as of 18:49, 22 October 2021

This function returns the bit rate.

Category
IOCTL_ASYNC (01h)
Function
ASYNC_GETBAUDRATE (61h)

Parameter Packet Format

None. Packet pointer must be NULL.

Data Packet Format

Field Length C Datatype
Bit Rate WORD USHORT
Bit Rate
A binary integer representing the actual bit rate of the COM device in bits-per-second, rounded to the nearest whole number.

Returns

If the call is made with an invalid Parameter Packet value, a general failure error is reported and valid information is not returned in the Data Packet.

Remarks

If a general failure error is not returned, the physical device driver returns the current bit rate of the COM device.

Note
If this function is called when the current bit rate setting of a COM port is greater than what can be stored in a 1-WORD field, the device driver sets the bit rate to 1200 bps (default value) and returns 1200 bps to the user.