| 269 | } |
| 270 | |
| 271 | uint32_t |
| 272 | OD_getSDOabCode(ODR_t returnCode) { |
| 273 | static const uint32_t abortCodes[(uint8_t)ODR_COUNT] = { |
| 274 | 0x00000000UL, /* No abort */ |
| 275 | 0x05040005UL, /* Out of memory */ |
| 276 | 0x06010000UL, /* Unsupported access to an object */ |
| 277 | 0x06010001UL, /* Attempt to read a write only object */ |
| 278 | 0x06010002UL, /* Attempt to write a read only object */ |
| 279 | 0x06020000UL, /* Object does not exist in the object dictionary */ |
| 280 | 0x06040041UL, /* Object cannot be mapped to the PDO */ |
| 281 | 0x06040042UL, /* Num and len of object to be mapped exceeds PDO len */ |
| 282 | 0x06040043UL, /* General parameter incompatibility reasons */ |
| 283 | 0x06040047UL, /* General internal incompatibility in device */ |
| 284 | 0x06060000UL, /* Access failed due to hardware error */ |
| 285 | 0x06070010UL, /* Data type does not match, length does not match */ |
| 286 | 0x06070012UL, /* Data type does not match, length too high */ |
| 287 | 0x06070013UL, /* Data type does not match, length too short */ |
| 288 | 0x06090011UL, /* Sub index does not exist */ |
| 289 | 0x06090030UL, /* Invalid value for parameter (download only). */ |
| 290 | 0x06090031UL, /* Value range of parameter written too high */ |
| 291 | 0x06090032UL, /* Value range of parameter written too low */ |
| 292 | 0x06090036UL, /* Maximum value is less than minimum value. */ |
| 293 | 0x060A0023UL, /* Resource not available: SDO connection */ |
| 294 | 0x08000000UL, /* General error */ |
| 295 | 0x08000020UL, /* Data cannot be transferred or stored to application */ |
| 296 | 0x08000021UL, /* Data cannot be transferred because of local control */ |
| 297 | 0x08000022UL, /* Data cannot be tran. because of present device state */ |
| 298 | 0x08000023UL, /* Object dict. not present or dynamic generation fails */ |
| 299 | 0x08000024UL /* No data available */ |
| 300 | }; |
| 301 | |
| 302 | return ((returnCode < ODR_OK) || (returnCode >= ODR_COUNT)) ? abortCodes[ODR_DEV_INCOMPAT] : abortCodes[returnCode]; |
| 303 | } |
| 304 | |
| 305 | ODR_t |
| 306 | OD_get_value(const OD_entry_t* entry, uint8_t subIndex, void* val, OD_size_t len, bool_t odOrig) { |
no outgoing calls
no test coverage detected