examples/AT91/Master/ObjDict.c
author Edouard Tisserant
Thu, 07 Mar 2013 11:40:28 +0900
changeset 777 bbbfd27c1bd1
parent 521 731bbe1b67b4
permissions -rw-r--r--
Harmonized unix and win32 canClose_driver, fixed crash on close under win32
521
peter
parents:
diff changeset
     1
peter
parents:
diff changeset
     2
/* File generated by gen_cfile.py. Should not be modified. */
peter
parents:
diff changeset
     3
peter
parents:
diff changeset
     4
#include "ObjDict.h"
peter
parents:
diff changeset
     5
peter
parents:
diff changeset
     6
/**************************************************************************/
peter
parents:
diff changeset
     7
/* Declaration of the mapped variables                                    */
peter
parents:
diff changeset
     8
/**************************************************************************/
peter
parents:
diff changeset
     9
UNS8 DI1 = 0x0;		/* Mapped at index 0x2000, subindex 0x00 */
peter
parents:
diff changeset
    10
UNS8 DI2 = 0x0;		/* Mapped at index 0x2001, subindex 0x00 */
peter
parents:
diff changeset
    11
UNS8 DO1 = 0x0;		/* Mapped at index 0x2100, subindex 0x00 */
peter
parents:
diff changeset
    12
UNS8 DO2 = 0x0;		/* Mapped at index 0x2101, subindex 0x00 */
peter
parents:
diff changeset
    13
peter
parents:
diff changeset
    14
/**************************************************************************/
peter
parents:
diff changeset
    15
/* Declaration of the value range types                                   */
peter
parents:
diff changeset
    16
/**************************************************************************/
peter
parents:
diff changeset
    17
peter
parents:
diff changeset
    18
#define valueRange_EMC 0x9F /* Type for index 0x1003 subindex 0x00 (only set of value 0 is possible) */
peter
parents:
diff changeset
    19
UNS32 ObjDict_valueRangeTest (UNS8 typeValue, void * value)
peter
parents:
diff changeset
    20
{
peter
parents:
diff changeset
    21
  switch (typeValue) {
peter
parents:
diff changeset
    22
    case valueRange_EMC:
peter
parents:
diff changeset
    23
      if (*(UNS8*)value != (UNS8)0) return OD_VALUE_RANGE_EXCEEDED;
peter
parents:
diff changeset
    24
      break;
peter
parents:
diff changeset
    25
  }
peter
parents:
diff changeset
    26
  return 0;
peter
parents:
diff changeset
    27
}
peter
parents:
diff changeset
    28
peter
parents:
diff changeset
    29
/**************************************************************************/
peter
parents:
diff changeset
    30
/* The node id                                                            */
peter
parents:
diff changeset
    31
/**************************************************************************/
peter
parents:
diff changeset
    32
/* node_id default value.*/
peter
parents:
diff changeset
    33
UNS8 ObjDict_bDeviceNodeId = 0x00;
peter
parents:
diff changeset
    34
peter
parents:
diff changeset
    35
/**************************************************************************/
peter
parents:
diff changeset
    36
/* Array of message processing information */
peter
parents:
diff changeset
    37
peter
parents:
diff changeset
    38
const UNS8 ObjDict_iam_a_slave = 0;
peter
parents:
diff changeset
    39
peter
parents:
diff changeset
    40
TIMER_HANDLE ObjDict_heartBeatTimers[1] = {TIMER_NONE};
peter
parents:
diff changeset
    41
peter
parents:
diff changeset
    42
/*
peter
parents:
diff changeset
    43
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
peter
parents:
diff changeset
    44
peter
parents:
diff changeset
    45
                               OBJECT DICTIONARY
peter
parents:
diff changeset
    46
peter
parents:
diff changeset
    47
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
peter
parents:
diff changeset
    48
*/
peter
parents:
diff changeset
    49
peter
parents:
diff changeset
    50
/* index 0x1000 :   Device Type. */
peter
parents:
diff changeset
    51
                    UNS32 ObjDict_obj1000 = 0x30191;	/* 197009 */
peter
parents:
diff changeset
    52
                    subindex ObjDict_Index1000[] = 
peter
parents:
diff changeset
    53
                     {
peter
parents:
diff changeset
    54
                       { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1000 }
peter
parents:
diff changeset
    55
                     };
peter
parents:
diff changeset
    56
peter
parents:
diff changeset
    57
/* index 0x1001 :   Error Register. */
peter
parents:
diff changeset
    58
                    UNS8 ObjDict_obj1001 = 0x0;	/* 0 */
peter
parents:
diff changeset
    59
                    subindex ObjDict_Index1001[] = 
peter
parents:
diff changeset
    60
                     {
peter
parents:
diff changeset
    61
                       { RO, uint8, sizeof (UNS8), (void*)&ObjDict_obj1001 }
peter
parents:
diff changeset
    62
                     };
peter
parents:
diff changeset
    63
peter
parents:
diff changeset
    64
/* index 0x1003 :   Pre-defined Error Field */
peter
parents:
diff changeset
    65
                    UNS8 ObjDict_highestSubIndex_obj1003 = 0; /* number of subindex - 1*/
peter
parents:
diff changeset
    66
                    UNS32 ObjDict_obj1003[] = 
peter
parents:
diff changeset
    67
                    {
peter
parents:
diff changeset
    68
                      0x0	/* 0 */
peter
parents:
diff changeset
    69
                    };
peter
parents:
diff changeset
    70
                    ODCallback_t ObjDict_Index1003_callbacks[] = 
peter
parents:
diff changeset
    71
                     {
peter
parents:
diff changeset
    72
                       NULL,
peter
parents:
diff changeset
    73
                       NULL,
peter
parents:
diff changeset
    74
                     };
peter
parents:
diff changeset
    75
                    subindex ObjDict_Index1003[] = 
peter
parents:
diff changeset
    76
                     {
peter
parents:
diff changeset
    77
                       { RW, valueRange_EMC, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1003 },
peter
parents:
diff changeset
    78
                       { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1003[0] }
peter
parents:
diff changeset
    79
                     };
peter
parents:
diff changeset
    80
peter
parents:
diff changeset
    81
/* index 0x1005 :   SYNC COB ID. */
peter
parents:
diff changeset
    82
                    UNS32 ObjDict_obj1005 = 0x40000080;	/* 1073741952 */
peter
parents:
diff changeset
    83
                    ODCallback_t ObjDict_Index1005_callbacks[] = 
peter
parents:
diff changeset
    84
                     {
peter
parents:
diff changeset
    85
                       NULL,
peter
parents:
diff changeset
    86
                     };
peter
parents:
diff changeset
    87
                    subindex ObjDict_Index1005[] = 
peter
parents:
diff changeset
    88
                     {
peter
parents:
diff changeset
    89
                       { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1005 }
peter
parents:
diff changeset
    90
                     };
peter
parents:
diff changeset
    91
peter
parents:
diff changeset
    92
/* index 0x1006 :   Communication / Cycle Period. */
peter
parents:
diff changeset
    93
                    UNS32 ObjDict_obj1006 = 0xF4240;	/* 1000000 */
peter
parents:
diff changeset
    94
                    ODCallback_t ObjDict_Index1006_callbacks[] = 
peter
parents:
diff changeset
    95
                     {
peter
parents:
diff changeset
    96
                       NULL,
peter
parents:
diff changeset
    97
                     };
peter
parents:
diff changeset
    98
                    subindex ObjDict_Index1006[] = 
peter
parents:
diff changeset
    99
                     {
peter
parents:
diff changeset
   100
                       { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1006 }
peter
parents:
diff changeset
   101
                     };
peter
parents:
diff changeset
   102
peter
parents:
diff changeset
   103
/* index 0x1014 :   Emergency COB ID */
peter
parents:
diff changeset
   104
                    UNS32 ObjDict_obj1014 = 0x0;   /* 0 */
peter
parents:
diff changeset
   105
peter
parents:
diff changeset
   106
