Skip to content

Commit 7639aa8

Browse files
committed
added Waveshare single channel hat 16 MHz crystal
1 parent e5a52c1 commit 7639aa8

File tree

6 files changed

+30
-1
lines changed

6 files changed

+30
-1
lines changed

changes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v3.6:
2+
added Waveshare single channel hat 16 MHz crystal
3+
14
v3.5:
25
improve prompting for selecing an action (add, delete, done)
36

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Waveshare 1-channel CANbus Hat 16 MHz crystal
2+
NAME1_PH DEVICE1_PH spi0.0

templatesRpiHat/Waveshare16/isNewConfig

Whitespace-only changes.

templatesRpiHat/Waveshare16/overlay

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#### begin CAN overlay
2+
# Waveshare 1-channel CANbus Hat 16 MHz crystal
3+
# instantiates as can0 ONLY !!!
4+
# use udev rules to rename
5+
[all]
6+
dtparam=spi=on
7+
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25,spimaxfrequency=2000000
8+
#### end CAN overlay

templatesRpiHat/Waveshare16/udevRules

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# udev rules for Waveshare 1-channel CANbus Hat
2+
3+
# replace ...PH (place holder) with actual values
4+
# DELETE the placeholder lines if they aren't used !!
5+
# rename file to e.g., can0.rules
6+
7+
# find interface and connect directly to CANbus port
8+
ACTION=="add", SUBSYSTEM=="net",\
9+
KERNELS=="spi0.0",\
10+
NAME="DEVICE1_PH",\
11+
ENV{VE_NAME}="NAME1_PH",\
12+
RUN+="/usr/bin/logger [udev] CANbus device added:\
13+
NAME1_PH\
14+
DEVICE1_PH\
15+
spi0.0\
16+
"

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v3.5
1+
v3.6

0 commit comments

Comments
 (0)