forked from RIOT-OS/RIOT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MERGECOMMIT: periph_can,candev: socketcan pkg for native RIOT-OS#17533
- Loading branch information
1 parent
32790eb
commit 71a8e27
Showing
10 changed files
with
83 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (c) ML!PA Consulting GmbH | ||
# | ||
# This file is subject to the terms and conditions of the GNU Lesser | ||
# General Public License v2.1. See the file LICENSE in the top level | ||
# directory for more details. | ||
# | ||
|
||
config PACKAGE_LIBSOCKETCAN | ||
bool "libsocketcan2 32bit for native Linux builds" | ||
depends on BOARD_NATIVE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
PKG_NAME=libsocketcan | ||
PKG_URL=https://git.pengutronix.de/git/tools/libsocketcan | ||
PKG_VERSION=077def398ad303043d73339112968e5112d8d7c8 | ||
PKG_LICENSE=LGPL-2.1 | ||
|
||
include $(RIOTBASE)/pkg/pkg.mk | ||
|
||
all: | ||
$(QQ)"$(MAKE)" -C $(PKG_SOURCE_DIR)/src -f $(CURDIR)/Makefile.$(PKG_NAME) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
NATIVEINCLUDES += -I"$(PKGDIRBASE)/libsocketcan/include" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
MODULE=libsocketcan | ||
|
||
CFLAGS += -Wno-strict-prototypes | ||
CFLAGS += -Wno-pointer-arith | ||
CFLAGS += -Wno-old-style-definition | ||
|
||
SRC += libsocketcan.c | ||
|
||
include $(RIOTBASE)/Makefile.base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* @defgroup pkg_libsocketcan Socketcan library | ||
* @ingroup pkg | ||
* @ingroup sys_serialization | ||
* @brief Provides libsocketcan for native 32bit linux builds when not available otherwise | ||
* | ||
* # Introduction | ||
* | ||
* "This library allows you to control some basic functions in SocketCAN from userspace." | ||
* | ||
* # License | ||
* | ||
* Licensed under LGPL 2.1. | ||
* | ||
* @see https://git.pengutronix.de/cgit/tools/libsocketcan | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,7 @@ | ||
BOARD ?= nucleo-f767zi | ||
|
||
include ../Makefile.tests_common | ||
|
||
USEMODULE += shell | ||
USEMODULE += can | ||
USEMODULE += isrpipe | ||
|
||
|
||
# define the CAN driver you want to use here | ||
CAN_DRIVER ?= MCP2515 | ||
|
||
ifeq ($(CAN_DRIVER), PERIPH_CAN) | ||
FEATURES_REQUIRED += periph_can | ||
else ifeq ($(CAN_DRIVER), MCP2515) | ||
USEMODULE += mcp2515 | ||
else ifeq ($(CAN_DRIVER), CAN_ALT) | ||
# other can modules can be defined here | ||
endif | ||
|
||
include $(RIOTBASE)/Makefile.include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ifneq (,$(filter native,$(BOARD))) | ||
CAN_DRIVER ?= PERIPH_CAN | ||
endif | ||
|
||
# define the CAN driver you want to use here | ||
CAN_DRIVER ?= MCP2515 | ||
|
||
ifeq ($(CAN_DRIVER), PERIPH_CAN) | ||
FEATURES_REQUIRED += periph_can | ||
else ifeq ($(CAN_DRIVER), MCP2515) | ||
USEMODULE += mcp2515 | ||
else ifeq ($(CAN_DRIVER), CAN_ALT) | ||
# other can modules can be defined here | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters