- rearranged and better documented
- default values moved from CO_driver.h into appropriate files
- rearranged also in CO_driver_target.h files
- parts of the stack or whole objects can be disabled.
- configuration is verified for depencies
Additional:
- renamed some members of CO_Default_CAN_ID_t
- moved helpers CO_setUint32() etc from CO_SDOserver.h into CO_driver.h.
- change wrong CO_ERROR_PARAMETERS to CO_ERROR_ILLEGAL_ARGUMENT.
- renamed CO_ERROR_PARAMETERS to CO_ERROR_OD_PARAMETERS
Before this patch SDO queue process pointer could overrun receive pointer on receiving NMT stop command during active SDO communication.
This fix is applied to 'master' and 'v1.3-master' branches.
GCC 10 static analyzer (-fanalyzer) warn about possible dereference
of NULL ‘ext’ on 'ext->pODFunc'.
This patch adds a guard on 'ext' to fix the issue.
* LLSMaster: replace explicit array element copy with memcpy()
Replace explicit array element copy with memcpy()
Signed-off-by: Paolo Teti <paolo.teti@gmail.com>
* SDO server: copy and zeroize arrays using memcpy() and memset()
* Replace array elements copy with memcpy().
* Clear response buffer using memset()
Signed-off-by: Paolo Teti <paolo.teti@gmail.com>
Function did not check whether the object had any flags assigned. It
makes no difference for objects with no subindexes, because then the
function will return NULL anyway. But is subIndex argument is not zero,
then the function calculates addresses of flags as offsets from NULL.
For example, for an object with no flags assigned, when subIndex == 5,
the function would return 5 as the address instead of the expected NULL.
* Use standard memcpy() instead of CO_memcpy()
* Remove CO_memcpy()
* Use standard memset() instead of CO_memset()
* Remove CO_memset()
* Move helper functions from CO_SDOserver.c to header and make them inline
* Implement CO_getUint16() with memcpy()
* Implement CO_getUint32() with memcpy()
* Implement CO_setUint16() with memcpy()
* Implement CO_setUint32() with memcpy()
* Define memcpy() as CO_memcpySwapX() for little-endian systems
* Fix several writes past the buffer due to hardcoded sizes
Use more "generic" sizes (via sizeof()) instead of hardcoded number in
all calls to memset() to avoid 1-byte errors which result in writes past
the buffer, for example:
memset(&LSSslave->TXbuff->data[5], 0, 4);
in CO_LSSslave_serviceInquire()
memset(&LSSmaster->TXbuff->data[6], 0, 3);
in CO_LSSmaster_switchStateSelectInitiate()
* Use "generic" size in calls to memcpy() where possible
* Remove CO_bytes_t
This type was used only for CO_{get,set}Uint{16,32}().
This is the same as pull request #171, but applied to split-driver branch.
Original author: Oleg <ev.mipt@gmail.com>
Now additional state CO_SDO_ST_DOWNLOAD_BL_SUB_RESP_2 is used to send response without resetting SDO sequence.
Refactoring timeout halding logic in sub-block transfer.
Also add missed unsigned indicators for several constants.
issue #170
Interface to CO_SDOclientDownloadInitiate and CO_SDOclientUploadInitiate
changed (added optional *timerNext_us argument). Little corrections in
documentation for CO_SDOclient.h