/* index 0x1016 :   Consumer Heartbeat Time. */
peter
parents:
diff changeset
   107
                    UNS8 ObjDict_highestSubIndex_obj1016 = 1; /* number of subindex - 1*/
peter
parents:
diff changeset
   108
                    UNS32 ObjDict_obj1016[] = 
peter
parents:
diff changeset
   109
                    {
peter
parents:
diff changeset
   110
                      0x4005DC	/* 4195804 */
peter
parents:
diff changeset
   111
                    };
peter
parents:
diff changeset
   112
                    subindex ObjDict_Index1016[] = 
peter
parents:
diff changeset
   113
                     {
peter
parents:
diff changeset
   114
                       { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1016 },
peter
parents:
diff changeset
   115
                       { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1016[0] }
peter
parents:
diff changeset
   116
                     };
peter
parents:
diff changeset
   117
peter
parents:
diff changeset
   118
/* index 0x1017 :   Producer Heartbeat Time */ 
peter
parents:
diff changeset
   119
                    UNS16 ObjDict_obj1017 = 0x0;   /* 0 */
peter
parents:
diff changeset
   120
peter
parents:
diff changeset
   121
/* index 0x1018 :   Identity. */
peter
parents:
diff changeset
   122
                    UNS8 ObjDict_highestSubIndex_obj1018 = 4; /* number of subindex - 1*/
peter
parents:
diff changeset
   123
                    UNS32 ObjDict_obj1018_Vendor_ID = 0x0;	/* 0 */
peter
parents:
diff changeset
   124
                    UNS32 ObjDict_obj1018_Product_Code = 0x0;	/* 0 */
peter
parents:
diff changeset
   125
                    UNS32 ObjDict_obj1018_Revision_Number = 0x0;	/* 0 */
peter
parents:
diff changeset
   126
                    UNS32 ObjDict_obj1018_Serial_Number = 0x0;	/* 0 */
peter
parents:
diff changeset
   127
                    subindex ObjDict_Index1018[] = 
peter
parents:
diff changeset
   128
                     {
peter
parents:
diff changeset
   129
                       { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1018 },
peter
parents:
diff changeset
   130
                       { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1018_Vendor_ID },
peter
parents:
diff changeset
   131
                       { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1018_Product_Code },
peter
parents:
diff changeset
   132
                       { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1018_Revision_Number },
peter
parents:
diff changeset
   133
                       { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1018_Serial_Number }
peter
parents:
diff changeset
   134
                     };
peter
parents:
diff changeset
   135
peter
parents:
diff changeset
   136
/* index 0x1200 :   Server SDO Parameter. */
peter
parents:
diff changeset
   137
                    UNS8 ObjDict_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/
peter
parents:
diff changeset
   138
                    UNS32 ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x600;	/* 1536 */
peter
parents:
diff changeset
   139
                    UNS32 ObjDict_obj1200_COB_ID_Server_to_Client_Transmit_SDO = 0x580;	/* 1408 */
peter
parents:
diff changeset
   140
                    subindex ObjDict_Index1200[] = 
peter
parents:
diff changeset
   141
                     {
peter
parents:
diff changeset
   142
                       { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1200 },
peter
parents:
diff changeset
   143
                       { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO },
peter
parents:
diff changeset
   144
                       { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1200_COB_ID_Server_to_Client_Transmit_SDO }
peter
parents:
diff changeset
   145
                     };
peter
parents:
diff changeset
   146
peter
parents:
diff changeset
   147
/* index 0x1280 :   Client SDO 1 Parameter. */
peter
parents:
diff changeset
   148
                    UNS8 ObjDict_highestSubIndex_obj1280 = 3; /* number of subindex - 1*/
peter
parents:
diff changeset
   149
                    UNS32 ObjDict_obj1280_COB_ID_Client_to_Server_Transmit_SDO = 0x640;	/* 1600 */
peter
parents:
diff changeset
   150
                    UNS32 ObjDict_obj1280_COB_ID_Server_to_Client_Receive_SDO = 0x5C0;	/* 1472 */
