From 2843b59dfb7bad0b1d67201f841dcd2d8778d9f7 Mon Sep 17 00:00:00 2001 From: ardnew Date: Tue, 16 Apr 2024 21:21:51 -0500 Subject: [PATCH] refactor: move header to include subdir docs: add PlatformIO example integration to README.md --- README.md | 19 +++++++++++++++++++ {src => include}/cronos.hpp | 0 library.json | 10 +++++++--- 3 files changed, 26 insertions(+), 3 deletions(-) rename {src => include}/cronos.hpp (100%) diff --git a/README.md b/README.md index 88b662c..d28833a 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,25 @@ CXXFLAGS += $(CFLAGS) -std=gnu++17 ###### Manual**_B_** 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). diff --git a/src/cronos.hpp b/include/cronos.hpp similarity index 100% rename from src/cronos.hpp rename to include/cronos.hpp diff --git a/library.json b/library.json index 918e264..ac8d1cb 100644 --- a/library.json +++ b/library.json @@ -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": [ { @@ -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" ] } }