master/canopen.c
changeset 159 acb250c92896
parent 157 37c6dd0ff0b1
child 161 ddb7266d1c56
equal deleted inserted replaced
158:363412c9304e 159:acb250c92896
    72 
    72 
    73     if (EC_READ_U16(data) >> 12 != 0x3 || // SDO response
    73     if (EC_READ_U16(data) >> 12 != 0x3 || // SDO response
    74         EC_READ_U8 (data + 2) >> 5 != 0x2 || // Upload response
    74         EC_READ_U8 (data + 2) >> 5 != 0x2 || // Upload response
    75         EC_READ_U16(data + 3) != sdo_index || // Index
    75         EC_READ_U16(data + 3) != sdo_index || // Index
    76         EC_READ_U8 (data + 5) != sdo_subindex) { // Subindex
    76         EC_READ_U8 (data + 5) != sdo_subindex) { // Subindex
    77         EC_ERR("SDO upload 0x%04X:%X failed:\n",
    77         EC_ERR("SDO upload 0x%04X:%X failed:\n", sdo_index, sdo_subindex);
    78                sdo_index, sdo_subindex, slave->ring_position);
       
    79         EC_ERR("Invalid SDO upload response at slave %i!\n",
    78         EC_ERR("Invalid SDO upload response at slave %i!\n",
    80                slave->ring_position);
    79                slave->ring_position);
    81         ec_print_data(data, rec_size);
    80         ec_print_data(data, rec_size);
    82         return -1;
    81         return -1;
    83     }
    82     }