peter
parents:
diff changeset
   151
                    UNS8 ObjDict_obj1280_Node_ID_of_the_SDO_Server = 0x40;	/* 64 */
peter
parents:
diff changeset
   152
                    subindex ObjDict_Index1280[] = 
peter
parents:
diff changeset
   153
                     {
peter
parents:
diff changeset
   154
                       { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1280 },
peter
parents:
diff changeset
   155
                       { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1280_COB_ID_Client_to_Server_Transmit_SDO },
peter
parents:
diff changeset
   156
                       { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1280_COB_ID_Server_to_Client_Receive_SDO },
peter
parents:
diff changeset
   157
                       { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1280_Node_ID_of_the_SDO_Server }
peter
parents:
diff changeset
   158
                     };
peter
parents:
diff changeset
   159
peter
parents:
diff changeset
   160
/* index 0x1400 :   Receive PDO 1 Parameter. */
peter
parents:
diff changeset
   161
                    UNS8 ObjDict_highestSubIndex_obj1400 = 5; /* number of subindex - 1*/
peter
parents:
diff changeset
   162
                    UNS32 ObjDict_obj1400_COB_ID_used_by_PDO = 0x181;	/* 385 */
peter
parents:
diff changeset
   163
                    UNS8 ObjDict_obj1400_Transmission_Type = 0x1;	/* 1 */
peter
parents:
diff changeset
   164
                    UNS16 ObjDict_obj1400_Inhibit_Time = 0x0;	/* 0 */
peter
parents:
diff changeset
   165
                    UNS8 ObjDict_obj1400_Compatibility_Entry = 0x0;	/* 0 */
peter
parents:
diff changeset
   166
                    UNS16 ObjDict_obj1400_Event_Timer = 0x0;	/* 0 */
peter
parents:
diff changeset
   167
                    subindex ObjDict_Index1400[] = 
peter
parents:
diff changeset
   168
                     {
peter
parents:
diff changeset
   169
                       { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1400 },
peter
parents:
diff changeset
   170
                       { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1400_COB_ID_used_by_PDO },
peter
parents:
diff changeset
   171
                       { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1400_Transmission_Type },
peter
parents:
diff changeset
   172
                       { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1400_Inhibit_Time },
peter
parents:
diff changeset
   173
                       { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1400_Compatibility_Entry },
peter
parents:
diff changeset
   174
                       { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1400_Event_Timer }
peter
parents:
diff changeset
   175
                     };
peter
parents:
diff changeset
   176
peter
parents:
diff changeset
   177
/* index 0x1600 :   Receive PDO 1 Mapping. */
peter
parents:
diff changeset
   178
                    UNS8 ObjDict_highestSubIndex_obj1600 = 1; /* number of subindex - 1*/
peter
parents:
diff changeset
   179
                    UNS32 ObjDict_obj1600[] = 
peter
parents:
diff changeset
   180
                    {
peter
parents:
diff changeset
   181
                      0x20000008	/* 536870920 */
peter
parents:
diff changeset
   182
                    };
peter
parents:
diff changeset
   183
                    subindex ObjDict_Index1600[] = 
peter
parents:
diff changeset
   184
                     {
peter
parents:
diff changeset
   185
                       { RW, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1600 },
peter
parents:
diff changeset
   186
                       { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1600[0] }
peter
parents:
diff changeset
   187
                     };
peter
parents:
diff changeset
   188
peter
parents:
diff changeset
   189
/* index 0x1800 :   Transmit PDO 1 Parameter. */
peter
parents:
diff changeset
   190
                    UNS8 ObjDict_highestSubIndex_obj1800 = 5; /* number of subindex - 1*/
peter
parents:
diff changeset
   191
                    UNS32 ObjDict_obj1800_COB_ID_used_by_PDO = 0x201;	/* 513 */
peter
parents:
diff changeset
   192
                    UNS8 ObjDict_obj1800_Transmission_Type = 0xFF;	/* 255 */
peter
parents:
diff changeset
   193
                    UNS16 ObjDict_obj1800_Inhibit_Time = 0x0;	/* 0 */
peter
parents:
diff changeset
   194
                    UNS8 ObjDict_obj1800_Compatibility_Entry = 0x0;	/* 0 */
peter
parents:
diff changeset
   195
                    UNS16 ObjDict_obj1800_Event_Timer = 0x0;	/* 0 */
peter
parents:
diff changeset
   196
                    ODCallback_t ObjDict_Index1800_callbacks[] = 
peter
parents:
diff changeset
   197
                     {
peter
parents:
diff changeset
   198
                       NULL,
peter
parents:
diff changeset
   199
                       NULL,
peter
parents:
diff changeset
   200
                       NULL,
peter
parents:
diff changeset
   201
                       NULL,
peter
parents:
diff changeset
   202
                       NULL,
peter
parents:
diff changeset
   203
                       NULL,
peter
parents:
diff changeset
   204
                     };
peter
parents:
diff changeset
   205
                    subindex ObjDict_Index1800[] = 
peter
parents:
diff changeset
   206
                     {
peter
parents:
diff changeset
   207
                       { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1800 },
peter
parents:
diff changeset
   208
                       { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1800_COB_ID_used_by_PDO },
peter
parents:
diff changeset
   209
                       { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1800_Transmission_Type },
peter
parents:
diff changeset
   210
                       { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1800_Inhibit_Time },
peter
parents:
diff changeset
   211
                       { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1800_Compatibility_Entry },
peter
parents:
diff changeset
   212
                       { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1800_Event_Timer }
peter
parents:
diff changeset
   213
                     };
peter
parents:
diff changeset
   214
peter
parents:
diff changeset
   215
/* index 0x1A00 :   Transmit PDO 1 Mapping. */
peter
parents:
diff changeset
   216
                    UNS8 ObjDict_highestSubIndex_obj1A00 = 1; /* number of subindex - 1*/
peter
parents:
diff changeset
   217
                    UNS32 ObjDict_obj1A00[] = 
peter
parents:
diff changeset
   218
                    {
peter
parents:
diff changeset
   219
                      0x21000008	/* 553648136 */
peter
parents:
diff changeset
   220
                    };
peter
parents:
diff changeset
   221
                    subindex ObjDict_Index1A00[] = 
peter
parents:
diff changeset
   222
                     {
peter
parents:
diff changeset
   223
                       { RW, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1A00 },
peter
parents:
diff changeset
   224
                       { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A00[0] }
peter
parents:
diff changeset
   225
                     };
peter
parents:
diff changeset
   226
peter
parents:
diff changeset
   227
/* index 0x2000 :   Mapped variable DI1 */
peter
parents:
diff changeset
   228
                    subindex ObjDict_Index2000[] = 
peter
parents:
diff changeset
   229
                     {
peter
parents:
diff changeset
   230
                       { RW, uint8, sizeof (UNS8), (void*)&DI1 }
peter
parents:
diff changeset
   231
                     };
peter
parents:
diff changeset
   232
peter
parents:
diff changeset
   233
/* index 0x2001 :   Mapped variable DI2 */
peter
parents:
diff changeset
   234
                    subindex ObjDict_Index2001[] = 
peter
parents:
diff changeset
   235
                     {
peter
parents:
diff changeset
   236
                       { RW, uint8, sizeof (UNS8), (void*)&DI2 }
peter
parents:
diff changeset
   237
                     };
peter
parents:
diff changeset
   238
peter
parents:
diff changeset
   239
/* index 0x2100 :   Mapped variable DO1 */
peter
parents:
diff changeset
   240
                    subindex ObjDict_Index2100[] = 
peter
parents:
diff changeset
   241
                     {
peter
parents:
diff changeset
   242
                       { RW, uint8, sizeof (UNS8), (void*)&DO1 }
peter
parents:
diff changeset
   243
                     };
peter
parents:
diff changeset
   244
peter
parents:
diff changeset
   245
/* index 0x2101 :   Mapped variable DO2 */
peter
parents:
diff changeset
   246
                    subindex ObjDict_Index2101[] = 
