![Tews Technologies TPMC866-SW-42 Скачать руководство пользователя страница 11](http://html1.mh-extra.com/html/tews-technologies/tpmc866-sw-42/tpmc866-sw-42_user-manual_1093638011.webp)
TPMC866-SW-42 - VxWorks Device Driver
Page 11 of 37
ModelType
Specifies the type of the TPMC866 (-10/-11/-12), if software detection fails. Software
detection may fail in some systems, if the Local Configuration Space of the TPMC866 is
not placed on 0x100 aligned addresses.
Allowed parameters are:
value
description
TPMC866_10
Module is treated as TPMC866-10
TPMC866_11
Module is treated as TPMC866-11
TPMC866_12
Module is treated as TPMC866-12
EXAMPLE
#include
"tpmc866.h”
STATUS
result;
TP866_CHANCONF
tp866setup =
{
115200,
/* 115200 Baud
*/
OPT_TERMINAL,
/* Terminal options
*/
TP866F_NO, TP866F_NO,
/* no FIFO
*/
TP866DB_8, TP866SB_10, TP866NOP,
/* 8/1/0 Data/Stop/Pari
*/
NO,
/* no handshake
*/
TPMC866_10
/* if autodetection fails,
*/
/* treat it as TPMC866-10
*/
};
/*-------------------------------------------------------------
Create the device "/tp866/1" on channel 0 with read and write
buffer sizes of 512 bytes.
Baudrate:
115200Baud
Options:
Terminal
FIFOs:
disabled
Databits:
8
Stopbits:
1
Parity:
off
Handshake: off
ModelType: TPMC866-10
-------------------------------------------------------------*/
result = tp866DevCreate ("/tp866/1", 0, 512, 512, &tp866setup);
if (result == ERROR)
{
/* Error handling */
}