Skip to content

Commit 2db7d75

Browse files
Initial
1 parent 8cdabdc commit 2db7d75

21 files changed

+1568
-0
lines changed

examples/simple_test/.gitignore

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
.pio
2+
.pioenvs
3+
.piolibdeps
4+
.vscode/.browse.c_cpp.db*
5+
.vscode/c_cpp_properties.json
6+
.vscode/launch.json
7+
8+
9+
# Created by https://www.gitignore.io/api/clion,platformio,visualstudiocode
10+
# Edit at https://www.gitignore.io/?templates=clion,platformio,visualstudiocode
11+
12+
### CLion ###
13+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
14+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
15+
16+
# User-specific stuff
17+
.idea/**/workspace.xml
18+
.idea/**/tasks.xml
19+
.idea/**/usage.statistics.xml
20+
.idea/**/dictionaries
21+
.idea/**/shelf
22+
23+
# Generated files
24+
.idea/**/contentModel.xml
25+
26+
# Sensitive or high-churn files
27+
.idea/**/dataSources/
28+
.idea/**/dataSources.ids
29+
.idea/**/dataSources.local.xml
30+
.idea/**/sqlDataSources.xml
31+
.idea/**/dynamic.xml
32+
.idea/**/uiDesigner.xml
33+
.idea/**/dbnavigator.xml
34+
35+
# Gradle
36+
.idea/**/gradle.xml
37+
.idea/**/libraries
38+
39+
# Gradle and Maven with auto-import
40+
# When using Gradle or Maven with auto-import, you should exclude module files,
41+
# since they will be recreated, and may cause churn. Uncomment if using
42+
# auto-import.
43+
# .idea/modules.xml
44+
# .idea/*.iml
45+
# .idea/modules
46+
47+
# CMake
48+
cmake-build-*/
49+
50+
# Mongo Explorer plugin
51+
.idea/**/mongoSettings.xml
52+
53+
# File-based project format
54+
*.iws
55+
56+
# IntelliJ
57+
out/
58+
59+
# mpeltonen/sbt-idea plugin
60+
.idea_modules/
61+
62+
# JIRA plugin
63+
atlassian-ide-plugin.xml
64+
65+
# Cursive Clojure plugin
66+
.idea/replstate.xml
67+
68+
# Crashlytics plugin (for Android Studio and IntelliJ)
69+
com_crashlytics_export_strings.xml
70+
crashlytics.properties
71+
crashlytics-build.properties
72+
fabric.properties
73+
74+
# Editor-based Rest Client
75+
.idea/httpRequests
76+
77+
# Android studio 3.1+ serialized cache file
78+
.idea/caches/build_file_checksums.ser
79+
80+
### CLion Patch ###
81+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
82+
83+
# *.iml
84+
# modules.xml
85+
# .idea/misc.xml
86+
# *.ipr
87+
88+
# Sonarlint plugin
89+
.idea/sonarlint
90+
91+
### PlatformIO ###
92+
.pioenvs
93+
.piolibdeps
94+
.clang_complete
95+
.gcc-flags.json
96+
CMakeLists.txt
97+
CMakeListsPrivate.txt
98+
99+
### VisualStudioCode ###
100+
.vscode/*
101+
!.vscode/settings.json
102+
!.vscode/tasks.json
103+
!.vscode/launch.json
104+
!.vscode/extensions.json
105+
106+
### VisualStudioCode Patch ###
107+
# Ignore all local history of files
108+
.history
109+
110+
# End of https://www.gitignore.io/api/clion,platformio,visualstudiocode
111+

examples/simple_test/.travis.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Continuous Integration (CI) is the practice, in software
2+
# engineering, of merging all developer working copies with a shared mainline
3+
# several times a day < https://docs.platformio.org/page/ci/index.html >
4+
#
5+
# Documentation:
6+
#
7+
# * Travis CI Embedded Builds with PlatformIO
8+
# < https://docs.travis-ci.com/user/integration/platformio/ >
9+
#
10+
# * PlatformIO integration with Travis CI
11+
# < https://docs.platformio.org/page/ci/travis.html >
12+
#
13+
# * User Guide for `platformio ci` command
14+
# < https://docs.platformio.org/page/userguide/cmd_ci.html >
15+
#
16+
#
17+
# Please choose one of the following templates (proposed below) and uncomment
18+
# it (remove "# " before each line) or use own configuration according to the
19+
# Travis CI documentation (see above).
20+
#
21+
22+
23+
#
24+
# Template #1: General project. Test it using existing `platformio.ini`.
25+
#
26+
27+
# language: python
28+
# python:
29+
# - "2.7"
30+
#
31+
# sudo: false
32+
# cache:
33+
# directories:
34+
# - "~/.platformio"
35+
#
36+
# install:
37+
# - pip install -U platformio
38+
# - platformio update
39+
#
40+
# script:
41+
# - platformio run
42+
43+
44+
#
45+
# Template #2: The project is intended to be used as a library with examples.
46+
#
47+
48+
# language: python
49+
# python:
50+
# - "2.7"
51+
#
52+
# sudo: false
53+
# cache:
54+
# directories:
55+
# - "~/.platformio"
56+
#
57+
# env:
58+
# - PLATFORMIO_CI_SRC=path/to/test/file.c
59+
# - PLATFORMIO_CI_SRC=examples/file.ino
60+
# - PLATFORMIO_CI_SRC=path/to/test/directory
61+
#
62+
# install:
63+
# - pip install -U platformio
64+
# - platformio update
65+
#
66+
# script:
67+
# - platformio ci --lib="." --board=ID_1 --board=ID_2 --board=ID_N
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": [
5+
"platformio.platformio-ide"
6+
]
7+
}
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// AUTOMATICALLY GENERATED FILE. PLEASE DO NOT MODIFY IT MANUALLY
2+
3+
// PIO Unified Debugger
4+
//
5+
// Documentation: https://docs.platformio.org/page/plus/debugging.html
6+
// Configuration: https://docs.platformio.org/page/projectconf/section_env_debug.html
7+
8+
{
9+
"version": "0.2.0",
10+
"configurations": [
11+
{
12+
"type": "platformio-debug",
13+
"request": "launch",
14+
"name": "PIO Debug",
15+
"executable": "/home/marius/Documents/PlatformIO/Projects/door-opener/.pioenvs/esp32dev/firmware.elf",
16+
"toolchainBinDir": "/home/marius/.platformio/packages/toolchain-xtensa32/bin",
17+
"preLaunchTask": {
18+
"type": "PlatformIO",
19+
"task": "Pre-Debug"
20+
},
21+
"internalConsoleOptions": "openOnSessionStart"
22+
},
23+
{
24+
"type": "platformio-debug",
25+
"request": "launch",
26+
"name": "PIO Debug (skip Pre-Debug)",
27+
"executable": "/home/marius/Documents/PlatformIO/Projects/door-opener/.pioenvs/esp32dev/firmware.elf",
28+
"toolchainBinDir": "/home/marius/.platformio/packages/toolchain-xtensa32/bin",
29+
"internalConsoleOptions": "openOnSessionStart"
30+
}
31+
]
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"terminal.integrated.env.linux": {
3+
"PATH": "/home/marius/.platformio/penv/bin:/home/marius/.platformio/penv:/home/marius/bin:/home/marius/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin:/home/marius/.rvm/bin:/home/marius/.rvm/bin:/home/marius/.config/composer/vendor/bin",
4+
"PLATFORMIO_CALLER": "vscode"
5+
}
6+
}

examples/simple_test/include/README

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
This directory is intended for project header files.
3+
4+
A header file is a file containing C declarations and macro definitions
5+
to be shared between several project source files. You request the use of a
6+
header file in your project source file (C, C++, etc) located in `src` folder
7+
by including it, with the C preprocessing directive `#include'.
8+
9+
```src/main.c
10+
11+
#include "header.h"
12+
13+
int main (void)
14+
{
15+
...
16+
}
17+
```
18+
19+
Including a header file produces the same results as copying the header file
20+
into each source file that needs it. Such copying would be time-consuming
21+
and error-prone. With a header file, the related declarations appear
22+
in only one place. If they need to be changed, they can be changed in one
23+
place, and programs that include the header file will automatically use the
24+
new version when next recompiled. The header file eliminates the labor of
25+
finding and changing all the copies as well as the risk that a failure to
26+
find one copy will result in inconsistencies within a program.
27+
28+
In C, the usual convention is to give header files names that end with `.h'.
29+
It is most portable to use only letters, digits, dashes, and underscores in
30+
header file names, and at most one dot.
31+
32+
Read more about using header files in official GCC documentation:
33+
34+
* Include Syntax
35+
* Include Operation
36+
* Once-Only Headers
37+
* Computed Includes
38+
39+
https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html

examples/simple_test/lib/README

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
This directory is intended for project specific (private) libraries.
3+
PlatformIO will compile them to static libraries and link into executable file.
4+
5+
The source code of each library should be placed in a an own separate directory
6+
("lib/your_library_name/[here are source files]").
7+
8+
For example, see a structure of the following two libraries `Foo` and `Bar`:
9+
10+
|--lib
11+
| |
12+
| |--Bar
13+
| | |--docs
14+
| | |--examples
15+
| | |--src
16+
| | |- Bar.c
17+
| | |- Bar.h
18+
| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
19+
| |
20+
| |--Foo
21+
| | |- Foo.c
22+
| | |- Foo.h
23+
| |
24+
| |- README --> THIS FILE
25+
|
26+
|- platformio.ini
27+
|--src
28+
|- main.c
29+
30+
and a contents of `src/main.c`:
31+
```
32+
#include <Foo.h>
33+
#include <Bar.h>
34+
35+
int main (void)
36+
{
37+
...
38+
}
39+
40+
```
41+
42+
PlatformIO Library Dependency Finder will find automatically dependent
43+
libraries scanning project source files.
44+
45+
More information about PlatformIO Library Dependency Finder
46+
- https://docs.platformio.org/page/librarymanager/ldf.html
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
# Name, Type, SubType, Offset, Size, Flags
3+
nvs, data, nvs, 0x9000, 0x5000,
4+
otadata, data, ota, 0xe000, 0x2000,
5+
app0, app, ota_0, 0x10000, 0x1E0000,
6+
app1, app, ota_1, 0x1F0000,0x1E0000,
7+
eeprom, data, 0x99, 0x3F0000,0x1000,
8+
spiffs, data, spiffs, 0x3F1000,0xF000,

examples/simple_test/platformio.ini

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
; PlatformIO Project Configuration File
2+
;
3+
; Build options: build flags, source filter
4+
; Upload options: custom upload port, speed and extra flags
5+
; Library options: dependencies, extra library storages
6+
; Advanced options: extra scripting
7+
;
8+
; Please visit documentation for the other options and examples
9+
; https://docs.platformio.org/page/projectconf.html
10+
11+
[env:esp32dev]
12+
platform = espressif32
13+
board = esp32dev
14+
framework = arduino
15+
monitor_speed = 115200
16+
17+
build_flags = -D LOG_LOCAL_LEVEL=ESP_LOG_DEBUG -frtti -std=c++14 -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
18+
build_unflags = -fno-rtti -std=gnu++11
19+
lib_deps =
20+
MariusSchiffer/ESP32_BLE_Arduino
21+
PubSubClient
22+
MariusSchiffer/esp32-keyble
23+
24+
board_build.partitions = partitions_ble.csv

0 commit comments

Comments
 (0)