# UART\_SETTINGS Structure

This structure defines settings for UART access on neoVI Fire devices.

{% tabs %}
{% tab title="C/C++ Declare" %}

```cpp
typedef struct _UART_SETTINGS{
   unsigned short Baudrate;
   unsigned short spbrg;
   unsigned short brgh;
   unsigned short parity;
   unsigned short stop_bits;
   unsigned char flow_control; // 0- off, 1 - Simple CTS RTS,
   unsigned char reserved_1;
   unsigned int bOptions; //AND to combind these values invert_tx = 1 invert_rx = 2 half_duplex = 4
} UART_SETTINGS;
```

{% endtab %}

{% tab title="Visual Basic .NET Declares" %}

```visual-basic
<StructLayout(LayoutKind.Sequential, Pack:=2)> Public Structure UART_SETTINGS
   Dim Baudrate As UInt16
   Dim spbrg As UInt16
   Dim brgh As UInt16
   Dim parity As UInt16
   Dim stop_bits As UInt16
   Dim flow_control As Byte '// 0- off, 1 - Simple CTS RTS,
   Dim reserved_1 As Byte
   Dim bOptions As UInt32 '//AND to combind these values invert_tx = 1 invert_rx = 2 half_duplex = 4
End Structure
```

{% endtab %}

{% tab title="C# Declares" %}

```csharp
[StructLayout(LayoutKind.Sequential,Pack=2)]
public struct UART_SETTINGS
{
   public UInt16 Baudrate; If
   public UInt16 spbrg;
   public UInt16 brgh;
   public UInt16 parity;
   public UInt16 stop_bits;
   public byte flow_control; // 0- off, 1 - Simple CTS RTS,
   public byte reserved_1;
   public UInt32 bOptions; //AND to combind these values invert_tx = 1 invert_rx = 2 half_duplex = 4
}
```

{% endtab %}
{% endtabs %}

**Remarks**

**Structure Elements**

| Item                                                                                                                                                                                                  | Description                                                                          |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| [icscm\_uint16](/neovi-api/win32-api-overview-intrepidcs-api/structures-types-and-defines-overview-intrepidcs-api/setting-structures-overview-intrepidcs-api/intrepid-api-data-types.md) Baudrate     | Holds the baud rate for the UART Connection. An example value could be 10417 or 9600 |
| [icscm\_uint16](/neovi-api/win32-api-overview-intrepidcs-api/structures-types-and-defines-overview-intrepidcs-api/setting-structures-overview-intrepidcs-api/intrepid-api-data-types.md) spbrg        |                                                                                      |
| [icscm\_uint16](/neovi-api/win32-api-overview-intrepidcs-api/structures-types-and-defines-overview-intrepidcs-api/setting-structures-overview-intrepidcs-api/intrepid-api-data-types.md) brgh         |                                                                                      |
| [icscm\_uint16](/neovi-api/win32-api-overview-intrepidcs-api/structures-types-and-defines-overview-intrepidcs-api/setting-structures-overview-intrepidcs-api/intrepid-api-data-types.md) parity       | Sets the Parity type. Valid values are below                                         |
| [icscm\_uint16](/neovi-api/win32-api-overview-intrepidcs-api/structures-types-and-defines-overview-intrepidcs-api/setting-structures-overview-intrepidcs-api/intrepid-api-data-types.md) stop\_bits   | Sets the number of stop bits to use. Valid values are below.                         |
| [icscm\_uint8](/neovi-api/win32-api-overview-intrepidcs-api/structures-types-and-defines-overview-intrepidcs-api/setting-structures-overview-intrepidcs-api/intrepid-api-data-types.md) flow\_control | Set to 0 for no flow control and 1 for simple CTS RTS                                |
| [icscm\_uint8](/neovi-api/win32-api-overview-intrepidcs-api/structures-types-and-defines-overview-intrepidcs-api/setting-structures-overview-intrepidcs-api/intrepid-api-data-types.md) reserved      |                                                                                      |
| [icscm\_uint32](/neovi-api/win32-api-overview-intrepidcs-api/structures-types-and-defines-overview-intrepidcs-api/setting-structures-overview-intrepidcs-api/intrepid-api-data-types.md) bOptions     | Bitfield containing UART Options                                                     |

| Invert Tx   | 1 |
| ----------- | - |
| Invert Rx   | 2 |
| Half Duplex | 4 |

| One Stop Bit  | 1 |
| ------------- | - |
| Two Stop Bits | 2 |

| None | 0 |
| ---- | - |
| Even | 1 |
| Odd  | 2 |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.intrepidcs.com/neovi-api/win32-api-overview-intrepidcs-api/structures-types-and-defines-overview-intrepidcs-api/setting-structures-overview-intrepidcs-api/sub-setting-structures-overview-intrepidcs-api/uart_settings-structure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
