* 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>
With _TIME_BITS=64, tv_sec and tv_usec are long long integer types,
so update %ld to %llu and cast to (unsigned long long) to fix timestamp
formatting.
https://onedigi.atlassian.net/browse/DEL-9638
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
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>
Use the same prompts that we use in the online documentation:
* For the target: "~#"
* For the host: "~$"
Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
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
General Makefile calls each API source without any specific target,
this commit fixes the CAN Makefile to build without errors.
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
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>