equal
deleted
inserted
replaced
115 id << "slave_" << dec << slave.position << "_"; |
115 id << "slave_" << dec << slave.position << "_"; |
116 |
116 |
117 for (i = 0; i < slave.sync_count; i++) { |
117 for (i = 0; i < slave.sync_count; i++) { |
118 m.getSync(&sync, slave.position, i); |
118 m.getSync(&sync, slave.position, i); |
119 |
119 |
120 syncs << " {" << dec << sync.sync_index |
120 syncs << " {" << dec << sync.sync_index |
121 << ", " << (EC_READ_BIT(&sync.control_register, 2) ? |
121 << ", " << (EC_READ_BIT(&sync.control_register, 2) ? |
122 "EC_DIR_OUTPUT" : "EC_DIR_INPUT") |
122 "EC_DIR_OUTPUT" : "EC_DIR_INPUT") |
123 << ", " << dec << (unsigned int) sync.pdo_count |
123 << ", " << dec << (unsigned int) sync.pdo_count |
124 << ", "; |
124 << ", "; |
125 if (sync.pdo_count) { |
125 if (sync.pdo_count) { |
134 pdo_pos += sync.pdo_count; |
134 pdo_pos += sync.pdo_count; |
135 |
135 |
136 for (j = 0; j < sync.pdo_count; j++) { |
136 for (j = 0; j < sync.pdo_count; j++) { |
137 m.getPdo(&pdo, slave.position, i, j); |
137 m.getPdo(&pdo, slave.position, i, j); |
138 |
138 |
139 pdos << " {0x" << hex << setfill('0') |
139 pdos << " {0x" << hex << setfill('0') |
140 << setw(4) << pdo.index |
140 << setw(4) << pdo.index |
141 << ", " << dec << (unsigned int) pdo.entry_count |
141 << ", " << dec << (unsigned int) pdo.entry_count |
142 << ", "; |
142 << ", "; |
143 if (pdo.entry_count) { |
143 if (pdo.entry_count) { |
144 pdos << id.str() << "pdo_entries + " << dec << entry_pos; |
144 pdos << id.str() << "pdo_entries + " << dec << entry_pos; |
153 entry_pos += pdo.entry_count; |
153 entry_pos += pdo.entry_count; |
154 |
154 |
155 for (k = 0; k < pdo.entry_count; k++) { |
155 for (k = 0; k < pdo.entry_count; k++) { |
156 m.getPdoEntry(&entry, slave.position, i, j, k); |
156 m.getPdoEntry(&entry, slave.position, i, j, k); |
157 |
157 |
158 entries << " {0x" << hex << setfill('0') |
158 entries << " {0x" << hex << setfill('0') |
159 << setw(4) << entry.index |
159 << setw(4) << entry.index |
160 << ", 0x" << setw(2) << (unsigned int) entry.subindex |
160 << ", 0x" << setw(2) << (unsigned int) entry.subindex |
161 << ", " << dec << (unsigned int) entry.bit_length |
161 << ", " << dec << (unsigned int) entry.bit_length |
162 << "},"; |
162 << "},"; |
163 if (strlen((const char *) entry.name)) { |
163 if (strlen((const char *) entry.name)) { |
199 << endl; |
199 << endl; |
200 } |
200 } |
201 |
201 |
202 cout << "ec_sync_info_t " << id.str() << "syncs[] = {" << endl |
202 cout << "ec_sync_info_t " << id.str() << "syncs[] = {" << endl |
203 << syncs.str() |
203 << syncs.str() |
|
204 << " {0xff}" << endl |
204 << "};" << endl |
205 << "};" << endl |
205 << endl; |
206 << endl; |
206 } |
207 } |
207 |
208 |
208 /*****************************************************************************/ |
209 /*****************************************************************************/ |