1
0
Fork 0

Merge pull request #425 from ankitemb/master

Fix variable name and use of pointer for big endian system
This commit is contained in:
Janez 2023-02-24 10:07:39 +01:00 committed by GitHub
commit ead2845ea5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -1266,8 +1266,8 @@ static CO_ReturnError_t CO_TPDOsend(CO_TPDO_t *TPDO) {
/* swap multibyte data if big-endian */
#ifdef CO_BIG_ENDIAN
if ((stream->attribute & ODA_MB) != 0) {
uint8_t *lo = dataOD;
uint8_t *hi = dataOD + ODdataLength - 1;
uint8_t *lo = dataTPDOCopy;
uint8_t *hi = dataTPDOCopy + ODdataLength - 1;
while (lo < hi) {
uint8_t swap = *lo;
*lo++ = *hi;

View file

@ -661,7 +661,7 @@ static bool_t readFromOd(CO_SDOserver_t *SDO,
reverseBytes(bufShifted, countRd);
}
else {
abortCode = CO_SDO_AB_PRAM_INCOMPAT;
*abortCode = CO_SDO_AB_PRAM_INCOMPAT;
SDO->state = CO_SDO_ST_ABORT;
return false;
}