-
Notifications
You must be signed in to change notification settings - Fork 1
/
coe_h.mustache
71 lines (61 loc) · 2 KB
/
coe_h.mustache
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
/**
* @file {{basename}}
* @author {{appname}}
* @date {{date}}
* @brief Sample EtherCAT CoE declarations.
*
* Automatically generated by {{appname}}
* All edits will be destroyed
*/
#ifndef G5IM_COE_H
#define G5IM_COE_H
#include "objdef.h"
#include "tieschw.h"
extern const unsigned char esc_eeprom[];
{{#pdos}}
/******************************************************************************
* Object 0x{{hex_index}}: {{description}}
******************************************************************************/
extern const TSDOINFOENTRYDESC asEntryDesc0x{{hex_index}}[];
extern const UCHAR aName0x{{hex_index}}[];
{{^merge?}}
typedef struct STRUCT_PACKED_START {
{{#subs}}
{{ctype}};
{{/subs}}} STRUCT_PACKED_END TOBJ{{hex_index}}; // data size:{{pdo_data_bitsize}}
extern TOBJ{{hex_index}} {{symbol}};
{{/merge?}}
{{#merge0?}}
typedef struct STRUCT_PACKED_START {
{{#subs}}
{{ctype}};
{{/subs}}} STRUCT_PACKED_END {{merge_base_name}}_type; // data size:{{pdo_data_bitsize}}
extern {{merge_base_name}}_type {{merge_base_name}}[{{merge_size}}];
{{/merge0?}}{{#merge?}}// Object 0x{{hex_index}} is stored in {{merge_base_name}}[{{merge_index}}]{{/merge?}}
{{/pdos}}
extern TOBJECT ApplicationObjDic[];
/**
* @brief Reset (RxPDO) outputs.
*
* Resets the RxPDO data coming from the master to the default state.
*/
void PDO_ResetOutputs(void);
/**
* @brief Copy internal input data structures to PDO buffer
*
* Scans the TxPDO assign map and copies specified PDO data to
* supplied PDO buffer for transmission via the hardware.
*
* @param pData A pointer to the target buffer
*/
void APPL_InputMapping(void* pData);
/**
* @brief Copy PDO buffer to internal output data structures
*
* Scans the RxPDO assign map and copies PDO buffer to specified
* internal output PDO data.
*
* @param pData A pointer to the buffer from which to read the data
*/
void APPL_OutputMapping(void* pData);
#endif // G5IM_COE_H