peter
parents:
diff changeset
   247
                     {
peter
parents:
diff changeset
   248
                       { RW, uint8, sizeof (UNS8), (void*)&DO2 }
peter
parents:
diff changeset
   249
                     };
peter
parents:
diff changeset
   250
peter
parents:
diff changeset
   251
const indextable ObjDict_objdict[] = 
peter
parents:
diff changeset
   252
{
peter
parents:
diff changeset
   253
  { (subindex*)ObjDict_Index1000,sizeof(ObjDict_Index1000)/sizeof(ObjDict_Index1000[0]), 0x1000},
peter
parents:
diff changeset
   254
  { (subindex*)ObjDict_Index1001,sizeof(ObjDict_Index1001)/sizeof(ObjDict_Index1001[0]), 0x1001},
peter
parents:
diff changeset
   255
  { (subindex*)ObjDict_Index1005,sizeof(ObjDict_Index1005)/sizeof(ObjDict_Index1005[0]), 0x1005},
peter
parents:
diff changeset
   256
  { (subindex*)ObjDict_Index1006,sizeof(ObjDict_Index1006)/sizeof(ObjDict_Index1006[0]), 0x1006},
peter
parents:
diff changeset
   257
  { (subindex*)ObjDict_Index1016,sizeof(ObjDict_Index1016)/sizeof(ObjDict_Index1016[0]), 0x1016},
peter
parents:
diff changeset
   258
  { (subindex*)ObjDict_Index1018,sizeof(ObjDict_Index1018)/sizeof(ObjDict_Index1018[0]), 0x1018},
peter
parents:
diff changeset
   259
  { (subindex*)ObjDict_Index1200,sizeof(ObjDict_Index1200)/sizeof(ObjDict_Index1200[0]), 0x1200},
peter
parents:
diff changeset
   260
  { (subindex*)ObjDict_Index1280,sizeof(ObjDict_Index1280)/sizeof(ObjDict_Index1280[0]), 0x1280},
peter
parents:
diff changeset
   261
  { (subindex*)ObjDict_Index1400,sizeof(ObjDict_Index1400)/sizeof(ObjDict_Index1400[0]), 0x1400},
peter
parents:
diff changeset
   262
  { (subindex*)ObjDict_Index1600,sizeof(ObjDict_Index1600)/sizeof(ObjDict_Index1600[0]), 0x1600},
peter
parents:
diff changeset
   263
  { (subindex*)ObjDict_Index1800,sizeof(ObjDict_Index1800)/sizeof(ObjDict_Index1800[0]), 0x1800},
peter
parents:
diff changeset
   264
  { (subindex*)ObjDict_Index1A00,sizeof(ObjDict_Index1A00)/sizeof(ObjDict_Index1A00[0]), 0x1A00},
peter
parents:
diff changeset
   265
  { (subindex*)ObjDict_Index2000,sizeof(ObjDict_Index2000)/sizeof(ObjDict_Index2000[0]), 0x2000},
peter
parents:
diff changeset
   266
  { (subindex*)ObjDict_Index2001,sizeof(ObjDict_Index2001)/sizeof(ObjDict_Index2001[0]), 0x2001},
peter
parents:
diff changeset
   267
  { (subindex*)ObjDict_Index2100,sizeof(ObjDict_Index2100)/sizeof(ObjDict_Index2100[0]), 0x2100},
peter
parents:
diff changeset
   268
  { (subindex*)ObjDict_Index2101,sizeof(ObjDict_Index2101)/sizeof(ObjDict_Index2101[0]), 0x2101},
peter
parents:
diff changeset
   269
};
peter
parents:
diff changeset
   270
peter
parents:
diff changeset
   271
const indextable * ObjDict_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks)
peter
parents:
diff changeset
   272
{
peter
parents:
diff changeset
   273
	int i;
peter
parents:
diff changeset
   274
	*callbacks = NULL;
peter
parents:
diff changeset
   275
	switch(wIndex){
peter
parents:
diff changeset
   276
		case 0x1000: i = 0;break;
peter
parents:
diff changeset
   277
		case 0x1001: i = 1;break;
peter
parents:
diff changeset
   278
		case 0x1005: i = 2;*callbacks = ObjDict_Index1005_callbacks; break;
peter
parents:
diff changeset
   279
		case 0x1006: i = 3;*callbacks = ObjDict_Index1006_callbacks; break;
peter
parents:
diff changeset
   280
		case 0x1016: i = 4;break;
peter
parents:
diff changeset
   281
		case 0x1018: i = 5;break;
peter
parents:
diff changeset
   282
		case 0x1200: i = 6;break;
peter
parents:
diff changeset
   283
		case 0x1280: i = 7;break;
peter
parents:
diff changeset
   284
		case 0x1400: i = 8;break;
peter
parents:
diff changeset
   285
		case 0x1600: i = 9;break;
peter
parents:
diff changeset
   286
		case 0x1800: i = 10;*callbacks = ObjDict_Index1800_callbacks; break;
peter
parents:
diff changeset
   287
		case 0x1A00: i = 11;break;
peter
parents:
diff changeset
   288
		case 0x2000: i = 12;break;
peter
parents:
diff changeset
   289
		case 0x2001: i = 13;break;
peter
parents:
diff changeset
   290
		case 0x2100: i = 14;break;
peter
parents:
diff changeset
   291
		case 0x2101: i = 15;break;
peter
parents:
diff changeset
   292
		default:
peter
parents:
diff changeset
   293
			*errorCode = OD_NO_SUCH_OBJECT;
peter
parents:
diff changeset
   294
			return NULL;
peter
parents:
diff changeset
   295
	}
peter
parents:
diff changeset
   296
	*errorCode = OD_SUCCESSFUL;
peter
parents:
diff changeset
   297
	return &ObjDict_objdict[i];
peter
parents:
diff changeset
   298
}
peter
parents:
diff changeset
   299
peter
parents:
diff changeset
   300
/* 
peter
parents:
diff changeset
   301
 * To count at which received SYNC a PDO must be sent.
peter
parents:
diff changeset
   302
 * Even if no pdoTransmit are defined, at least one entry is computed
peter
parents:
diff changeset
   303
 * for compilations issues.
peter
parents:
diff changeset
   304
 */
peter
parents:
diff changeset
   305
s_PDO_status ObjDict_PDO_status[1] = {s_PDO_status_Initializer};
peter
parents:
diff changeset
   306
peter
parents:
diff changeset
   307
quick_index ObjDict_firstIndex = {
peter
parents:
diff changeset
   308
  6, /* SDO_SVR */
peter
parents:
diff changeset
   309
  7, /* SDO_CLT */
peter
parents:
diff changeset
   310
  8, /* PDO_RCV */
peter
parents:
diff changeset
   311
  9, /* PDO_RCV_MAP */
peter
parents:
diff changeset
   312
  10, /* PDO_TRS */
peter
parents:
diff changeset
   313
  11 /* PDO_TRS_MAP */
peter
parents:
diff changeset
   314
};
peter
parents:
diff changeset
   315
peter
parents:
diff changeset
   316
quick_index ObjDict_lastIndex = {
peter
parents:
diff changeset
   317
  6, /* SDO_SVR */
peter
parents:
diff changeset
   318
  7, /* SDO_CLT */
peter
parents:
diff changeset
   319
  8, /* PDO_RCV */
peter
parents:
diff changeset
   320
  9, /* PDO_RCV_MAP */
peter
parents:
diff changeset
   321
  10, /* PDO_TRS */
peter
parents:
diff changeset
   322
  11 /* PDO_TRS_MAP */
peter
parents:
diff changeset
   323
};
peter
parents:
diff changeset
   324
peter
parents:
diff changeset
   325
UNS16 ObjDict_ObjdictSize = sizeof(ObjDict_objdict)/sizeof(ObjDict_objdict[0]); 
peter
parents:
diff changeset
   326
peter
parents:
diff changeset
   327
CO_Data ObjDict_Data = CANOPEN_NODE_DATA_INITIALIZER(ObjDict);
peter
parents:
diff changeset
   328