1
0
Fork 0
Commit graph

371 commits

Author SHA1 Message Date
Martin Wagner
03613cc8a1 neuberger-socketcan: fix invalid memory access
store name string by copy, not by reference as source can be moved
2020-02-27 16:06:11 +01:00
Martin Wagner
85a31861c5 neuberger-socketcan: add comment to init function
the init function needs the interface index, not a pointer.
Alternative: use proper init struct.
2020-02-27 16:06:06 +01:00
Martin Wagner
dc02ad8310 neuberger-socketcan: fix error from c36d73b5
that's why I don't like to change this stuff.
2020-02-27 16:06:00 +01:00
Janez
3fc564b72f Remove CO_CANopenInitCallback() from CANopen.h/.c (revert) 2020-02-27 15:25:59 +01:00
Janez
22e66b7bb4 socketCAN/CO_Linux_threads
- CANrx_threadTmr_init(uint16_t interval_in_milliseconds
          (changed to) uint32_t interval_in_microseconds)
- other timing updated
2020-02-27 13:28:23 +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
Martin Wagner
bf91f41f38 neuberger-socketcan: add logging stuff 2020-02-27 12:50:51 +01:00
Martin Wagner
8d5ecac9d4 neuberger-socketcan: Fix sync compilation 2020-02-27 12:50:47 +01:00
Martin Wagner
1052aac684 neuberger-socketcan: fix driver
fix errors introduced within the last few commits:
    - data type mismatch
    - wrong return value
    - change handle to void pointer - added "const"
2020-02-27 12:50:42 +01:00
Janez
c40130b70e socketCAN: add Makefile and do basic changes 2020-02-26 13:04:25 +01:00
Janez
a513d84e45 Move Makefile into example/
Renamed to example/CO_driver_blank.c and example/main_blank.c
Copied socketCAN/main.c from CANopenSocket project.
2020-02-26 13:01:53 +01:00
Martin Wagner
2785b2491d remove merging hell
this one-liner has bitten us more than once
2020-02-26 08:59:38 +01:00
Janez
2fa91d2c69 Fixed:
BUG in CO_HBconsumer.c #168
Misleading Comments in CO_SDO.h #169
2020-02-24 09:42:20 +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
4495e32fe8 Rename macros CO_CANrxNew_* into CO_FLAG_* 2020-02-04 20:39:10 +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
Janez
1d051aa3d2 minor compiler error in CO_SDOmaster.c #56 2020-02-01 10:14:52 +01:00
Janez
a2531b0373 Merge branch 'master' into split-driver 2020-01-31 17:41:54 +01:00
Miles Simpson
a1f36cbe15 Removed maximum time restriction on timerNext_ms 2020-01-31 17:23:31 +01:00
Miles Simpson
38d5181807 Implemented changes based on PR feedback 2020-01-31 17:13:04 +01:00
Janez
1de453c92f Update CO_SYNC.c
`*timerNext_us` added also to 'Verify timeout'
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
Marcel Maage
0efcf4b1b5 Added typecast needed for g++
g++ throws several errors when compiling because of missed typecasts. Files can no be compiled to .o.
2020-01-27 12:44:50 +01:00
Janez
d50e50e2c6 socketCAN related updates
- move stack/socketCAN/CO_OD_storage.* in socketCAN/CO_OD_storage.*
- CO_CANrxNew_ macros updated
- some corrections
2020-01-25 12:57:17 +01:00
Janez
23a37f0d92 New socketCAN/CO_driver_target.h
- Reduce CO_driver.h and CO_driver_base.h into CO_driver_target.h
- New functions: CO_CANrxMsg_readIdent, _DLC, _data
- rxArray[i].pFunct  changed to   -> rxArray[i].CANrx_callback
- (*pFunct)(void *object, const CO_CANrxMsg_t *message))  changed to
  (*CANrx_callback)(void *object, void *message))
- change to '#define CO_CANrxNew_READ(rxNew) ((bool_t)rxNew)'
2020-01-24 14:59:45 +01:00
Janez
fdda4c8340 move stack/neuberger-socketCAN/ socketCAN
Compare with initial commit of neuberger-socketCAN.
Try to use original code.
2020-01-24 12:22:54 +01:00
Janez
efe87c8b7c minor corrections
example/application.* removed
2020-01-22 07:57:42 +01:00
Janez
63df34d194 Rename CANdriverState to CANptr 2020-01-21 00:16:51 +01:00
Janez
8e33f80b8f minor corrections 2020-01-19 02:36:18 +01:00
Janez
c2d0290ac1 Merge branch 'master' into split-driver
update the split-driver with current master
2020-01-19 02:12:14 +01:00
Janez
12fa8e5173 Extract target specific code from CO_driver.h into /example/CO_driver_target.h
- Keep example code CO_driver_target.h also in CO_driver.h (for doxygen).
- Add extra members into enum CO_ReturnError_t
- Move enum CO_Default_CAN_ID_t from CANopen.h into CO_driver.h
- Make files in 'stack' directory independent form CANopen.h.
  CANopen.h file is more part of the application example than the stack.
