- 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
Created a single header file (`CO_driver.h`) to declare the functions
of the drivers API. This forces drivers to use a common API.
Previously, each driver declared these functions in its specific
`CO_driver.h` file. This causes two issues:
1. while these functions are used in target-independent code,
the declarations could be target specific, leading to API/ABI
compatibility issues.
2. the declarations were duplicated for each driver.
The `CO_driver.h` files for each driver were renamed to
`CO_driver_target.h`. This file is included from `CO_driver.h`.
Added a new header for types: `CO_types.h`. This file currently
holds the definition of `CO_ReturnError_t` that was previously
duplicated for all drivers. Added a few enum values to support
the `neuberger-socketCAN` code.
Previously, the address of the CAN device (`CANbaseAddress`)
was specified as a signed or unsigned integer of variable size.
This made the ABI specific for each driver and is not generic
enough for some use cases.
Replaced all usages by using a void pointer instead.
Renamed `CANbaseAddress` to `CANdevicePtr`.
Refactored the code where it needed to be (some comparisons to -1).
Use a pointer to a user-defined variable/structure instead of
a 32-bit integer for CANbaseAddress. Renamed CANbaseAddress
to CANbaseStruct to reflect that change in behavior.
This is more modular and avoids casts.
This driver is more sophisticated than the normal socketCAN driver. Compared
to the normal socketCAN driver, this one contains the linking exception license.
Changes compared to normal socketCAN driver:
- Re-implementation based on driver template
- Error detection works
- Setting up filters works properly
- Optional Support for socketCAN error frames. This currently handles bus-off
and no-ack condition by setting driver into listen-only mode. If you decide
to use this feature have a close look at your own requirements and fit
error handling functions to that.
- Optional support for CAN interface combining (not redundancy!). With this
feature enabled you can have multiple CAN interface represented as one within
CANopenNode stack. By default, all TX messages are sent on all used CAN
interfaces, but the user can change this behaviour inside own app (e.g. check
on wich bus rx-sdo is received and set-up tx-sdo accordingly).
Be aware that no bridging between the interfaces is done!
see https://github.com/CANopenNode/CANopenNode/issues/100
Using this workaround, the struct passed to the callback still doesn't
match the description (only "data" is passed instead of "data" and
"ODdataStorage"), see CO_ODF_arg_t fields description for details.
However, data pointer is a least valid for all object types.
This callback is called when the first heartbeat is received (after BOOTUP)
and when there was a pause between heartbeats (TIMEOUT). This allows
the user to get an event when a bus segment is disconnected and then
reconnected from the server (nodes just start sending heartbeats again
without BOOTUP first).
Added function and changed example code so that NMT boot-up is only started
after receiving LSS switch state global waiting. This also fixes problems
where doing CANopenNode initialization (-> change can HW Filter settings)
lead to missing the LSS switch state global waiting message.
However, now we do not fully comply to the specified sequence in 8.3.1.2
as we do all the startup stuff after switching to LSS waiting. This can't
be split in CANopenNode.