-
Notifications
You must be signed in to change notification settings - Fork 0
/
objectlist.c
147 lines (121 loc) · 4.65 KB
/
objectlist.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#ifndef __objectlist__
#define __objectlist__
#include <soes/esc_coe.h>
#include <soes_hook.h>
#include <foe_flash.h>
extern uint16_t flash_cmd;
extern uint16_t flash_cmd_ack;
extern uint16_t crc_ok;
extern uint16_t et1100_boot_pin;
static const char Number_of_elements[] = "Number of Elements";
//static const char mapped_obj[] = "Mapped Object";
const _objd SDO1000[] =
{
{0x0, DTYPE_UNSIGNED32, 32, ATYPE_RO, "Device Type", 0x01901389, 0},
};
const _objd SDO1008[] =
{
{0x0, DTYPE_VISIBLE_STRING, 72, ATYPE_RO, "Manufacturer Device Name", 0, "Tm4c"},
};
const _objd SDO1009[] =
{
{0x0, DTYPE_VISIBLE_STRING, 24, ATYPE_RO, "Manufacturer Hardware Version", 0, "1.0"},
};
const _objd SDO100A[] =
{
{0x0, DTYPE_VISIBLE_STRING, 24, ATYPE_RO, "Manufacturer Software Version", 0, "bl_tm4c"},
};
const _objd SDO1018[] =
{
{0x0, DTYPE_UNSIGNED8, 8, ATYPE_RO, Number_of_elements, 4, 0},
{0x1, DTYPE_UNSIGNED32, 32, ATYPE_RO, "Vendor ID", 664, 0}, // Vendor ID
{0x2, DTYPE_UNSIGNED32, 32, ATYPE_RO, "Product Code", 0, 0}, // Product code
{0x3, DTYPE_UNSIGNED32, 32, ATYPE_RO, "Revision Number", 0, 0}, // Revision number
{0x4, DTYPE_UNSIGNED32, 32, ATYPE_RO, "Serial Number", 0x00000000, 0},// Serial number
};
const _objd SDO10F1[] =
{
{0x0, DTYPE_UNSIGNED8, 8, ATYPE_RO, Number_of_elements, 2, 0},
{0x1, DTYPE_UNSIGNED32, 32, ATYPE_RW, "Local Error Reaction", 0, 0},
{0x2, DTYPE_UNSIGNED16, 16, ATYPE_RW, "Sync Error Counter Limit", 4, 0},
};
const _objd SDO1C00[] =
{
{0x0, DTYPE_UNSIGNED8, 8, ATYPE_RO, Number_of_elements, 4, 0},
{0x1, DTYPE_UNSIGNED8, 8, ATYPE_RO, "Communications Type SM0", 1, 0},
{0x2, DTYPE_UNSIGNED8, 8, ATYPE_RO, "Communications Type SM1", 2, 0},
{0x3, DTYPE_UNSIGNED8, 8, ATYPE_RO, "Communications Type SM2", 3, 0},
{0x4, DTYPE_UNSIGNED8, 8, ATYPE_RO, "Communications Type SM3", 4, 0},
};
const _objd SDO1C12[] =
{
{0x0, DTYPE_UNSIGNED8, 8, ATYPE_RO, Number_of_elements, 1, 0},
{0x1, DTYPE_UNSIGNED16, 16, ATYPE_RO, "PDO Mapping", 0x1600, 0},
};
const _objd SDO1C13[] =
{
{0x0, DTYPE_UNSIGNED8, 8, ATYPE_RO, Number_of_elements, 1, 0},
{0x1, DTYPE_UNSIGNED16, 16, ATYPE_RO, "PDO Mapping", 0x1A00, 0},
};
const _objd SDO1C32[] =
{
{0x00, DTYPE_UNSIGNED8, 8, ATYPE_RO, Number_of_elements, 5, 0},
{0x01, DTYPE_UNSIGNED16, 16, ATYPE_RO, "SyncType", 1, 0},
{0x02, DTYPE_UNSIGNED32, 32, ATYPE_RO, "CycleTime", 0, 0},
{0x03, DTYPE_UNSIGNED32, 32, ATYPE_RO, "ShiftTime", 0, 0},
{0x04, DTYPE_UNSIGNED16, 16, ATYPE_RO, "Synchronization Types supported", 0x1F, 0},
{0x05, DTYPE_UNSIGNED32, 32, ATYPE_RO, "Minimum Cycle Time", 125000, 0},
};
/*
*
*
*
*/
// RxPdo 1600
const _objd SDO1600[] =
{
{0x0, DTYPE_UNSIGNED8, 8, ATYPE_RO, Number_of_elements, 0, 0},
};
// TxPdo
const _objd SDO1A00[] =
{
{0x0, DTYPE_UNSIGNED8, 8, ATYPE_RO, Number_of_elements, 0, 0},
};
const _objd SDO6000[] =
{
{0x0, DTYPE_UNSIGNED8, 8, ATYPE_RO, Number_of_elements, 0, 0},
};
const _objd SDO7000[] =
{
{0x0, DTYPE_UNSIGNED8, 8, ATYPE_RO, Number_of_elements, 0, 0},
};
const _objd SDO8000[] =
{
{0x0, DTYPE_UNSIGNED8, 8, ATYPE_RO, Number_of_elements, 6, 0},
{0x1, DTYPE_UNSIGNED16, 16, ATYPE_RW, "flash_cmd", 0, &flash_cmd},
{0x2, DTYPE_UNSIGNED16, 16, ATYPE_RO, "flash_cmd_ack",0, &flash_cmd_ack},
{0x3, DTYPE_UNSIGNED32, 32, ATYPE_RO, "flash_crc", 0, (void*)&bldr_info.crc_app},
{0x4, DTYPE_VISIBLE_STRING, 64, ATYPE_RO, "bl_ver", 0, &BLDR_Version},
{0x5, DTYPE_UNSIGNED16, 16, ATYPE_RO, "crc_ok", 0, &crc_ok},
{0x6, DTYPE_UNSIGNED16, 16, ATYPE_RO, "et1100_boot_pin",0, &et1100_boot_pin},
};
const _objectlist SDOobjects[] =
{
{0x1000, OTYPE_VAR, 0, 0, "Device Type", SDO1000},
{0x1008, OTYPE_VAR, 0, 0, "Manufacturer Device Name", SDO1008},
{0x1009, OTYPE_VAR, 0, 0, "Manufacturer Hardware Version", SDO1009},
{0x100A, OTYPE_VAR, 0, 0, "Manufacturer Software Version", SDO100A},
{0x1018, OTYPE_RECORD, 4, 0, "Identity Object", SDO1018},
{0x10F1, OTYPE_RECORD, 2, 0, "Error Setting Object", SDO10F1},
{0x1600, OTYPE_RECORD, 0, 0, "Receive PDO Mapping", SDO1600},
{0x1A00, OTYPE_RECORD, 0, 0, "Transmit PDO Mapping", SDO1A00},
{0x1C00, OTYPE_ARRAY, 4, 0, "Sync Manager Communication Type", SDO1C00},
{0x1C12, OTYPE_ARRAY, 1, 0, "Sync Manager 2 PDO Assignment", SDO1C12},
{0x1C13, OTYPE_ARRAY, 1, 0, "Sync Manager 3 PDO Assignment", SDO1C13},
{0x1C32, OTYPE_RECORD, 5, 0, "SM2(Output) Synchronisation Parameter", SDO1C32},
{0x6000, OTYPE_RECORD, 0, 0, "Inputs", SDO6000},
{0x7000, OTYPE_RECORD, 0, 0, "Outputs", SDO7000},
{0x8000, OTYPE_RECORD, 6, 0, "Flash Parameters", SDO8000},
{0xffff, 0xff, 0xff, 0xff, 0, 0}
};
#endif