Skip to content

Commit

Permalink
add run-cl-arduino.yml && fix some spi build bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ackPeng committed Jan 15, 2025
1 parent 4332e91 commit f3760c7
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 1 deletion.
67 changes: 67 additions & 0 deletions .github/workflows/run-cl-arduino.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Run Ci Arduino

on:
push:
pull_request:
repository_dispatch:
types: [trigger-workflow]

jobs:
ci-arduino:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Checkout script repository
uses: actions/checkout@v4
with:
repository: Seeed-Studio/ci-arduino
path: ci


- name: Setup arduino cli
uses: arduino/[email protected]

- name: Create a depend.list file
run: |
# eg: echo "<repo>" >> depend.list



- name: Create a ignore.list file
run: |
# eg: echo "<path>,<fqbn>" >> ignore.list
# The dependent TensorFlowLite library can no longer be found
echo "IMU_Classifier,Seeeduino:samd:seeed_XIAO_m0" >> ignore.list
echo "IMU_Classifier,Seeeduino:nrf52:xiaonRF52840" >> ignore.list
echo "IMU_Classifier,Seeeduino:nrf52:xiaonRF52840Sense" >> ignore.list
echo "IMU_Classifier,Seeeduino:renesas_uno:XIAO_RA4M1" >> ignore.list
echo "IMU_Classifier,rp2040:rp2040:seeed_xiao_rp2040" >> ignore.list
echo "IMU_Classifier,rp2040:rp2040:seeed_xiao_rp2350" >> ignore.list
echo "IMU_Classifier,esp32:esp32:XIAO_ESP32C3" >> ignore.list
echo "IMU_Classifier,esp32:esp32:XIAO_ESP32C6" >> ignore.list
echo "IMU_Classifier,esp32:esp32:XIAO_ESP32S3" >> ignore.list
- name: Build sketch
run: |
./ci/tools/compile.sh
- name: Build result
run: |
cat build.log
if [ ${{ github.event_name }} == 'pull_request' ] && [ -f compile.failed ]; then
exit 1
fi
- name: Generate issue
if: ${{ github.event_name != 'pull_request' }}
run: ./ci/tools/issue.sh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 5 additions & 1 deletion LSM6DS3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,16 @@ status_t LSM6DS3Core::beginCore(void) {
// start the SPI library:
SPI.begin();
// Maximum SPI frequency is 10MHz, could divide by 2 here:
#ifndef ARDUINO_XIAO_MG24
#if defined(ARDUINO_XIAO_RA4M1) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_RP2350)
SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0));
#elif defined(ARDUINO_XIAO_MG24)
SPI.setClockDivider(SPI_CLOCK_DIV4);
#endif
// Data is read and written MSb first.
#ifdef ESP32
SPI.setBitOrder(SPI_MSBFIRST);
#elif defined(ARDUINO_XIAO_RA4M1)
// noting
#else
SPI.setBitOrder(MSBFIRST);
#endif
Expand Down

0 comments on commit f3760c7

Please sign in to comment.