Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

Commit c1c62cc

Browse files
authored
Update README.md and use allman astyle
1 parent 72c04b0 commit c1c62cc

23 files changed

+5788
-5661
lines changed

CONTRIBUTING.md

+26-6
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
1414

1515
Please ensure to specify the following:
1616

17-
* Arduino IDE version (e.g. 1.8.16) or Platform.io version
18-
* `Arduino mbed_rp2040` Core Version (e.g. Arduino mbed_rp2040 core v2.5.2) or `RP2040` Core Version (e.g. RP2040 core v1.9.5)
17+
* Arduino IDE version (e.g. 1.8.19) or Platform.io version
18+
* `Arduino mbed_rp2040` Core Version (e.g. Arduino mbed_rp2040 core v3.4.1) or `RP2040` Core Version (e.g. RP2040 core v2.6.3)
1919
* `RP2040` Board type (e.g. Nano_RP2040_Connect, RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040, GENERIC_RP2040, etc.)
2020
* Contextual information (e.g. what you were trying to achieve)
2121
* Simplest possible steps to reproduce
@@ -27,14 +27,14 @@ Please ensure to specify the following:
2727
### Example
2828

2929
```
30-
Arduino IDE version: 1.8.16
31-
Arduino mbed_rp2040 core v2.5.2
30+
Arduino IDE version: 1.8.19
31+
Arduino mbed_rp2040 core v3.4.1
3232
RASPBERRY_PI_PICO board
3333
OS: Ubuntu 20.04 LTS
34-
Linux xy-Inspiron-3593 5.4.0-86-generic #97-Ubuntu SMP Fri Sep 17 19:19:40 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
34+
Linux xy-Inspiron-3593 5.15.0-53-generic #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
3535
3636
Context:
37-
I encountered a crash while using TimerInterrupt.
37+
I encountered a crash while using this library
3838
3939
Steps to reproduce:
4040
1. ...
@@ -43,12 +43,32 @@ Steps to reproduce:
4343
4. ...
4444
```
4545

46+
---
47+
4648
### Sending Feature Requests
4749

4850
Feel free to post feature requests. It's helpful if you can explain exactly why the feature would be useful.
4951

5052
There are usually some outstanding feature requests in the [existing issues list](https://github.com/khoih-prog/RP2040_SD/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), feel free to add comments to them.
5153

54+
---
55+
5256
### Sending Pull Requests
5357

5458
Pull Requests with changes and fixes are also welcome!
59+
60+
Please use the `astyle` to reformat the updated library code as follows (demo for Ubuntu Linux)
61+
62+
1. Change directory to the library GitHub
63+
64+
```
65+
xy@xy-Inspiron-3593:~$ cd Arduino/xy/RP2040_SD_GitHub/
66+
xy@xy-Inspiron-3593:~/Arduino/xy/RP2040_SD_GitHub$
67+
```
68+
69+
2. Issue astyle command
70+
71+
```
72+
xy@xy-Inspiron-3593:~/Arduino/xy/RP2040_SD_GitHub$ bash utils/restyle.sh
73+
```
74+

README.md

+20-16
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
77
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/RP2040_SD.svg)](http://github.com/khoih-prog/RP2040_SD/issues)
88

9-
<a href="https://www.buymeacoffee.com/khoihprog6" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 50px !important;width: 181px !important;" ></a>
9+
10+
<a href="https://www.buymeacoffee.com/khoihprog6" title="Donate to my libraries using BuyMeACoffee"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Donate to my libraries using BuyMeACoffee" style="height: 50px !important;width: 181px !important;" ></a>
11+
<a href="https://www.buymeacoffee.com/khoihprog6" title="Donate to my libraries using BuyMeACoffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-orange.svg?logo=buy-me-a-coffee&logoColor=FFDD00" style="height: 20px !important;width: 200px !important;" ></a>
12+
<a href="https://profile-counter.glitch.me/khoih-prog/count.svg" title="Total khoih-prog Visitor count"><img src="https://profile-counter.glitch.me/khoih-prog/count.svg" style="height: 30px;width: 200px;"></a>
13+
<a href="https://profile-counter.glitch.me/khoih-prog-RP2040_SD/count.svg" title="RP2040_SD Visitor count"><img src="https://profile-counter.glitch.me/khoih-prog-RP2040_SD/count.svg" style="height: 30px;width: 200px;"></a>
1014

1115
---
1216
---
@@ -98,8 +102,8 @@ But if you need to write codes to be used in both [**Arduino-mbed RP2040** core]
98102
## Prerequisites
99103

100104
1. [`Arduino IDE 1.8.19+` for Arduino](https://github.com/arduino/Arduino). [![GitHub release](https://img.shields.io/github/release/arduino/Arduino.svg)](https://github.com/arduino/Arduino/releases/latest)
101-
2. [`Arduino mbed_rp2040 core 2.7.2+`](https://github.com/arduino/ArduinoCore-mbed) for Arduino (Use Arduino Board Manager) RP2040-based boards, such as **Arduino Nano RP2040 Connect, RASPBERRY_PI_PICO, etc.**. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest)
102-
3. [`Earle Philhower's arduino-pico core v1.10.0+`](https://github.com/earlephilhower/arduino-pico) for RP2040-based boards such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest)
105+
2. [`Arduino mbed_rp2040 core 3.4.1+`](https://github.com/arduino/ArduinoCore-mbed) for Arduino (Use Arduino Board Manager) RP2040-based boards, such as **Arduino Nano RP2040 Connect, RASPBERRY_PI_PICO, etc.**. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest)
106+
3. [`Earle Philhower's arduino-pico core v2.6.3+`](https://github.com/earlephilhower/arduino-pico) for RP2040-based boards such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest)
103107

104108
---
105109
---
@@ -124,7 +128,7 @@ Another way to install is to:
124128

125129
1. Install [VS Code](https://code.visualstudio.com/)
126130
2. Install [PlatformIO](https://platformio.org/platformio-ide)
127-
3. Install [**RP2040_SD** library](https://platformio.org/lib/show/12454/RP2040_SD) or [**RP2040_SD** library](https://platformio.org/lib/show/12454/RP2040_SD) by using [Library Manager](https://platformio.org/lib/show/12454/RP2040_SD/installation). Search for **RP2040_SD** in [Platform.io Author's Libraries](https://platformio.org/lib/search?query=author:%22Khoi%20Hoang%22)
131+
3. Install [**RP2040_SD** library](https://registry.platformio.org/libraries/khoih-prog/RP2040_SD) by using [Library Manager](https://registry.platformio.org/libraries/khoih-prog/RP2040_SD/installation). Search for **RP2040_SD** in [Platform.io Author's Libraries](https://platformio.org/lib/search?query=author:%22Khoi%20Hoang%22)
128132
4. Use included [platformio.ini](platformio/platformio.ini) file from examples to ensure that all dependent libraries will installed automatically. Please visit documentation for the other options and examples at [Project Configuration File](https://docs.platformio.org/page/projectconf.html)
129133

130134

@@ -149,7 +153,7 @@ Another way to install is to:
149153

150154
#### 1. File [ReadWrite.ino](examples/ReadWrite/ReadWrite.ino)
151155

152-
```
156+
```cpp
153157
/*
154158
SD card connection
155159
@@ -292,7 +296,7 @@ void loop()
292296

293297
The following is the sample terminal output when running example [CardInfo](examples/CardInfo) on MBED RaspberryPi Pico using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed)
294298

295-
```
299+
```cpp
296300
Starting SD Card CardInfo on MBED RaspberryPi Pico
297301
MBED RP2040_SD v1.0.1
298302
Initializing SD card with SS = 5
@@ -331,7 +335,7 @@ NEWDATA.TXT 18
331335
332336
The following is the sample terminal output when running example [DumpFile](examples/DumpFile) on MBED RaspberryPi Pico using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed)
333337
334-
```
338+
```cpp
335339
Starting SD Card DumpFile on MBED RaspberryPi Pico
336340
MBED RP2040_SD v1.0.1
337341
Initializing SD card with SS = 5
@@ -351,7 +355,7 @@ Testing RP2040 SD
351355

352356
The following is the sample terminal output when running example [ListFiles](examples/ListFiles) on MBED RaspberryPi Pico using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed)
353357

354-
```
358+
```cpp
355359
Starting SD Card ListFiles on MBED RaspberryPi Pico
356360
MBED RP2040_SD v1.0.1
357361
Initializing SD card with SS = 5
@@ -391,7 +395,7 @@ Print Directory done!
391395
The following is the sample terminal output when running example [ReadWrite](examples/ReadWrite) on MBED RaspberryPi Pico using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed)
392396

393397

394-
```
398+
```cpp
395399
Starting SD Card ReadWrite on MBED RaspberryPi Pico
396400
MBED RP2040_SD v1.0.1
397401
Initializing SD card with SS = 5
@@ -424,7 +428,7 @@ Testing writing to newtest0.txt
424428
The following is the sample terminal output when running example [Files](examples/Files) on MBED RaspberryPi Pico using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed)
425429

426430

427-
```
431+
```cpp
428432
Starting SD Card Files on MBED RaspberryPi Pico
429433
MBED RP2040_SD v1.0.1
430434
Initializing SD card with SS = 5
@@ -450,7 +454,7 @@ example.txt doesn't exist.
450454

451455
The following is the sample terminal output when running example [CardInfo](examples/CardInfo) on RASPBERRY_PI_PICO using [**arduino-pico core**](https://github.com/earlephilhower/arduino-pico)
452456

453-
```
457+
```cpp
454458
Starting SD Card CardInfo on RASPBERRY_PI_PICO
455459
RP2040_SD v1.0.1
456460
Initializing SD card with SS = 17
@@ -487,7 +491,7 @@ NEWDATA.TXT 54
487491
The following is the sample terminal output when running example [DumpFile](examples/DumpFile) on RASPBERRY_PI_PICO using [**arduino-pico core**](https://github.com/earlephilhower/arduino-pico)
488492
489493
490-
```
494+
```cpp
491495
Starting SD Card DumpFile on RASPBERRY_PI_PICO
492496
RP2040_SD v1.0.1
493497
Initializing SD card with SS = 17
@@ -507,7 +511,7 @@ Testing RP2040 SD
507511

508512
The following is the sample terminal output when running example [ListFiles](examples/ListFiles) on RASPBERRY_PI_PICO using [**arduino-pico core**](https://github.com/earlephilhower/arduino-pico)
509513

510-
```
514+
```cpp
511515
Starting SD Card ListFiles on RASPBERRY_PI_PICO
512516
RP2040_SD v1.0.1
513517
Initializing SD card with SS = 17
@@ -541,7 +545,7 @@ Print Directory done!
541545

542546
The following is the sample terminal output when running example [ReadWrite](examples/ReadWrite) on RASPBERRY_PI_PICO using [**arduino-pico core**](https://github.com/earlephilhower/arduino-pico)
543547

544-
```
548+
```cpp
545549
Starting SD Card ReadWrite on RASPBERRY_PI_PICO
546550
RP2040_SD v1.0.1
547551
Initializing SD card with SS = 17
@@ -574,7 +578,7 @@ Testing writing to newtest0.txt
574578

575579
The following is the sample terminal output when running example [Files](examples/Files) on RASPBERRY_PI_PICO using [**arduino-pico core**](https://github.com/earlephilhower/arduino-pico)
576580

577-
```
581+
```cpp
578582
Starting SD Card Files on RASPBERRY_PI_PICO
579583
RP2040_SD v1.0.1
580584
Initializing SD card with SS = 17
@@ -591,7 +595,6 @@ readData = 0xDEADBEEF
591595
example.txt exists.
592596
Removing example.txt...
593597
example.txt doesn't exist.
594-
595598
```
596599

597600
---
@@ -639,6 +642,7 @@ Submit issues to: [RP2040_SD issues](https://github.com/khoih-prog/RP2040_SD/iss
639642
1. Basic SD-wrapper library for **RP2040-based boards, such as NANO_RP2040_CONNECT, RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, using [**Arduino-mbed RP2040** core](https://github.com/arduino/ArduinoCore-mbed) or [**Earle Philhower's arduino-pico core**](https://github.com/earlephilhower/arduino-pico).
640643
2. Add Version String
641644
3. Add Table of Contents
645+
4. Add astyle using `allman` style. Restyle the library
642646

643647
---
644648
---

changelog.md

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
77
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/RP2040_SD.svg)](http://github.com/khoih-prog/RP2040_SD/issues)
88

9+
10+
<a href="https://www.buymeacoffee.com/khoihprog6" title="Donate to my libraries using BuyMeACoffee"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Donate to my libraries using BuyMeACoffee" style="height: 50px !important;width: 181px !important;" ></a>
11+
<a href="https://www.buymeacoffee.com/khoihprog6" title="Donate to my libraries using BuyMeACoffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-orange.svg?logo=buy-me-a-coffee&logoColor=FFDD00" style="height: 20px !important;width: 200px !important;" ></a>
12+
<a href="https://profile-counter.glitch.me/khoih-prog/count.svg" title="Total khoih-prog Visitor count"><img src="https://profile-counter.glitch.me/khoih-prog/count.svg" style="height: 30px;width: 200px;"></a>
13+
<a href="https://profile-counter.glitch.me/khoih-prog-RP2040_SD/count.svg" title="RP2040_SD Visitor count"><img src="https://profile-counter.glitch.me/khoih-prog-RP2040_SD/count.svg" style="height: 30px;width: 200px;"></a>
14+
915
---
1016
---
1117

0 commit comments

Comments
 (0)