Skip to content

Prepare for 1.1.2 #232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/workflows/TestCompile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# TestCompile.yml
# Github workflow script to test compile all examples of an Arduino library repository.
#
# Copyright (C) 2020 Armin Joachimsmeyer
# https://github.com/ArminJo/Github-Actions
#

# This is the name of the workflow, visible on GitHub UI.
name: TestCompile
on:
push: # see: https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request
paths:
- '**.ino'
- '**.cpp'
- '**.h'
- '**TestCompile.yml'
pull_request:
jobs:
build:
name: Test compiling examples for Digispark
runs-on: ubuntu-18.04
env:
# Comma separated list without double quotes around the list.
REQUIRED_LIBRARIES: SparkFun MS5637 Barometric Pressure Library,SparkFun MMA8452Q Accelerometer
PLATFORM_DEFAULT_URL: https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json

strategy:
matrix:
# The matrix will produce one job for each configuration parameter of type `arduino-boards-fqbn`
# In the Arduino IDE, the fqbn is printed in the first line of the verbose output for compilation as parameter -fqbn=... for the "arduino-builder -dump-prefs" command
#
# Examples: arduino:avr:uno, arduino:avr:leonardo, arduino:avr:nano, arduino:avr:mega
# arduino:sam:arduino_due_x, arduino:samd:arduino_zero_native"
# ATTinyCore:avr:attinyx5:chip=85,clock=1internal, digistump:avr:digispark-tiny, digistump:avr:digispark-pro
# STM32:stm32:GenF1:pnum=BLUEPILL_F103C8
# esp8266:esp8266:huzzah:eesz=4M3M,xtal=80, esp32:esp32:featheresp32:FlashFreq=80
# You may add a suffix behind the fqbn with "|" to specify one board for e.g. different compile options like arduino:avr:uno|trace
#############################################################################################################
arduino-boards-fqbn:
- SparkFun:apollo3:artemis
- SparkFun:apollo3:amap3redboard
- SparkFun:apollo3:amap3nano
- SparkFun:apollo3:amap3atp
- SparkFun:apollo3:amap3thing
- SparkFun:apollo3:edge
- SparkFun:apollo3:edge2


# Specify parameters for each board.
# With examples-exclude you may exclude specific examples for a board. Use a comma separated list.
#############################################################################################################
include:
- arduino-boards-fqbn: SparkFun:apollo3:artemis
examples-exclude: Example4_analogRead,LowPower_WithWork,Example2_Serial,Example2_MoreSPIPorts,Example6_19servos,Example7_29servos

- arduino-boards-fqbn: SparkFun:apollo3:amap3redboard
examples-exclude: Example2_MoreSPIPorts

- arduino-boards-fqbn: SparkFun:apollo3:amap3nano
examples-exclude: Example6_19servos,Example7_29servos

- arduino-boards-fqbn: SparkFun:apollo3:amap3atp
examples-exclude: Example4_analogRead,Example6_19servos

- arduino-boards-fqbn: SparkFun:apollo3:amap3thing

- arduino-boards-fqbn: SparkFun:apollo3:edge
examples-exclude: Example4_analogRead,LowPower_WithWork,Example2_Serial,Example6_19servos,Example7_29servos

- arduino-boards-fqbn: SparkFun:apollo3:edge2
examples-exclude: Example4_analogRead,LowPower_WithWork,Example2_Serial,Example1_SPI,Example6_19servos,Example7_29servos

# Do not cancel all jobs / architectures if one job fails
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@master

- name: Compile all examples
uses: ArminJo/arduino-test-compile@v2
with:
required-libraries: ${{ env.REQUIRED_LIBRARIES }}
arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }}
platform-default-url: ${{ env.PLATFORM_DEFAULT_URL }}
platform-url: ${{ matrix.platform-url }}
examples-exclude: ${{ matrix.examples-exclude }}
examples-build-properties: ${{ toJson(matrix.examples-build-properties) }}
8 changes: 4 additions & 4 deletions cores/arduino/ard_sup/analog/ap3_analog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,8 @@ ap3_err_t ap3_pwm_output(uint8_t pin, uint32_t th, uint32_t fw, uint32_t clk)

// if timer is running wait for timer value to roll over (will indicate that at least one pulse has been emitted)
AM_CRITICAL_BEGIN // critical section when reading / writing config registers
if (*((uint32_t *)CTIMERADDRn(CTIMER, timer, CTRL0)) & (CTIMER_CTRL0_TMRA0EN_Msk | CTIMER_CTRL0_TMRB0EN_Msk))
if ((segment == AM_HAL_CTIMER_TIMERA && *((uint32_t *)CTIMERADDRn(CTIMER, timer, CTRL0)) & (CTIMER_CTRL0_TMRA0EN_Msk)) ||
(segment == AM_HAL_CTIMER_TIMERB && *((uint32_t *)CTIMERADDRn(CTIMER, timer, CTRL0)) & (CTIMER_CTRL0_TMRB0EN_Msk)))
{
uint32_t current = 0;
uint32_t last = 0;
Expand All @@ -548,11 +549,10 @@ ap3_err_t ap3_pwm_output(uint8_t pin, uint32_t th, uint32_t fw, uint32_t clk)
current = am_hal_ctimer_read(timer, segment);
} while (current >= last);
}

AM_CRITICAL_END // end critical section

// clear timer (also stops the timer)
am_hal_ctimer_clear(timer, segment);
// clear timer (also stops the timer)
am_hal_ctimer_clear(timer, segment);

// Configure the repeated pulse mode with our clock source
am_hal_ctimer_config_single(timer,
Expand Down
8 changes: 4 additions & 4 deletions libraries/Wire/src/Wire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,17 +373,17 @@ TwoWire Wire1(AP3_Wire1_IOM);
#endif

#if WIRE_INTERFACES_COUNT > 2
TwoWire Wire2(AP3_Wire1_IOM);
TwoWire Wire2(AP3_Wire2_IOM);
#endif

#if WIRE_INTERFACES_COUNT > 3
TwoWire Wire3(AP3_Wire1_IOM);
TwoWire Wire3(AP3_Wire3_IOM);
#endif

#if WIRE_INTERFACES_COUNT > 4
TwoWire Wire4(AP3_Wire1_IOM);
TwoWire Wire4(AP3_Wire4_IOM);
#endif

#if WIRE_INTERFACES_COUNT > 5
TwoWire Wire5(AP3_Wire1_IOM);
TwoWire Wire5(AP3_Wire5_IOM);
#endif