1
0
Fork 0
Commit graph

40 commits

Author SHA1 Message Date
Janez
8c09a433ef Fix CANopen terminology: “CAN messages” are actually “CAN frames”
Fix all documentation and comments according to CiA proposals:
https://www.can-cia.org/services/publications/can-community-news/05-2025

CANopenNode was using "CAN message" in many places, but actually such
term is incorrect. No code or variable names was changed.
2026-06-26 10:23:01 +02:00
Janez
835bae5664 CO_SYNC: bugfix, if CO_CONFIG_FLAG_OD_DYNAMIC is disabled. 2024-07-13 15:29:58 +02:00
Janez
82c95a2bc9 Format comments in the .c files. 2024-07-06 21:48:21 +02:00
Janez
95c1705e76 Format the .c files using clang-format v15. 2024-07-06 19:57:06 +02:00
Janez
0d016a0019 Remove /*********...*/ comment delimiters. 2024-07-06 18:53:40 +02:00
Janez
f064eeaa40 Format the license information in files. 2024-07-06 13:03:00 +02:00
Janez
fcd89f87de Remove comments from arguments in CO_CANrxBufferInit and CO_CANtxBufferInit 2024-07-05 18:38:01 +02:00
temi54c1l8
4ae66f9839 CO_SYNC: static analysis: ignoring return value of function 'CO_SYNCsend' [MISRA 2012 Directive 4.7, required], [MISRA 2012 Rule 17.7, required] 2024-06-27 12:58:54 +02:00
temi54c1l8
995fed609d CO_SYNC: static analysis: an unsigned value and a signed value cannot be used together [MISRA 2012 Rule 10.4, required] 2024-06-27 12:58:02 +02:00
temi54c1l8
d6b3163311 CO_SYNC: static analysis: dependence placed on operator precedence [MISRA 2012 Rule 12.1, advisory] 2024-06-27 12:53:30 +02:00
temi54c1l8
f684b34a03 CO_SYNC: static analysis: no 'else' at end of 'if ... else if' chain [MISRA 2012 Rule 15.7, required] 2024-06-27 12:51:06 +02:00
temi54c1l8
f9d8bdeff3 static analysys: local variable 'data' could be pointer to const [MISRA 2012 Rule 8.13, advisory]
refactory CO_CANrxMsg_readData return const
2024-06-14 11:27:22 +02:00
temi54c1l8
860a36c85f CO_SYNC: static analysis: unsigned integer literal without a 'U' suffix [MISRA 2012 Rule 7.2, required] 2024-06-13 13:46:27 +02:00
temi54c1l8
64934d7903 CO_SYNC: static analysis: cannot assign 'unsigned32' to narrower essential type 'unsigned16' [MISRA 2012 Rule 10.3, required] 2024-06-13 13:44:11 +02:00
temi54c1l8
7855d35bae static analysis: refactoring changed enum with define to be able to use bitwise operators 2024-06-12 13:41:13 +02:00
temi54c1l8
6e009c0893 static analysis: cannot assign 'signed8' to different essential type 'boolean' [MISRA 2012 Rule 10.3, required] 2024-06-12 10:42:40 +02:00
temi54c1l8
d4e7214f4d static analysis: conditional of #if does not evaluate to 0 or 1 [MISRA 2012 Rule 20.8, required] 2024-06-12 09:09:12 +02:00
temi54c1l8
7399d31447 static analysis: ignoring return value of function 'OD_extension_init' [MISRA 2012 Directive 4.7, required], [MISRA 2012 Rule 17.7, required]
ignores the return because it was checked on the function argument
2024-06-11 15:09:49 +02:00
temi54c1l8
0142f41857 static analysis: an enum value is not an appropriate left operand [MISRA 2012 Rule 10.1, required] 2024-06-10 17:59:05 +02:00
temi54c1l8
446925be63 static analysis: add 'U' of unsigned [MISRA 2012 Rule 10.4, required] 2024-06-10 17:57:42 +02:00
temi54c1l8
dc10900ad5 static analysis: Aggiunte parentesi per la dipendenza posta sulla precedenza dell'operatore [MISRA 2012 Rule 12.1, advisory] 2024-06-10 14:39:05 +02:00
temi54c1l8
e3206f2c7f static analysis: Ignoring return value of function 'memset' [MISRA 2012 Directive 4.7, required] 2024-06-10 11:56:47 +02:00
Brian Linari
a52db428f6
Misra (#501)
Make MISRA compliant for:
MISRA C 2004 rule 14.10
MISRA C 2004 rule 14.9
MISRA C 2004 rule 13.1
MISRA C 2004 rule 15.3

MISRA style guild update
2024-03-13 17:20:42 +01:00
Janez
fe3777b781 Verify for restricted CAN-IDs in SYNC, TIME, EMCY, PDO and SDO COB-ID configuration. 2021-08-09 14:12:19 +02:00
Janez
3ff84e21ff Fix some SDO abort messages. 2021-08-09 14:06:08 +02:00
Janez
66d0e14ef4 301/CO_PDO.h/c updated to newOD. 2021-03-18 15:13:06 +01:00
Janez
f8eb4bc0a1 CO_ODinterface: simplified API to read/write functions. Return variables changed. 2021-03-12 11:42:34 +01:00
Janez
5b8be4ef7e CO_ODinterface: simplified API to read/write functions. subIndex moved to OD_stream_t. 2021-03-10 15:22:03 +01:00
Janez
9b3f329d52 301/CO_SYNC.h/c updated to newOD. 2021-03-01 17:16:04 +01:00
Janez
1385c763aa small fix 2020-09-29 12:26:26 +02:00
Wilkins White
28925a4e3c
Add CO_SYNCsend() (#225)
* add CO_SYNCsend function

* change return type of CO_TPDOsend
2020-09-29 09:24:21 +02:00
Carsten Frank
87b293b3e6
Do ErrorReset of SYNC timeout (#220) 2020-09-29 09:19:06 +02:00
Janez
a528eb1669 Better organised configuration macros (CO_config.h):
- 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
2020-09-14 15:50:21 +02:00
Freddie Chopin
7c13199a1a Fix all possible warnings about unused timerNext_us argument 2020-06-26 11:56:46 +02:00
Paolo Teti
61fc785fab
CO_SYNC_process: use enums instead of uint8_t (#182)
Replace hard-coded values with enums and explicit manage all enumeration
values in CO_process_SYNC() to avoid warnings like this:

CANopen.c:837:5: warning: enumeration value ‘CO_SYNC_NONE’ not handled in switch [-Wswitch]
  837 |     switch (sync_process) {
      |     ^~~~~~
2020-05-12 17:35:16 +02:00
Freddie Chopin
aa6075b3c8
Add CO_..._initCallbackPre() for RPDO and SYNC (#178)
* Merge two parts of CO_PDO_receive() into single common code

* Add CO_RPDO_initCallbackPre() for received RPDO messages

This optional mechanism allows to immediatelly wake the thread that
processes RPDO, without waiting for its next tick.

* Add CO_SYNC_initCallbackPre() for received SYNC messages

This optional mechanism allows to immediatelly wake the thread that
processes SYNC, without waiting for its next tick.
2020-05-05 13:23:26 +02:00
Janez
6e28914ca9 Make calculation of timerNext_us optional. 2020-03-20 16:44:37 +01:00
Janez
d9c44c69d1 Change non-descriptive CO_***_initCallback() into CO_***_initCallbackPre().
Change CO_NMT_initCallback() into CO_NMT_initCallbackChange().
Change type of NMT->operatingState from uint8_t into enum CO_NMT_internalState_t.
2020-03-18 23:19:29 +01:00
Janez
2f204a0c71 Verify return value from CO_CANrxBufferInit() and CO_CANtxBufferInit(). 2020-03-12 12:18:05 +01:00
Janez
62ffc7c9f5 Drivers removed from stack, directory structure rearranged.
- Change log added to README.
- Doxygen documentation updated.
2020-02-05 10:52:56 +01:00
Renamed from stack/CO_SYNC.c (Browse further)