Skip to content

Commit

Permalink
refactor: move header to include subdir
Browse files Browse the repository at this point in the history
docs: add PlatformIO example integration to README.md
  • Loading branch information
ardnew committed Apr 17, 2024
1 parent 7af9d21 commit 2843b59
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,25 @@ CXXFLAGS += $(CFLAGS) -std=gnu++17
###### Manual<sub>**_B_**</sub>
Fetch repository, copy [`src/cronos.h`](src/cronos.h) into your project, add `#include "cronos.h"` to your sources.

###### PlatformIO
For bare-metal applications using `platformio.ini`, add the following to `lib_deps` for your environment:

```ini
[env]
lib_deps =
https://github.com/ardnew/cronos.git#v0.2.0
```

For library project using `library.json`, add the following to "dependencies":

```json
{
"dependencies": {
"ardnew/cronos": "^0.2.0"
}
}
```

###### Arduino
This [library](library.properties) conforms to the [Arduino Library Specification (1.5)](https://arduino.github.io/arduino-cli/0.34/library-specification/). Install using the Library Manager via [IDE](https://github.com/arduino/arduino-ide) (or [GUI](https://github.com/arduino/Arduino)) or with command `arduino-cli lib install cronos` using the [CLI](https://github.com/arduino/arduino-cli).

Expand Down
File renamed without changes.
10 changes: 7 additions & 3 deletions library.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "cronos",
"keywords": "timer, chrono, std, std::chrono, tick, ticks, uptime, clock, c++17, constexpr, library",
"version": "0.2.0",
"description": "A std::chrono wrapper for target system's native tick count.",
"keywords": "timer, chrono, std, std::chrono, tick, ticks, uptime, clock, c++17, constexpr, library",
"homepage": "https://github.com/ardnew/cronos",
"authors": [
{
Expand All @@ -16,11 +17,14 @@
"url": "https://github.com/ardnew/cronos.git"
},
"license": "MIT",
"version": "0.1.6",
"frameworks": "*",
"platforms": "*",
"dependencies": {},
"headers": [
"cronos.hpp"
],
"build": {
"flags": "-std=c++17"
"unflags": [ "-std=gnu++11", "-std=gnu++14" ],
"flags": [ "-std=c++17" ]
}
}

0 comments on commit 2843b59

Please sign in to comment.