Commit Graph

4 Commits

Author SHA1 Message Date
Javier Viguera 85480c9f26 apix-can-examples: fix static analyzer warnings
* Initialize 'iface' and validate it before use to avoid undefined
  behavior.
* Move 'deffilter' to global static scope in can-recv-example to prevent
  stack address escape.
* Fix incorrect retry count in failure message in can-send-example.

No functional changes.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2025-06-18 18:03:49 +02:00
Mike Engel ff6869f690 apix-can: remove CAN stop from cleanup()
This commit will remove the call to stop the CAN controller,
because freeing the CAN will stop the CAN interface already.
Calling stop twice will producing the following error message:

DIGIAPIX[824]: [ERROR] ldx_can_process_tx_socket: CAN network is down
DIGIAPIX[824]: [ERROR] ldx_can_stop: Unexpected state 0, in can0 interface
DIGIAPIX[824]: [ERROR] can0|ldx_can_thr: select error (-27|100)

Signed-off-by: Mike Engel <Mike.Engel@digi.com>
2021-01-12 12:05:31 +01:00
Mike Engel 41289be92e apix_can_example: Add CANFD support to configure data bitrate
This commit adds CANFD support to configure the data bitrate and
to enable the CANFD feature.

Signed-off-by: Mike Engel <Mike.Engel@digi.com>

https://jira.digi.com/browse/DEL-6588
2019-06-05 11:50:05 +02:00
fgilmar caab8ae4bc can: add two examples for the can interface
Added two examples about how to configure and set a CAN
interface to establish a communication receiving and
sending frames.

Signed-off-by: fgilmar <francisco.gilmartinez@digi.com>
2018-11-26 08:18:01 +01:00