UART Wildcard User Guide
<< Previous | Next>>
C: CHANNEL1
4th: CHANNEL1 ( -- 1 )
A constant equal to 1, used as a channel specifier.
C: CHANNEL2
4th: CHANNEL2 ( -- 2 )
A constant equal to 2, used as a channel specifier.
C: DEFAULT_BAUDRATE
4th: DEFAULT_BAUDRATE ( -- n )
A constant in the demonstration program whose value sets the baud rate for channels 1 and 2 in the Default_UART_Init function. The user should set this to the desired value. Standard baud rates are 300, 1200, 2400, 4800, 9600, 19200, 38400, and 56000 baud. The suggested value in the demo source code is 19200 baud. See Default_UART_Init and Set_Baud.
C: DEFAULT_BITS_PER_CHAR
4th: DEFAULT_BITS_PER_CHAR ( -- n )
A constant in the demonstration program whose value sets the number of data bits per character for channels 1 and 2 in the Default_UART_Init function. Allowed values are 5, 6, 7, or 8. The user should set this to the desired value. The suggested value in the demo source code is 8. See Default_UART_Init and Set_Data_Format.
C: DEFAULT_PROTOCOL
4th: DEFAULT_PROTOCOL ( -- n )
A constant in the demonstration program whose value sets the protocol for channels 1 and 2 in the Default_UART_Init function. The user should set this to the desired value. Allowed values are given by the constants RS232, RS422, RS485, or NOT_USED; see their glossary entries. The suggested value in the demo source code is RS232. See Default_UART_Init and Set_Protocols.
C: DEFAULT_MODEM_SUPPORT
4th: DEFAULT_MODEM_SUPPORT ( -- n )
A constant in the demonstration program whose value sets the modem support flag for channel 1 in the Default_UART_Init function. Allowed values are TRUE (nonzero) or FALSE (0). The user should set this to the desired value. The suggested value in the demo source code is FALSE. See Default_UART_Init and Set_Protocols.
C: DEFAULT_PARITY
4th: DEFAULT_PARITY ( -- n )
A constant in the demonstration program whose value sets the parity type for channels 1 and 2 in the Default_UART_Init function. The user should set this to the desired value. Allowed values are given by the constants NO_PARITY, EVEN_PARITY, ODD_PARITY, HIGH_PARITY, or LOW_PARITY; see their glossary entries. The suggested value in the demo source code is NO_PARITY. See Default_UART_Init and Set_Data_Format.
C: DEFAULT_STOP_BITS
4th: DEFAULT_STOP_BITS ( -- n )
A constant in the demonstration program whose value sets the number of stop bits for channels 1 and 2 in the Default_UART_Init function. Allowed values are 1 or 2. The user should set this to the desired value. The suggested value in the demo source code is 1. See Default_UART_Init and Set_Data_Format.
C: int Default_UART_Init ( int module_num )
4th: Default_UART_Init ( module_num -- error )
A function in the demonstration program that sets the protocols, data formats, and baud rates for both channel 1 and channel 2 according to a set of default parameter constants. This function passes the parameters DEFAULT_BITS_PER_CHAR, DEFAULT_STOP_BITS, and DEFAULT_PARITY to the Set_Data_Format function for each channel in the specified Wildcard. It passes the parameter DEFAULT_BAUDRATE to Set_Baud for each channel in the specified Wildcard. It passes the parameters DEFAULT_MODEM_SUPPORT and DEFAULT_PROTOCOL to Set_Protocols. If an invalid protocol combination is specified as described below, this function returns a nonzero error flag. Otherwise, a result of zero is returned. This function is provided in source form to illustrate how to initialize the UART Wildcard. The values of the default parameters and the source code of this function can be customized to meet the needs of your application.
<< Previous | Next>>
|