source: trunk/Cosy/incl/lmts.h@ 10113

Last change on this file since 10113 was 731, checked in by tbretz, 24 years ago
*** empty log message ***
File size: 2.3 KB
Line 
1/*-----------------------------------------------------------------------------
2lmts.h -- LMT Slave
3
4Copyright (c) 1994 JANZ Computer AG
5All Rights Reserved
6
7Created 95/02/02 by Soenke Hansen
8Version 1.5 of 96/04/18
9
10Various definitions: LMT Address type, LMT command specifiers,
11macros for data indicated to the LMT User.
12Prototypes of functions defined in lmts.c.
13
14
15-----------------------------------------------------------------------------*/
16
17
18#ifndef lmts_DEFINED
19#define lmts_DEFINED
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#include "defs.h"
26#include "msg.h"
27
28/* There is one CAL Object associated with the LMT Slave */
29extern struct calo *LmtSlave; /* receives COBs from LMT Master */
30
31/* LMT Address type */
32struct lmt_addr {
33 BYTE_t manuf[8]; /* manufacturer name */
34 BYTE_t prod[8]; /* product name */
35 BYTE_t serno[8]; /* serial number */
36};
37#if TYPEDEFS == 1
38typedef struct lmt_addr LmtAddr;
39#else
40#define LmtAddr struct lmt_addr
41#endif
42
43/* Parameters to user indications */
44#define lmts_mode u.m1.w[0] /* LMT Mode */
45#define lmts_btr u.m1.w[0] /* Bit Timing Parameter */
46
47/* Command specifiers in LMT Protocol */
48#define LMT_CS_SWITCH_SEL_MANUF 1 /* Switch Mode Select: Manuf. Name */
49#define LMT_CS_SWITCH_SEL_PROD 2 /* Switch Mode Select: Product Name */
50#define LMT_CS_SWITCH_SEL_SERNO 3 /* Switch Mode Select: Serial # */
51#define LMT_CS_SWITCH_GLOBAL 4 /* Switch Mode Global */
52#define LMT_CS_CONF_MODID 17 /* Configure Module ID */
53#define LMT_CS_CONF_MODNAME 18 /* Configure Module Name */
54#define LMT_CS_CONF_BITTIME 19 /* Configure Bit Timing */
55#define LMT_CS_ACTV_BITTIME 21 /* Activate Bit Timing */
56#define LMT_CS_STORE_CONFIG 23 /* Store Configuration */
57#define LMT_CS_INQUIRE_MANUF 36 /* Inquire Manufacturer Name */
58#define LMT_CS_INQUIRE_PROD 37 /* Inquire Product Name */
59#define LMT_CS_INQUIRE_SERNO 38 /* Inquire Serial Number */
60
61/* Nil command specifier */
62#define LMT_CS_NIL 0 /* not used by protocols */
63
64/* Allocate and initialize LMT Slave */
65extern void InitLmtS(
66 WORD_t , /* configured bit timing parameters */
67 void (*)() /* user handler indication/confirmation */
68);
69
70/* Deallocate LMT Slave */
71extern void DeleteLmtS(void);
72
73/* Create LMT Address */
74extern void CreateLmtAddress(LmtAddr *);
75
76#ifdef __cplusplus
77}
78#endif
79
80#endif /* !lmts_DEFINED */
Note: See TracBrowser for help on using the repository browser.