CO_PDO: static analysis: last value assigned to 'odRet' not used [MISRA 2012 Rule 2.2, required]
This commit is contained in:
parent
d9d24ffe82
commit
32c1086ac1
1 changed files with 24 additions and 0 deletions
24
301/CO_PDO.c
24
301/CO_PDO.c
|
|
@ -740,6 +740,12 @@ CO_ReturnError_t CO_RPDO_init(CO_RPDO_t *RPDO,
|
|||
#if ((CO_CONFIG_PDO) & CO_CONFIG_RPDO_TIMERS_ENABLE) != 0
|
||||
uint16_t eventTime = 0;
|
||||
odRet = OD_get_u16(OD_14xx_RPDOCommPar, 5, &eventTime, true);
|
||||
if (odRet != ODR_OK) {
|
||||
if (errInfo != NULL) {
|
||||
*errInfo = (((uint32_t)OD_getIndex(OD_14xx_RPDOCommPar)) << 8) | 5U;
|
||||
}
|
||||
return CO_ERROR_OD_PARAMETERS;
|
||||
}
|
||||
RPDO->timeoutTime_us = (uint32_t)eventTime * 1000U;
|
||||
#endif
|
||||
|
||||
|
|
@ -1190,7 +1196,19 @@ CO_ReturnError_t CO_TPDO_init(CO_TPDO_t *TPDO,
|
|||
uint16_t inhibitTime = 0;
|
||||
uint16_t eventTime = 0;
|
||||
odRet = OD_get_u16(OD_18xx_TPDOCommPar, 3, &inhibitTime, true);
|
||||
if (odRet != ODR_OK) {
|
||||
if (errInfo != NULL) {
|
||||
*errInfo = (((uint32_t)OD_getIndex(OD_18xx_TPDOCommPar)) << 8) | 3U;
|
||||
}
|
||||
return CO_ERROR_OD_PARAMETERS;
|
||||
}
|
||||
odRet = OD_get_u16(OD_18xx_TPDOCommPar, 5, &eventTime, true);
|
||||
if (odRet != ODR_OK) {
|
||||
if (errInfo != NULL) {
|
||||
*errInfo = (((uint32_t)OD_getIndex(OD_18xx_TPDOCommPar)) << 8) | 5U;
|
||||
}
|
||||
return CO_ERROR_OD_PARAMETERS;
|
||||
}
|
||||
TPDO->inhibitTime_us = (uint32_t)inhibitTime * 100U;
|
||||
TPDO->eventTime_us = (uint32_t)eventTime * 1000U;
|
||||
#endif
|
||||
|
|
@ -1200,6 +1218,12 @@ CO_ReturnError_t CO_TPDO_init(CO_TPDO_t *TPDO,
|
|||
#if ((CO_CONFIG_PDO) & CO_CONFIG_PDO_SYNC_ENABLE) != 0
|
||||
TPDO->syncStartValue = 0;
|
||||
odRet = OD_get_u8(OD_18xx_TPDOCommPar, 6, &TPDO->syncStartValue, true);
|
||||
if (odRet != ODR_OK) {
|
||||
if (errInfo != NULL) {
|
||||
*errInfo = (((uint32_t)OD_getIndex(OD_18xx_TPDOCommPar)) << 8) | 6U;
|
||||
}
|
||||
return CO_ERROR_OD_PARAMETERS;
|
||||
}
|
||||
TPDO->SYNC = SYNC;
|
||||
TPDO->syncCounter = 255;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue