8000 Merge branch 'master' of https://github.com/arduino/ArduinoCore-API · kpewwd/ArduinoCore-API@eb60ce7 · GitHub
[go: up one dir, main page]

Skip to content

Commit eb60ce7

Browse files
2 parents 9da5373 + 173e8ea commit eb60ce7

31 files changed

+214
-149
lines changed

.codespellrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See: https://github.com/codespell-project/codespell#using-a-config-file
2+
[codespell]
3+
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
4+
ignore-words-list = hel
5+
check-filenames =
6+
check-hidden =
7+
skip = ./.git,./test/external

.github/workflows/spell-check.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Spell Check
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
pull_request:
7+
schedule:
8+
# Run every Tuesday at 8 AM UTC to catch new misspelling detections resulting from dictionary updates.
9+
- cron: "0 8 * * TUE"
10+
workflow_dispatch:
11+
repository_dispatch:
12+
13+
jobs:
14+
spellcheck:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
21+
- name: Spell check
22+
uses: codespell-project/actions-codespell@master

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Unit Tests
22

33
on:
44
pull_request:
5-
# Only run workflow if a file in these paths are modified
5+
# Only run workflow if a file in these paths is modified
66
paths:
77
- ".github/workflows/unit-tests.yml"
88
- "test/**"

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
[![Unit Tests](https://github.com/arduino/ArduinoCore-API/workflows/Unit%20Tests/badge.svg)](https://github.com/arduino/ArduinoCore-API/actions?workflow=Unit+Tests)
44
[![codecov](https://codecov.io/gh/arduino/ArduinoCore-API/branch/master/graph/badge.svg)](https://codecov.io/gh/arduino/ArduinoCore-API)
5+
[![Spell Check status](https://github.com/arduino/ArduinoCore-API/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino/ArduinoCore-API/actions/workflows/spell-check.yml)
56

67
This repository hosts the hardware independent layer of Arduino core.
78

89
All Arduino official cores are being ported to the new structure so they take advantage of this single repo.
910

1011
Including this repo in your existing Arduino core will allow the language to grow and include new features.
11-
For backwards compatibility, every revision of this repo will increase `ARDUINO_API_VERSION` define.
12+
For backwards compatibility, every revision of this repo will increase the `ARDUINO_API_VERSION` define.
1213

1314
Some cores have been ported to the new structure, for example:
1415
* megaAVR (https://github.com/arduino/ArduinoCore-megaAVR)
@@ -20,7 +21,7 @@ These repositories **don't** contain the needed `api` subfolder; to "complete" t
2021

2122
### Porting tips
2223

23-
In the future, core apis will be updated independently from the core, so all the compatible cores will seamlessly adopt new features.
24+
In the future, core APIs will be updated independently from the core, so all the compatible cores will seamlessly adopt new features.
2425
This requires support from all the IDEs, so in the meantime we suggest to release the core by copying a snapshot of this `api` folder.
2526

2627
The most elegant and effective solution is to develop the core with `api` symlinked and produce the distributable archive by telling `tar` to follow symlinks.

api/ArduinoAPI.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#ifndef ARDUINO_API_H
2121
#define ARDUINO_API_H
2222

23-
// version 1.2.0
24-
#define ARDUINO_API_VERSION 10200
23+
// version 1.3.0
24+
#define ARDUINO_API_VERSION 10300
2525

2626
#include "Binary.h"
2727

api/Common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ int atexit(void (*func)()) __attribute__((weak));
8585
int main() __attribute__((weak));
8686

8787
#ifdef EXTENDED_PIN_MODE
88-
// Platforms who wnat to declare more than 256 pins need to define EXTENDED_PIN_MODE globally
88+
// Platforms who want to declare more than 256 pins need to define EXTENDED_PIN_MODE globally
8989
typedef uint32_t pin_size_t;
9090
#else
9191
typedef uint8_t pin_size_t;

api/HardwareSPI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class HardwareSPI
124124
virtual void end() = 0;
125125
};
126126

127-
// Alias SPIClass to HardwareSPI since it's already the defacto standard for SPI classe name
127+
// Alias SPIClass to HardwareSPI since it's already the defacto standard for SPI class name
128128
typedef HardwareSPI SPIClass;
129129

130130
}

api/IPAddress.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ bool IPAddress::fromString(const char *address)
6666
else if (c == '.')
6767
{
6868
if (dots == 3) {
69-
// Too much dots (there must be 3 dots)
69+
// Too many dots (there must be 3 dots)
7070
return false;
7171
}
7272
if (acc < 0) {

api/IPAddress.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "Printable.h"
2424
#include "String.h"
2525

26-
// forward declartions of global name space friend classes
26+
// forward declarations of global name space friend classes
2727
class EthernetClass;
2828
class DhcpClass;
2929
class DNSClient;
@@ -83,3 +83,5 @@ class IPAddress : public Printable {
8383

8484
extern const IPAddress INADDR_NONE;
8585
}
86+
87+
using arduino::IPAddress;

api/Print.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class Print
5757
}
5858

5959
// default to zero, meaning "a single write may block"
60-
// should be overriden by subclasses with buffering
60+
// should be overridden by subclasses with buffering
6161
virtual int availableForWrite() { return 0; }
6262

6363
size_t print(const __FlashStringHelper *);
@@ -97,4 +97,4 @@ class Print
9797
};
9898

9999
}
100-
using namespace arduino;
100+
using arduino::Print;

api/Stream.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <inttypes.h>
2525
#include "Print.h"
2626

27-
// compatability macros for testing
27+
// compatibility macros for testing
2828
/*
2929
#define getInt() parseInt()
3030
#define getInt(ignore) parseInt(ignore)
@@ -128,4 +128,6 @@ class Stream : public Print
128128

129129
#undef NO_IGNORE_CHAR
130130

131-
}
131+
}
132+
133+
using arduino::Stream;

0 commit comments

Comments
 (0)
0