# HG changeset patch # User Florian Pose # Date 1203412873 0 # Node ID 3b297ff8284f76088aca58c6b80772738068f30b # Parent 3778920f61e49975074f374b36737720bfdf80d3 Fixed Pdo configuration information providing. diff -r 3778920f61e4 -r 3b297ff8284f examples/mini/mini.c --- a/examples/mini/mini.c Tue Feb 19 08:22:20 2008 +0000 +++ b/examples/mini/mini.c Tue Feb 19 09:21:13 2008 +0000 @@ -64,9 +64,19 @@ #endif #ifdef MAPPING +const ec_pdo_entry_info_t el3162_channel1[] = { + {0x3101, 1, 8}, // status + {0x3101, 2, 16} // value +}; + +const ec_pdo_entry_info_t el3162_channel2[] = { + {0x3102, 1, 8}, // status + {0x3102, 2, 16} // value +}; + const ec_pdo_info_t mapping[] = { - {EC_DIR_INPUT, 0x1A00}, // channel 1 - {EC_DIR_INPUT, 0x1A01} // channel 2 + {EC_DIR_INPUT, 0x1A00, 2, el3162_channel1}, + {EC_DIR_INPUT, 0x1A01, 2, el3162_channel2}, }; #endif diff -r 3778920f61e4 -r 3b297ff8284f include/ecrt.h --- a/include/ecrt.h Tue Feb 19 08:22:20 2008 +0000 +++ b/include/ecrt.h Tue Feb 19 09:21:13 2008 +0000 @@ -221,7 +221,9 @@ unsigned int n_entries; /**< Number of Pdo entries for the Pdo configuration. Zero means, that the default Pdo configuration shall be used. */ - const ec_pdo_entry_info_t entries[]; /**< Pdo configuration list. */ + const ec_pdo_entry_info_t *entries; /**< Pdo configuration array. This + array must contain at least \a + n_entries values. */ } ec_pdo_info_t; /*****************************************************************************/ diff -r 3778920f61e4 -r 3b297ff8284f master/pdo_mapping.c --- a/master/pdo_mapping.c Tue Feb 19 08:22:20 2008 +0000 +++ b/master/pdo_mapping.c Tue Feb 19 09:21:13 2008 +0000 @@ -185,7 +185,7 @@ if (config->master->debug_level) EC_INFO("Adding Pdo 0x%04X to mapping.\n", pdo->index); - if (pdo_info->n_entries) { // Pdo configuration provided + if (pdo_info->n_entries && pdo_info->entries) { // configuration provided if (config->master->debug_level) EC_INFO(" Pdo configuration provided.\n");