Skip to content

Commit ab02801

Browse files
Check in Arduino API directory to avoid symlink (#176)
Fixes #171 Under Windows, it is very hard to make a symlink and by default git won't make one to the Arduino API directory, causing annoying build errors. Avoid the issue by duplicating the ArduinoAPI directory explicitly and using CI to verify that there are no differences between the two.
1 parent e0d33e2 commit ab02801

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+4615
-8
lines changed

.github/workflows/pull-request.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Run codespell
2121
uses: codespell-project/actions-codespell@master
2222
with:
23-
skip: ./pico-extras,./ArduinoCore-API,./libraries/SdFat,./libraries/Adafruit_TinyUSB_Arduino,./libraries/LittleFS/lib,./tools/pyserial,./pico-sdk,./.github,./docs/i2s.rst
23+
skip: ./pico-extras,./ArduinoCore-API,./libraries/SdFat,./libraries/Adafruit_TinyUSB_Arduino,./libraries/LittleFS/lib,./tools/pyserial,./pico-sdk,./.github,./docs/i2s.rst,./cores/rp2040/api
2424
ignore_words_list: ser,DOUT
2525

2626
# Consistent style
@@ -44,6 +44,10 @@ jobs:
4444
./tests/restyle.sh
4545
# If anything changed, GIT should return an error and fail the test
4646
git diff --exit-code
47+
- name: Check Arduino API copy is clean
48+
run: |
49+
git submodule update --init ./ArduinoCore-API
50+
diff -r ./cores/rp2040/api ./ArduinoCore-API/api
4751
4852
# Build all examples on linux (core and Arduino IDE)
4953
build-linux:

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
21
.DS_Store
32
system
43
tools/dist
5-
cores/rp2040/api

cores/rp2040/api

Lines changed: 0 additions & 1 deletion
This file was deleted.

cores/rp2040/api/ArduinoAPI.h

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
Arduino API main include
3+
Copyright (c) 2016 Arduino LLC. All right reserved.
4+
5+
This library is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU Lesser General Public
7+
License as published by the Free Software Foundation; either
8+
version 2.1 of the License, or (at your option) any later version.
9+
10+
This library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
Lesser General Public License for more details.
14+
15+
You should have received a copy of the GNU Lesser General Public
16+
License along with this library; if not, write to the Free Software
17+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18+
*/
19+
20+
#ifndef ARDUINO_API_H
21+
#define ARDUINO_API_H
22+
23+
// version 1.2.0
24+
#define ARDUINO_API_VERSION 10200
25+
26+
#include "Binary.h"
27+
28+
#ifdef __cplusplus
29+
#include "Interrupts.h"
30+
#include "IPAddress.h"
31+
#include "Print.h"
32+
#include "Printable.h"
33+
#include "PluggableUSB.h"
34+
#include "Server.h"
35+
#include "String.h"
36+
#include "Stream.h"
37+
#include "Udp.h"
38+
#include "USBAPI.h"
39+
#include "WCharacter.h"
40+
#endif
41+
42+
/* Standard C library includes */
43+
#include <stdlib.h>
44+
#include <stdint.h>
45+
#include <stdbool.h>
46+
#include <string.h>
47+
#include <math.h>
48+
49+
// Misc Arduino core functions
50+
#include "Common.h"
51+
52+
#ifdef __cplusplus
53+
// Compatibility layer for older code
54+
#include "Compat.h"
55+
#endif
56+
57+
#endif

0 commit comments

Comments
 (0)