Skip to content

Commit f3760c7

Browse files
committed
add run-cl-arduino.yml && fix some spi build bug
1 parent 4332e91 commit f3760c7

File tree

2 files changed

+72
-1
lines changed

2 files changed

+72
-1
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Run Ci Arduino
2+
3+
on:
4+
push:
5+
pull_request:
6+
repository_dispatch:
7+
types: [trigger-workflow]
8+
9+
jobs:
10+
ci-arduino:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Checkout script repository
18+
uses: actions/checkout@v4
19+
with:
20+
repository: Seeed-Studio/ci-arduino
21+
path: ci
22+
23+
24+
- name: Setup arduino cli
25+
uses: arduino/[email protected]
26+
27+
- name: Create a depend.list file
28+
run: |
29+
# eg: echo "<repo>" >> depend.list
30+
31+
32+
33+
34+
- name: Create a ignore.list file
35+
run: |
36+
# eg: echo "<path>,<fqbn>" >> ignore.list
37+
38+
# The dependent TensorFlowLite library can no longer be found
39+
40+
echo "IMU_Classifier,Seeeduino:samd:seeed_XIAO_m0" >> ignore.list
41+
echo "IMU_Classifier,Seeeduino:nrf52:xiaonRF52840" >> ignore.list
42+
echo "IMU_Classifier,Seeeduino:nrf52:xiaonRF52840Sense" >> ignore.list
43+
echo "IMU_Classifier,Seeeduino:renesas_uno:XIAO_RA4M1" >> ignore.list
44+
echo "IMU_Classifier,rp2040:rp2040:seeed_xiao_rp2040" >> ignore.list
45+
echo "IMU_Classifier,rp2040:rp2040:seeed_xiao_rp2350" >> ignore.list
46+
echo "IMU_Classifier,esp32:esp32:XIAO_ESP32C3" >> ignore.list
47+
echo "IMU_Classifier,esp32:esp32:XIAO_ESP32C6" >> ignore.list
48+
echo "IMU_Classifier,esp32:esp32:XIAO_ESP32S3" >> ignore.list
49+
50+
51+
52+
- name: Build sketch
53+
run: |
54+
./ci/tools/compile.sh
55+
56+
- name: Build result
57+
run: |
58+
cat build.log
59+
if [ ${{ github.event_name }} == 'pull_request' ] && [ -f compile.failed ]; then
60+
exit 1
61+
fi
62+
63+
- name: Generate issue
64+
if: ${{ github.event_name != 'pull_request' }}
65+
run: ./ci/tools/issue.sh
66+
env:
67+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

LSM6DS3.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,16 @@ status_t LSM6DS3Core::beginCore(void) {
9393
// start the SPI library:
9494
SPI.begin();
9595
// Maximum SPI frequency is 10MHz, could divide by 2 here:
96-
#ifndef ARDUINO_XIAO_MG24
96+
#if defined(ARDUINO_XIAO_RA4M1) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_RP2350)
97+
SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0));
98+
#elif defined(ARDUINO_XIAO_MG24)
9799
SPI.setClockDivider(SPI_CLOCK_DIV4);
98100
#endif
99101
// Data is read and written MSb first.
100102
#ifdef ESP32
101103
SPI.setBitOrder(SPI_MSBFIRST);
104+
#elif defined(ARDUINO_XIAO_RA4M1)
105+
// noting
102106
#else
103107
SPI.setBitOrder(MSBFIRST);
104108
#endif

0 commit comments

Comments
 (0)