1
0
Fork 0
Commit graph

75 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
05931a6b76 Fix and update doxygen documentation. 2024-08-07 00:17:39 +02:00
Janez
f41bfdcb5d Format comments in the .h files. 2024-07-09 00:17:15 +02:00
Janez
b87fad2195 Format the .h files using clang-format v15. 2024-07-06 21:54:59 +02:00
Janez
f064eeaa40 Format the license information in files. 2024-07-06 13:03:00 +02:00
temi54c1l8
cff7a3cf5a static analysis: refactoring changed enum with define to be able to use bitwise operators on user space 2024-06-12 14:35:37 +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
Janez
f054501d0e SRDO updated to current CANopenNode 2024-05-31 01:47:28 +02:00
Janez
b0b0724c6f Node guarding added 2023-09-07 16:58:04 +02:00
Janez
b9927ff1cd Remove CO_CONFIG_EM_BUFFER_SIZE macro, size is fetched from Object Dictionary
It is necessary to re-generate OD.h file with the latest CANopenEditor
from https://github.com/CANopenNode/CANopenEditor
2021-06-28 12:39:03 +02:00
Janez
b8b9011f7f Remove CO_CONFIG_HB_CONS_SIZE macro, size is fetched from Object Dictionary
It is necessary to re-generate OD.h file with the latest CANopenEditor
from https://github.com/CANopenNode/CANopenEditor
2021-06-26 13:53:49 +02:00
Janez
f56c96db3c Documentation arrangement according to doxygen.
- Minor changes in most files
- add CANopenNode.png
- update doxyfile
- move doc/LSSusage.md and doc/gettingStarted.md into CANopenDemo repository
- update README.md
2021-05-17 13:29:13 +02:00
Janez
76b43c88ef Create 'storage' directory, move CO_storage.h/c, add CO_storageEeeprom.h/c 2021-05-05 10:28:05 +02:00
Janez
5e089ea025 Add missing NULL protection. 2021-05-04 11:26:40 +02:00
Janez
66d0e14ef4 301/CO_PDO.h/c updated to newOD. 2021-03-18 15:13:06 +01:00
Janez
3ee8725036 Simplify Data Storage
- remove CO_storage from CANopen.h/c (revert)
- add target specific CO_storage_entry_t into CO_driver(_target).h
2021-02-01 15:24:37 +01:00
Janez
49f7c80114 Heartbeat consumer updated to newOD 2021-01-30 14:40:27 +01:00
Janez
9dce037ecb Add data storage, common and Linux specific functions, tested in Linux. 2021-01-25 12:42:10 +01:00
Janez
5538b5e1f8 Remove CO_errinfo() from driver and put errInfo into CO_CANopenInit() as arg 2021-01-20 12:49:20 +01:00
Janez
51d64df860 OD interface simplified #162
OD_extension is now configurable by application only.
2021-01-07 08:34:53 +01:00
Janez
9e9fce74a9 Updates and testing of OD interface, SDO server, SDO client, gateway, etc.
- SDO server: Change behavior for string data type + fixes + test all
- SDO client: fixes + test all
- OD interface: Special behavior for string data type
- CO_driver.h: added default debug configuration macros + fix spelling
- Gateway + fifo: added base64 support + updates
- CO_CANopenInit() - added arguments.
- update some documentation
- CO_epoll_interface fixes.
- CO_main_basic.c updates
2020-12-24 14:15:10 +01:00
Janez
d224de0ac9 Make Linux canopend example single thread.
Include files optionally in CANopen.h
2020-11-28 12:20:43 +01:00
Janez
cf9fb2a547 Some updates in OD interface.
It matches newly generated OD.h and OD.c files from libedssharp
2020-10-21 11:29:03 +02:00
Janez
f73025ef65 CANopenNode V2.0 pre-release 2020-10-07 17:50:25 +02:00
Miles Simpson
05b488c45c
Added missing check for CO_NO_TIME definition to CANopen.h (#233) 2020-10-06 08:10:04 +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
gotocoffee
0f7b3e2d17
CANopen Safety (SRDO according to DIN EN 50325-5:2016) (#196)
* CANopen Safety (SRDO according to DIN EN 50325-5:2016)

* GFC code and docs

* clang-format on GFC

Co-authored-by: rg1 <r.gruening@miunske.com>
2020-06-22 10:14:14 +02:00
Janez
dd1677b5bc Integrate LSS slave into CANopenNode more directly.
- CO_LSSslave: move expensive code from CAN receive (interrupt) to mainline
  CO_LSSslave_process() function.
- LSS slave now runs in parallel to other CANopen objects.
- LSS slave and master can run both on same device.
- LSS slave, LSS master and gateway-ascii(CiA309) LSS functions tested.
- LSSusage.md updated.
2020-06-09 14:55:07 +02:00
Janez
bd3326fed9 Make own file for CANopen status LED diodesLED indicator indication
(CiA303-3) moved from NMT into own files. Now fully comply to standard.
2020-06-05 18:02:26 +02:00
Janez
229b5c5fd3 Change optional arguments in CO_RPDO_init(), CO_TPDO_init(), CO_GTWA_init() 2020-05-31 22:08:36 +02:00
Janez
92a803f169 Add LSS master into gateway-ascii (CiA309).
- Rename local variable 'token' into 'tok' in CO_GTWA_process().
- CO_LSSmaster: replace CO_LSSmaster_InquireNodeId() with more generic
  CO_LSSmaster_Inquire(). CiA309-3 command 'lss_inquire_addr' now works
  also according to standard.
- CANopen.h: fix doxygen.
- gettingStarted.md: Change example "master" device from node-Id=3 to 1...
2020-05-31 14:31:30 +02:00
Janez
ae220f9115 Configuration for LSS updated. 2020-05-29 09:56:05 +02:00
Janez
b5bfeec42a Added CANopen gateway-ascii command interface according to CiA309-3 as a
microcontroller independent module.
It includes NMT master, LSS master and SDO client interface.
Interface is non-blocking, it is added to mainline.
Example for Linux stdio and socket is included.

Added CO_fifo.h/c for fifo data buffer, used with rewritten SDO client, etc

SDO client is rewritten. Now includes r/w fifo interface to transfer data.

doc/gettingStarted.md is updated.
2020-05-12 18:11:43 +02:00
Janez
5a2a1e85cf Update configuration macros. SDO state machine preview. 2020-04-29 13:12:07 +02:00
Janez
c88194e813 Add Stack configuration macros to most of CANopenNode objects.
Add CO_NMT_initCallbackPre()
2020-03-19 18:07:23 +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
02e2cc5860 Stack configuration added do CO_driver.h
Change macro CO_USE_LEDS -> CO_CONFIG_NMT_LEDS 1
Change macro CO_SDO_BUFFER_SIZE -> CO_CONFIG_SDO_BUFFER_SIZE
2020-03-07 16:26:52 +01:00
Janez
a98492ecaf Add heapMemoryUsed info from CO_new() 2020-03-06 11:33:25 +01:00
Janez
9d17b0d671 socketCAN driver:
- Always enable CANptr and timestamp info in CO_CANrx_t.
- Update documentation
2020-02-29 22:34:48 +01:00
Janez
78487ba89f Clarify EM, SDOserver, SDOclient and LSSmaster callback functions.
callback functions called also from SDO_blockTransferInProgress.
Clarify timerNext_us parameter to CO_process() function.
2020-02-27 16:43:27 +01:00
Janez
3fc564b72f Remove CO_CANopenInitCallback() from CANopen.h/.c (revert) 2020-02-27 15:25:59 +01:00
Janez
8fb48173c6 Add CO_CANopenInitCallback() into CANopen.h/.c.
Change CO_*_initCallback() functions - add 'void *object' argument.
2020-02-27 13:09:48 +01:00
Janez
e55674bf6f Documentation updated, ChangeLog deviceSupport and gettingStarted added.
CANopen.h fixed.
2020-02-15 16:35:39 +01:00
Janez
9c0b16f981 minor corrections 2020-02-06 07:52:41 +01:00
Janez
ae48e57c33 CANopen.h/.c revision.
- example/main.c updated to microsecond time base.
- NMT master moved from CANopen.h/.c into 301/CO_NMT_Heartbeat.h/.c.
- CANopen.h/.c files revised, changes in interface, compare example/main.c.
- Removed CO_init() from CANopen.h/.c. Use separate functions instead.
- CO_USE_GLOBALS and global definitions removed from CANopen.c.
- CO_USE_OWN_CRC16 removed from CANopen.c. Use CO_driver_target.h.
2020-02-06 00:15:54 +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
Janez
c19879b659 Time base CHANGED TO MICROSECONDS in all objects. FIX OS!
- Necessary to update Time base in OS too - call to CO_process() function.
- timerNext_us info to OS implemented in in all objects.
- CO_NMT_blinkingProcess50ms() moved inside CO_NMT_process().
- CO_HBconsumer_process() function optimized and revised.
- Bugfix "timeDifference_us = 0;" inside the for loop.
2020-02-04 20:28:33 +01:00
Miles Simpson
38d5181807 Implemented changes based on PR feedback 2020-01-31 17:13:04 +01:00
Miles Simpson
729a139c12 Implementing PDO and SYNC timerNext_us return value 2020-01-31 17:13:04 +01:00
Janez
63df34d194 Rename CANdriverState to CANptr 2020-01-21 00:16:51 +01:00