raiden00pl
5d95d0871f
drivers/can: move CAN utils to CAN common files
...
Move can_bytes2dlc() and can_dlc2bytes() to a common CAN file
that can be shared between socketCAN implementation and CAN
character driver.
This is the first step to simplifying the logic repeated in
many CAN drivers.
Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-14 10:30:25 -03:00
raiden00pl
486dabdd2d
include/nuttx/can.h: remove dependency on CONFIG_NET_CAN
...
Remove dependency on CONFIG_NET_CAN for socketCAN definitions.
Definitions from this file are also used by arch/sim CAN
implementation, which is based on a host socketCAN interface.
With this change CONFIG_NET and CONFIG_NET_CAN don't need to
be enabled to support CAN character driver on sim.
Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-14 03:06:12 +08:00
Alin Jerpelea
cd2fcf5252
include: migrate to SPDX identifier
...
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-10-04 08:18:42 +08:00
Petro Karashchenko
f0267bc507
arch/arm/samv7: add support of SocketLIN interface
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-09-19 09:39:54 +08:00
Xiang Xiao
fcb3e84c24
can: Merge netpacket/can.h into nuttx/can.h
...
To align with the layout of Linux can header file.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-08-26 05:05:31 -04:00
gaohedong
12a44bd974
can: CAN code optimization
...
Some macro definitions have already been defined in other header files, redundant macro definitions have been removed in include/nuttx/can.h. Align some code. Remove no use struct (can_response_s) and some variables.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-08-23 20:18:17 +08:00
guoshichao
b2a739a67a
greenhills: fix the can.h build error
...
CC: src/algslib_sha256.c "comlin.c", line 189: error #1982-D: target stack alignment is insufficient to
guarantee alignment of this variable
struct can_frame lin_err_frame = comlin_rx_frame[chlId];
^
"comlin.c", line 282: error #1982-D: target stack alignment is insufficient to
guarantee alignment of this variable
struct can_frame frame;
^
"comlin.c", line 321: error #1982-D: target stack alignment is insufficient to
guarantee alignment of this variable
struct can_frame frame;
"DiagServer_IsoTp.c", line 220: error #1982-D: target stack alignment is
insufficient to guarantee alignment of this variable
struct canfd_frame frame = {0};
^
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-19 10:37:54 +08:00
rajvinder kaur
2b30f17607
stm32h7: socket CAN error handling.
2023-01-30 11:22:49 +08:00
raiden00pl
36ae5316b7
include/nuttx/can.h: make error definitions compatible with Linux
2022-10-21 18:47:29 +08:00
Xiang Xiao
40ef5bc6db
libc: Move queue.h from include to include/nuttx
...
to avoid the conflict with libuv's queue.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-26 08:04:58 +02:00
raiden00pl
4c2dd3924a
include/nuttx/can.h: rename CAN_ERR_CTRL to CAN_ERR_CRTL for compatibility with libcanutils
2022-01-23 01:34:34 +08:00
raiden00pl
7d39642561
include/nuttx/can.h: make SocketCAN error definitions always available
2022-01-23 01:34:34 +08:00
raiden00pl
a8ca1ec026
SocketCAN: add CAN error definitions
2022-01-05 18:32:46 +08:00
raiden00pl
43ddcd5277
include/nuttx/can.h: include nuttx/config.h
2022-01-03 08:52:49 -03:00
Xiang Xiao
b3f9ffbe72
Replace all __attribute__((aligned(x)) with aligned_data(x)
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-29 21:55:21 -03:00
Gustavo Henrique Nihei
330eff36d7
sourcefiles: Fix relative path in file header
2021-03-09 23:18:28 +08:00
Alin Jerpelea
a8a1308240
include: nuttx: update licenses to Apache 2.0
...
The SGA from Gregory Nutt had been submitted and we can replace
the licenses to Apache 2.0
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-01 11:21:57 -03:00
Alin Jerpelea
fe4be428f5
include :nuttx: nxstyle error fix
...
Nxstyle error fix to silence the CI.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Peter van der Perk
55d9e5f7af
net: Add SocketCAN support
2020-06-15 08:07:19 -06:00
Gregory Nutt
ddcaa3d425
can.h moved from include/nuttx/ to include/nuttx/drivers.
2016-07-20 13:38:36 -06:00
Sebastien Lorquet
82d746ec35
STM32L4 CAN: Implementation of loopback IOCTLs
2016-06-22 10:02:20 -06:00
Sebastien Lorquet
16fe8ba342
Add some CAN mode IOCTL calls. These will be useful for device autotest when the application boots. They are redundant with the CONFIG_CAN_LOOPBACK option, which can now just be interpreted as a default setting.
2016-06-22 06:33:04 -06:00
Paul A. Patience
2f76f6e848
can: Add support for poll
2016-06-21 13:02:46 -04:00
Frank Benkert
9eeb8634fc
Improve the CAN error reporting by also report internal device driver errors.
2016-05-11 07:10:17 -06:00
Gregory Nutt
e73ccd6638
Update some comments
2016-01-18 16:27:46 -06:00
Frank Benkert
da33ec6b2e
CAN: Add more extensive error reporting information
2016-01-18 12:22:27 -06:00
Gregory Nutt
815ec07b55
CAN: A minor improvement to can_txready design
2015-11-15 06:36:30 -06:00
Gregory Nutt
d6eb48d1ab
Update comments
2015-11-14 14:00:39 -06:00
Gregory Nutt
81ab270a96
CAN driver: Removing call to can_xmit() from can_txready() in a previous commit was a mistake. This commit restores the call to can_xmit(), but does the call in a safer environment on the work thread.
2015-11-14 10:33:02 -06:00
Gregory Nutt
95562f8a86
CAN driver: More improved comments
2015-11-08 07:43:57 -06:00
Gregory Nutt
c6fc285277
CAN: Add a new CAN upper-half interface, can_txready(), that can be used to break deadlock conditions in certain CAN hardware that supports queuing of TX messages
2015-11-03 10:52:58 -06:00
Gregory Nutt
28853e5932
CAN: Define IOCTL commands to get and set the bit timing values
2015-08-18 11:21:01 -06:00
Gregory Nutt
505d5f8103
CAN: Add error bit values
2015-08-18 08:48:39 -06:00
Gregory Nutt
a987379e64
Add an error bit to the CAN message report
2015-08-18 07:27:00 -06:00
Gregory Nutt
95634a3b34
CAN IOCTLs: Should support standard CAN filtering in extended ID mode
2015-08-17 10:53:49 -06:00
Gregory Nutt
f7b64b1bfc
can.h: Mostly cosmetic cleanup
2015-08-07 09:02:12 -06:00
Gregory Nutt
2591b2b198
CAN: Extend new filter IOCTLs to support message prioritization and additional filter modes
2015-08-07 08:24:12 -06:00
Gregory Nutt
f4d9c3e33d
CAN extended IDs are 29, not 28 bits
2015-08-06 11:51:13 -06:00
Gregory Nutt
007e258c2b
Update some function headers
2015-08-05 16:22:40 -06:00
Gregory Nutt
36d4559ee8
CAN: Define IOCTL commands that manage filters
2015-08-05 13:00:31 -06:00
Gregory Nutt
e3decca82c
Cosmetic update to some comments
2015-08-05 08:07:58 -06:00
Gregory Nutt
f41df38b0b
More CAN driver fixes: remove and unused semaphore. Looks to me that waiter counts are not being initialized
2015-07-15 19:27:36 -06:00
Gregory Nutt
621fef2c31
Some trivial clean up associated with the last commit
2015-07-15 18:43:53 -06:00
Gregory Nutt
320c584888
CAN driver: Fix a problem where the rx_sem count can grow without bounds
2015-07-15 18:20:08 -06:00
Gregory Nutt
19eea866e6
Standardize some header files
2015-02-16 14:29:43 -06:00
Gregory Nutt
3a1324741a
More trailing whilespace removal
2014-04-13 14:32:20 -06:00
Gregory Nutt
e5c2496d6a
SAMA5 CAN: Driver is now code complete but still untested
2013-10-22 15:47:52 -06:00
patacongo
2fe4ad52f8
Move file-system header files to include/nuttx/fs
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4499 42af7a65-404d-4744-a932-0658087f49c3
2012-03-21 18:01:07 +00:00
patacongo
e2faa15666
New, extended CAN structures must be packed.
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4320 42af7a65-404d-4744-a932-0658087f49c3
2012-01-20 23:15:43 +00:00
patacongo
ce5f4e643e
Add support for extended (29-bit) CAN IDs
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4319 42af7a65-404d-4744-a932-0658087f49c3
2012-01-20 21:52:35 +00:00