- Second argument to receive callback function is 'void*' instead of
  'const CO_CANrxMsg_t*'. New (macros) are introduced:
  CO_CANrxMsg_readIdent(), CO_CANrxMsg_readDLC() and CO_CANrxMsg_readData()
  CAN receive functions in all source files are updated.
- IS_CANrxNew, SET_CANrxNew and CLEAR_CANrxNew renamed to CO_CANrxNew_READ,
  CO_CANrxNew_SET and CO_CANrxNew_CLEAR. Replace broken link in doc.
- Doxyfile: parameter change 'INPUT = README.md stack'. CANopen.h is
  excluded and updated. Doxywizard saved file to newer version of doxygen.
- Documentation in CO_driver.h is updated.
- Full documentation for CO_driver_target.h file is added to CO_driver.h.
- used clang-format on the CO_driver.h
2020-01-19 02:06:46 +01:00
Janez
06a0493c78 fix NMTstartup handling - update README and default values 2020-01-16 08:06:16 +01:00
Oleg
2fb8dfd223 fix NMTstartup handling if device is NOT the NMT Master (#150)
* fix NMTstartup handling if device is NOT the NMT Master and now OD_NMTStartup (0x1F80 OD) can be optional

issue #149

* Correctly use of NMTstartup to self start slave

According to DSP302, part2, V4.1.0, 2009 for object 1F80h (NMT startup):
bit0=0 - "CANopen device is not NMT master. The entries of the object 1F81h shall be ignored. All other bits of object 1F80h shall be ignored with the exception: value = 00000000 00000000 00000000 00001000b - "NMT slave that shall enter the NMT state Operational after the NMT state Initialisation autonomously (self starting)"
2020-01-16 07:58:01 +01:00
Martin Wagner
ec70c2b182
Merge pull request #153 from gotocoffee1/patch-1
Fix RX Buffer size
2020-01-15 16:21:07 +01:00
gotocoffee
cf015f2259
Update CANopen.c
#151
2020-01-15 15:48:24 +01:00
Oleg
f2283e3ca9 Warnings omitted (#144)
* All Warnings omitted
Now all warnings that came up in previous versions are fixed in a clean way directly in the code.
Inlcudes:
Shadowing
Missing default cases
Missing cases in switch statements
unused variables
Pointer problems
Function declarations' visibility

* Default case for NMTsendCommand
Default case was not catched before and could led to errors.

* fix typo when omitting warnings

* Omitting more warnings, and fix TIME->CANrxNew nulling

Inlcudes:
large integer implicitly truncated to unsigned type
this statement may fall through

* rename CO_this to co

* fix CO_process_SYNC name (CANopenNode master merging issue)

Co-authored-by: Michele B. <MicheleBlank@gmx-topmail.de>

----
Verified before merge. It is cleanup, no deep changes.
2020-01-15 13:40:30 +01:00
Janez
1459c7d154 Move files from stack/drvTemplate to stack/ and example/. Makefile updated. 2020-01-14 16:56:41 +01:00
Olivier Desenfans
ecaa660b9d Revert "Single project-wide header for driver functions"
This reverts commit 07c61316b3.

Will start from beginning. Try to keep git history.
2020-01-14 16:31:32 +01:00
Martin Wagner
3d41f20adb Merge branch 'master' of https://github.com/CANopenNode/CANopenNode 2020-01-14 15:50:01 +01:00
Martin Wagner
5ff3493859 License changed to Apache 2.0 - Neuberger part 2020-01-14 15:45:41 +01:00
Janez
57f264c2c4 Coding style defined more precisely. Issue #117. 2020-01-14 15:35:53 +01:00
Janez
ce2ac80a97 Fixed CO_OD_NoOfElements in example CO_OD.h 2020-01-13 20:05:58 +01:00
Martin Wagner
98fdcd988c
Merge pull request #143 from wilkinsw/time-optional
change TIME module to be optional
2020-01-13 09:15:19 +01:00
Martin Wagner
d7f28f8743
Merge branch 'master' into time-optional 2020-01-13 09:15:08 +01:00
Martin Wagner
aa08ebf51d
Merge pull request #142 from wilkinsw/add-missing-sync-guards
fix missing SYNC guards
2020-01-13 09:13:19 +01:00
Janez
8bd43334e9 Unsupported RTR mentiond in README #99 2020-01-10 13:44:55 +01:00
Janez
cb780aa4d0
Update device support and OD editor in README 2020-01-09 13:09:58 +01:00