Compare commits

...

61 commits

Author SHA1 Message Date
Renovate Bot d9c7974cae chore(deps): update dependency mimic to v1.8.2
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-06-23 22:33:59 +12:00
Renovate Bot e70cca07ea chore(deps): update dependency mimic to v1.8.1
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2024-06-23 00:34:44 +12:00
Renovate Bot 068191928e chore(deps): update dependency mimic to v1.8.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-06-22 22:34:24 +12:00
Renovate Bot 9d113abf03 chore(deps): update dependency elixir to v1.17.1
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing
2024-06-19 01:15:18 +12:00
Renovate Bot b40d52321b chore(deps): update dependency elixir to v1.17.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-06-15 13:36:05 +12:00
Renovate Bot bfb8fc8dd7 chore(deps): update dependency credo to v1.7.7
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-06-15 12:45:08 +12:00
Renovate Bot b16a8bf079 chore(deps): update dependency elixir to v1.16.3
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-05-21 11:15:41 +12:00
Renovate Bot f389cf96d0 chore(deps): update dependency erlang to v27
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-05-20 21:37:37 +12:00
Renovate Bot 8d1e6a2379 chore(deps): update dependency git_ops to v2.6.1
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-05-11 10:34:59 +12:00
Renovate Bot 3018037fe3 chore(deps): update dependency credo to v1.7.6
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-05-09 23:53:52 +12:00
Renovate Bot 195902f581 chore(deps): update dependency erlang to v26.2.5
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-05-03 03:32:26 +12:00
Renovate Bot 9e15a4860e chore(deps): update dependency wafer to v1.1.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-04-24 14:36:53 +12:00
Renovate Bot 7f70af47c4 chore(deps): update dependency circuits_i2c to v2.0.4
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-04-21 00:28:58 +12:00
Renovate Bot 5f2666850e chore(deps): update dependency erlang to v26.2.4
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-04-13 00:30:58 +12:00
James Harton 3d17c73984
chore: fix docs release.
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-14 19:26:45 +13:00
Renovate Bot 2df4ee4714 chore(deps): update dependency git_ops to v2.6.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-03-14 15:17:28 +13:00
Renovate Bot 9e8bbb4979 chore(deps): update dependency credo to v1.7.5
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-03-14 00:45:09 +00:00
Renovate Bot 25c2e7b17c chore(deps): update dependency mimic to v1.7.4
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-14 12:22:06 +13:00
Renovate Bot 8d53fc4521 chore(deps): update dependency wafer to v1.0.3
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-14 12:14:06 +13:00
Renovate Bot fdd0d80fa9 chore(deps): update dependency earmark to v1.4.46
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-14 12:10:45 +13:00
Renovate Bot 8f07460bef chore(deps): update dependency circuits_i2c to v2.0.3
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-03-13 21:05:49 +00:00
Renovate Bot 3f52a94951 chore(deps): update dependency elixir to v1.16.2
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-03-11 00:32:15 +13:00
James Harton c8f232872e
chore: fix typo in readme
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-08 14:46:26 +13:00
Renovate Bot a998cbf1f5 chore(deps): update dependency erlang to v26.2.3
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-03-07 22:24:41 +13:00
Renovate Bot d20dd6fe0f chore(deps): update dependency ex_check to ~> 0.16
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-03-01 23:22:10 +13:00
James Harton c55527e916
chore: release version v1.0.1
All checks were successful
continuous-integration/drone/push Build is passing
2024-02-23 20:19:17 +13:00
James Harton 307953a27d
chore: Add ex_check. 2024-02-23 20:17:54 +13:00
James Harton e0718892ac
docs: Update README and package links. 2024-02-23 20:17:41 +13:00
Renovate Bot cc6ae62dbb chore: Configure Renovate (#24)
All checks were successful
continuous-integration/drone/push Build is passing
Welcome to [Renovate](https://github.com/renovatebot/renovate)! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.

---
### Detected Package Files

 * `.tool-versions` (asdf)
 * `.drone.yml` (droneci)
 * `mix.exs` (mix)

### Configuration Summary

Based on the default config's presets, Renovate will:

  - Start dependency updates only once this onboarding PR is merged
  - Enable Renovate Dependency Dashboard creation.
  - Use semantic commit type `fix` for dependencies and `chore` for all others if semantic commits are in use.
  - Ignore `node_modules`, `bower_components`, `vendor` and various test/tests directories.
  - Group known monorepo packages together.
  - Use curated list of recommended non-monorepo package groupings.
  - Apply crowd-sourced package replacement rules.
  - Apply crowd-sourced workarounds for known problems with packages.
  - Use semantic prefixes for commit messages and PR titles.
  - Use `chore` as semantic commit type for commit messages and PR titles.
  - Removes rate limit for PR creation per hour.
  - Remove limit for open PRs at any time.
  - Automerge all upgrades (including `major`) if they pass tests.
  - Assign PRs to `james`.
  - Rebase existing PRs any time the base branch has been updated.
  - Raise PR when vulnerability alerts are detected.
  - Disable Renovate Dependency Dashboard creation.

🔡 Do you want to change how Renovate upgrades your dependencies? Add your custom config to `renovate.json` in this branch. Renovate will update the Pull Request description the next time it runs.

---

### What to Expect

With your current configuration, Renovate will create 1 Pull Request:

<details>
<summary>chore(deps): update dependency ex_doc to ~> 0.31</summary>

  - Schedule: ["at any time"]
  - Branch name: `renovate/ex_doc-0.x`
  - Merge into: `main`
  - Upgrade ex_doc to `~> 0.31`

</details>

---

 Got questions? Check out Renovate's [Docs](https://docs.renovatebot.com/), particularly the Getting Started section.
If you need any further assistance then you can also [request help here](https://github.com/renovatebot/renovate/discussions).

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).

<!--renovate-config-hash:758a0db051676a629cb8daada3244b6287c728a47d095002c4ae62062eae6bf3-->

Reviewed-on: #24
Co-authored-by: Renovate Bot <bot@harton.nz>
Co-committed-by: Renovate Bot <bot@harton.nz>
2024-02-14 17:42:26 +13:00
James Harton 16e91d3c47 chore: migrate to local (#23)
All checks were successful
continuous-integration/drone/push Build is passing
* Add Drone CI configuration
* Change URLs
* Remove Gitlab CI configuration

Reviewed-on: #23
Co-authored-by: James Harton <james@harton.nz>
Co-committed-by: James Harton <james@harton.nz>
2024-02-14 15:52:35 +13:00
James Harton 4658c6d13d
chore(deps): Update wafer, circuits_i2c and elixir_make in lockstep. 2023-08-23 09:40:15 +12:00
James Harton 7b645ad520 chore(deps): update dependency circuits_i2c to v2 2023-08-15 07:12:31 +12:00
James Harton c1951ae219 chore(deps): update dependency ex_doc to ~> 0.30 2023-07-07 23:14:19 +12:00
James Harton d4c91a0deb chore(deps): update dependency wafer to v1 2023-01-17 11:58:44 +13:00
James Harton dd13ff39a6 chore: release version v1.0.0 2023-01-16 22:07:59 +00:00
James Harton d9c89890de chore!: Relicense to HL3-FULL. 2023-01-17 11:03:54 +13:00
James Harton 9d8c4b709d chore(deps): update dependency ex_doc to ~> 0.29 2022-10-20 06:15:07 +13:00
James Harton 774ea788cc chore(deps): update dependency ex_doc to >= 0.28.1 2022-02-23 11:10:57 +13:00
James Harton 5206dbdae1 chore(deps): update dependency earmark to >= 1.4.20 2022-01-31 13:02:17 +13:00
James Harton cb82ce983f chore(deps): update dependency mimic to ~> 1.5 2021-12-09 17:01:59 +13:00
James Harton 6fdab594c5 chore(deps): update dependency git_ops to ~> 2.4 2021-12-09 16:00:36 +13:00
James Harton 7c72684495 chore(deps): update dependency ex_doc to >= 0.26.0 2021-12-09 14:26:25 +13:00
James Harton 58a3d2afe3 chore(deps): update dependency earmark to v1 2021-12-09 12:57:44 +13:00
James Harton 32155ecb32 chore(deps): update dependency earmark to >= 0.2.1 2021-12-09 11:06:33 +13:00
James Harton 2843c50c80 chore(credo): fix linting issues. 2021-12-09 10:51:39 +13:00
James Harton 61747d528c chore(deps): update dependency credo to ~> 1.6 2021-12-09 10:38:36 +13:00
James Harton dad9343039 chore: update renovate.json 2021-12-09 09:46:09 +13:00
James Harton 619ad91ef2 chore: change default branch to main. 2021-12-08 17:52:48 +13:00
James Harton 73d59705b3 chore(deps): Update dependency circuits_i2c to v1 2021-11-29 15:48:46 +13:00
James Harton e28c0f934b chore: set up git_ops and auto-releasing 2020-12-28 19:15:13 +13:00
James Harton ed5df7f717 chore(dev-deps): update ex_doc to 0.23.0
See merge request jimsy/mpl3115a2!3
2020-12-28 06:10:54 +00:00
James Harton c73e57d525 chore(dev-deps): update ex_doc to 0.23.0 2020-12-28 19:08:29 +13:00
James Harton a1123702d8 Merge branch 'renovate/wafer-0.x' into 'master'
Update dependency wafer to ~> 0.3

See merge request jimsy/mpl3115a2!2
2020-12-28 01:56:36 +00:00
James Harton 41de5d714b Update dependency wafer to ~> 0.3 2020-12-28 14:53:47 +13:00
James Harton 830a5046a0 Merge branch 'renovate/configure' into 'master'
Configure Renovate

See merge request jimsy/mpl3115a2!1
2020-07-21 02:46:11 +00:00
James Harton a77d527d4d Add renovate.json 2020-07-21 02:34:16 +00:00
James Harton a4d6c7b7bd Fix credo warnings. 2020-01-30 20:21:49 +13:00
James Harton 5a2db0c1c5 Add gitlab CI. 2020-01-30 20:15:31 +13:00
James Harton 60e66efb32 Bump to 0.3.0. 2020-01-30 20:07:33 +13:00
James Harton 5001dfded6 Switch to Wafer. 2020-01-23 17:30:48 +13:00
James Harton 3a5e044326 Bump version to 0.2.1 2019-12-20 10:19:23 +13:00
16 changed files with 2533 additions and 2037 deletions

382
.drone.yml Normal file
View file

@ -0,0 +1,382 @@
kind: pipeline
type: docker
name: build
steps:
- name: restore ASDF cache
image: meltwater/drone-cache
pull: "always"
environment:
AWS_ACCESS_KEY_ID:
from_secret: ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: SECRET_ACCESS_KEY
AWS_PLUGIN_PATH_STYLE: true
settings:
restore: true
endpoint:
from_secret: S3_ENDPOINT
bucket:
from_secret: CACHE_BUCKET
region: us-east-1
path-style: true
cache_key: 'asdf-{{ os }}-{{ arch }}-{{ checksum ".tool-versions" }}'
mount:
- .asdf
- name: restore build cache
image: meltwater/drone-cache
environment:
AWS_ACCESS_KEY_ID:
from_secret: ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: SECRET_ACCESS_KEY
AWS_PLUGIN_PATH_STYLE: true
settings:
restore: true
endpoint:
from_secret: S3_ENDPOINT
bucket:
from_secret: CACHE_BUCKET
region: us-east-1
path-style: true
cache_key: 'elixir-{{ checksum "mix.lock" }}-{{ checksum ".tool-versions" }}'
mount:
- deps
- _build
- .hex
- .mix
- .rebar3
- name: install dependencies
image: harton.dev/james/asdf_container:latest
pull: "always"
environment:
MIX_ENV: test
HEX_HOME: /drone/src/.hex
MIX_HOME: /drone/src/.mix
REBAR_BASE_DIR: /drone/src/.rebar3
ASDF_DATA_DIR: /drone/src/.asdf
ASDF_DIR: /root/.asdf
depends_on:
- restore ASDF cache
- restore build cache
commands:
- asdf_install
- rm -rf .asdf/downloads
- . $ASDF_DIR/asdf.sh
- mix local.hex --if-missing --force
- mix local.rebar --if-missing --force
- mix deps.get
- mix deps.compile
- mix dialyzer --plt
- name: store ASDF cache
image: meltwater/drone-cache
environment:
AWS_ACCESS_KEY_ID:
from_secret: ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: SECRET_ACCESS_KEY
AWS_PLUGIN_PATH_STYLE: true
depends_on:
- install dependencies
settings:
rebuild: true
override: false
endpoint:
from_secret: S3_ENDPOINT
bucket:
from_secret: CACHE_BUCKET
region: us-east-1
path-style: true
cache_key: 'asdf-{{ os }}-{{ arch }}-{{ checksum ".tool-versions" }}'
mount:
- .asdf
- name: store build cache
image: meltwater/drone-cache
environment:
AWS_ACCESS_KEY_ID:
from_secret: ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: SECRET_ACCESS_KEY
AWS_PLUGIN_PATH_STYLE: true
depends_on:
- install dependencies
settings:
rebuild: true
override: false
endpoint:
from_secret: S3_ENDPOINT
bucket:
from_secret: CACHE_BUCKET
region: us-east-1
path-style: true
cache_key: 'elixir-{{ checksum "mix.lock" }}-{{ checksum ".tool-versions" }}'
mount:
- deps
- _build
- .hex
- .mix
- .rebar3
- name: mix compile
image: harton.dev/james/asdf_container:latest
environment:
MIX_ENV: test
HEX_HOME: /drone/src/.hex
MIX_HOME: /drone/src/.mix
REBAR_BASE_DIR: /drone/src/.rebar3
ASDF_DATA_DIR: /drone/src/.asdf
depends_on:
- install dependencies
commands:
- asdf mix compile --warnings-as-errors
- name: mix test
image: harton.dev/james/asdf_container:latest
environment:
MIX_ENV: test
HEX_HOME: /drone/src/.hex
MIX_HOME: /drone/src/.mix
REBAR_BASE_DIR: /drone/src/.rebar3
ASDF_DATA_DIR: /drone/src/.asdf
depends_on:
- mix compile
commands:
- asdf mix test
- name: mix credo
image: harton.dev/james/asdf_container:latest
environment:
MIX_ENV: test
HEX_HOME: /drone/src/.hex
MIX_HOME: /drone/src/.mix
REBAR_BASE_DIR: /drone/src/.rebar3
ASDF_DATA_DIR: /drone/src/.asdf
depends_on:
- mix compile
commands:
- asdf mix credo --strict
- name: mix dialyzer
image: harton.dev/james/asdf_container:latest
environment:
MIX_ENV: test
HEX_HOME: /drone/src/.hex
MIX_HOME: /drone/src/.mix
REBAR_BASE_DIR: /drone/src/.rebar3
ASDF_DATA_DIR: /drone/src/.asdf
depends_on:
- mix compile
commands:
- asdf mix dialyzer
- name: mix hex.audit
image: harton.dev/james/asdf_container:latest
environment:
MIX_ENV: test
HEX_HOME: /drone/src/.hex
MIX_HOME: /drone/src/.mix
REBAR_BASE_DIR: /drone/src/.rebar3
ASDF_DATA_DIR: /drone/src/.asdf
depends_on:
- mix compile
commands:
- asdf mix hex.audit
- name: mix format
image: harton.dev/james/asdf_container:latest
environment:
MIX_ENV: test
HEX_HOME: /drone/src/.hex
MIX_HOME: /drone/src/.mix
REBAR_BASE_DIR: /drone/src/.rebar3
ASDF_DATA_DIR: /drone/src/.asdf
depends_on:
- mix compile
commands:
- asdf mix format --check-formatted
- name: mix deps.unlock
image: harton.dev/james/asdf_container:latest
environment:
MIX_ENV: test
HEX_HOME: /drone/src/.hex
MIX_HOME: /drone/src/.mix
REBAR_BASE_DIR: /drone/src/.rebar3
ASDF_DATA_DIR: /drone/src/.asdf
depends_on:
- mix compile
commands:
- asdf mix deps.unlock --check-unused
- name: mix doctor
image: harton.dev/james/asdf_container:latest
environment:
MIX_ENV: test
HEX_HOME: /drone/src/.hex
MIX_HOME: /drone/src/.mix
REBAR_BASE_DIR: /drone/src/.rebar3
ASDF_DATA_DIR: /drone/src/.asdf
depends_on:
- mix compile
commands:
- asdf mix doctor --full
- name: mix git_ops.check_message
image: harton.dev/james/asdf_container:latest
environment:
MIX_ENV: test
HEX_HOME: /drone/src/.hex
MIX_HOME: /drone/src/.mix
REBAR_BASE_DIR: /drone/src/.rebar3
ASDF_DATA_DIR: /drone/src/.asdf
depends_on:
- mix compile
commands:
- git log -1 --format=%s > .last_commit_message
- asdf mix git_ops.check_message .last_commit_message
- name: mix git_ops.release
image: harton.dev/james/asdf_container:latest
when:
branch:
- main
event:
exclude:
- pull_request
depends_on:
- mix test
- mix credo
- mix dialyzer
- mix hex.audit
- mix format
- mix deps.unlock
- mix doctor
- mix git_ops.check_message
environment:
MIX_ENV: test
HEX_HOME: /drone/src/.hex
MIX_HOME: /drone/src/.mix
REBAR_BASE_DIR: /drone/src/.rebar3
ASDF_DATA_DIR: /drone/src/.asdf
ASDF_DIR: /root/.asdf
DRONE_TOKEN:
from_secret: DRONE_TOKEN
commands:
- git fetch --tags
- . $ASDF_DIR/asdf.sh
- mix git_ops.project_info --format=shell > before.env
- mix git_ops.release --yes --no-major || true
- mix git_ops.project_info --format=shell > after.env
- . ./before.env
- export OLD_APP_VERSION=$${APP_VERSION}
- . ./after.env
- export NEW_APP_VERSION=$${APP_VERSION}
- if [ "v$${OLD_APP_VERSION}" != "v$${NEW_APP_VERSION}" ]; then
- export GIT_URL=$(echo $DRONE_GIT_HTTP_URL | sed -e "s/:\\/\\//:\\/\\/$DRONE_REPO_OWNER:$DRONE_TOKEN@/")
- git push $${GIT_URL} "HEAD:${DRONE_COMMIT_REF}" "refs/tags/v$${NEW_APP_VERSION}"
- fi
- name: build artifacts
image: harton.dev/james/asdf_container:latest
when:
event:
- tag
refs:
include:
- refs/tags/v*
depends_on:
- mix test
- mix credo
- mix dialyzer
- mix hex.audit
- mix format
- mix deps.unlock
- mix doctor
- mix git_ops.check_message
environment:
MIX_ENV: test
HEX_HOME: /drone/src/.hex
MIX_HOME: /drone/src/.mix
REBAR_BASE_DIR: /drone/src/.rebar3
ASDF_DATA_DIR: /drone/src/.asdf
ASDF_DIR: /root/.asdf
commands:
- . $ASDF_DIR/asdf.sh
- mix git_ops.project_info --format=shell > app.env
- . ./app.env
- mkdir artifacts
- mix hex.build -o "artifacts/$${APP_NAME}-$${APP_VERSION}-pkg.tar"
- gzip "artifacts/$${APP_NAME}-$${APP_VERSION}-pkg.tar"
- mix docs
- tar zcvf "artifacts/$${APP_NAME}-$${APP_VERSION}-docs.tar.gz" doc/
- git tag -l --format='%(contents:subject)' v$${APP_VERSION} > tag_subject
- git tag -l --format='%(contents:body)' v$${APP_VERSION} > tag_body
- name: gitea release
image: plugins/gitea-release
when:
event:
- tag
refs:
include:
- refs/tags/v*
depends_on:
- build artifacts
settings:
api_key:
from_secret: DRONE_TOKEN
base_url: https://harton.dev
files: artifacts/*.tar.gz
checksum: sha256
title: tag_subject
note: tag_body
- name: docs release
when:
event:
- tag
refs:
include:
- refs/tags/v*
image: minio/mc
environment:
S3_ENDPOINT:
from_secret: S3_ENDPOINT
ACCESS_KEY:
from_secret: ACCESS_KEY_ID
SECRET_KEY:
from_secret: SECRET_ACCESS_KEY
depends_on:
- build artifacts
commands:
- mc alias set store $${S3_ENDPOINT} $${ACCESS_KEY} $${SECRET_KEY}
- mc mb -p store/docs.harton.nz
- mc mirror --overwrite doc/ store/docs.harton.nz/$${DRONE_REPO}/$${DRONE_TAG}
- mc mirror --overwrite doc/ store/docs.harton.nz/$${DRONE_REPO}
- name: hex release
image: harton.dev/james/asdf_container:latest
when:
event:
- tag
refs:
include:
- refs/tags/v*
depends_on:
- build artifacts
environment:
MIX_ENV: test
HEX_HOME: /drone/src/.hex
MIX_HOME: /drone/src/.mix
REBAR_BASE_DIR: /drone/src/.rebar3
ASDF_DATA_DIR: /drone/src/.asdf
ASDF_DIR: /root/.asdf
HEX_API_KEY:
from_secret: HEX_API_KEY
commands:
- . $ASDF_DIR/asdf.sh
- mix hex.publish --yes

2
.tool-versions Normal file
View file

@ -0,0 +1,2 @@
erlang 27.0
elixir 1.17.1

19
CHANGELOG.md Normal file
View file

@ -0,0 +1,19 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](Https://conventionalcommits.org) for commit guidelines.
<!-- changelog -->
## [v1.0.1](https://harton.dev/james/mpl3115a2/compare/v1.0.0...v1.0.1) (2024-02-23)
## [v1.0.0](https://harton.dev/james/mpl3115a2/compare/v0.3.0...v1.0.0) (2023-01-16)
### Breaking Changes:
- Relicense to HL3-FULL.
## [v0.3.0](https://harton.dev/james/mpl3115a2/compare/v0.3.0...v0.3.0) (2020-12-28)

151
LICENSE.md Normal file
View file

@ -0,0 +1,151 @@
Copyright 2022 James Harton ("Licensor")
**HIPPOCRATIC LICENSE**
**Version 3.0, October 2021**
<https://firstdonoharm.dev/version/3/0/full.md>
**TERMS AND CONDITIONS**
TERMS AND CONDITIONS FOR USE, COPY, MODIFICATION, PREPARATION OF DERIVATIVE WORK, REPRODUCTION, AND DISTRIBUTION:
**[1.](#1) DEFINITIONS:**
_This section defines certain terms used throughout this license agreement._
[1.1.](#1.1) “License” means the terms and conditions, as stated herein, for use, copy, modification, preparation of derivative work, reproduction, and distribution of Software (as defined below).
[1.2.](#1.2) “Licensor” means the copyright and/or patent owner or entity authorized by the copyright and/or patent owner that is granting the License.
[1.3.](#1.3) “Licensee” means the individual or entity exercising permissions granted by this License, including the use, copy, modification, preparation of derivative work, reproduction, and distribution of Software (as defined below).
[1.4.](#1.4) “Software” means any copyrighted work, including but not limited to software code, authored by Licensor and made available under this License.
[1.5.](#1.5) “Supply Chain” means the sequence of processes involved in the production and/or distribution of a commodity, good, or service offered by the Licensee.
[1.6.](#1.6) “Supply Chain Impacted Party” or “Supply Chain Impacted Parties” means any person(s) directly impacted by any of Licensees Supply Chain, including the practices of all persons or entities within the Supply Chain prior to a good or service reaching the Licensee.
[1.7.](#1.7) “Duty of Care” is defined by its use in tort law, delict law, and/or similar bodies of law closely related to tort and/or delict law, including without limitation, a requirement to act with the watchfulness, attention, caution, and prudence that a reasonable person in the same or similar circumstances would use towards any Supply Chain Impacted Party.
[1.8.](#1.8) “Worker” is defined to include any and all permanent, temporary, and agency workers, as well as piece-rate, salaried, hourly paid, legal young (minors), part-time, night, and migrant workers.
**[2.](#2) INTELLECTUAL PROPERTY GRANTS:**
_This section identifies intellectual property rights granted to a Licensee_.
[2.1.](#2.1) _Grant of Copyright License_: Subject to the terms and conditions of this License, Licensor hereby grants to Licensee a worldwide, non-exclusive, no-charge, royalty-free copyright license to use, copy, modify, prepare derivative work, reproduce, or distribute the Software, Licensor authored modified software, or other work derived from the Software.
[2.2.](#2.2) _Grant of Patent License_: Subject to the terms and conditions of this License, Licensor hereby grants Licensee a worldwide, non-exclusive, no-charge, royalty-free patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer Software.
**[3.](#3) ETHICAL STANDARDS:**
_This section lists conditions the Licensee must comply with in order to have rights under this License._
The rights granted to the Licensee by this License are expressly made subject to the Licensees ongoing compliance with the following conditions:
* [3.1.](#3.1) The Licensee SHALL NOT, whether directly or indirectly, through agents or assigns:
* [3.1.1.](#3.1.1) Infringe upon any persons right to life or security of person, engage in extrajudicial killings, or commit murder, without lawful cause (See Article 3, _United Nations Universal Declaration of Human Rights_; Article 6, _International Covenant on Civil and Political Rights_)
* [3.1.2.](#3.1.2) Hold any person in slavery, servitude, or forced labor (See Article 4, _United Nations Universal Declaration of Human Rights_; Article 8, _International Covenant on Civil and Political Rights_);
* [3.1.3.](#3.1.3) Contribute to the institution of slavery, slave trading, forced labor, or unlawful child labor (See Article 4, _United Nations Universal Declaration of Human Rights_; Article 8, _International Covenant on Civil and Political Rights_);
* [3.1.4.](#3.1.4) Torture or subject any person to cruel, inhumane, or degrading treatment or punishment (See Article 5, _United Nations Universal Declaration of Human Rights_; Article 7, _International Covenant on Civil and Political Rights_);
* [3.1.5.](#3.1.5) Discriminate on the basis of sex, gender, sexual orientation, race, ethnicity, nationality, religion, caste, age, medical disability or impairment, and/or any other like circumstances (See Article 7, _United Nations Universal Declaration of Human Rights_; Article 2, _International Covenant on Economic, Social and Cultural Rights_; Article 26, _International Covenant on Civil and Political Rights_);
* [3.1.6.](#3.1.6) Prevent any person from exercising his/her/their right to seek an effective remedy by a competent court or national tribunal (including domestic judicial systems, international courts, arbitration bodies, and other adjudicating bodies) for actions violating the fundamental rights granted to him/her/them by applicable constitutions, applicable laws, or by this License (See Article 8, _United Nations Universal Declaration of Human Rights_; Articles 9 and 14, _International Covenant on Civil and Political Rights_);
* [3.1.7.](#3.1.7) Subject any person to arbitrary arrest, detention, or exile (See Article 9, _United Nations Universal Declaration of Human Rights_; Article 9, _International Covenant on Civil and Political Rights_);
* [3.1.8.](#3.1.8) Subject any person to arbitrary interference with a persons privacy, family, home, or correspondence without the express written consent of the person (See Article 12, _United Nations Universal Declaration of Human Rights_; Article 17, _International Covenant on Civil and Political Rights_);
* [3.1.9.](#3.1.9) Arbitrarily deprive any person of his/her/their property (See Article 17, _United Nations Universal Declaration of Human Rights_);
* [3.1.10.](#3.1.10) Forcibly remove indigenous peoples from their lands or territories or take any action with the aim or effect of dispossessing indigenous peoples from their lands, territories, or resources, including without limitation the intellectual property or traditional knowledge of indigenous peoples, without the free, prior, and informed consent of indigenous peoples concerned (See Articles 8 and 10, _United Nations Declaration on the Rights of Indigenous Peoples_);
* [3.1.11.](#3.1.11) _Fossil Fuel Divestment_: Be an individual or entity, or a representative, agent, affiliate, successor, attorney, or assign of an individual or entity, on the [FFI Solutions Carbon Underground 200 list](https://www.ffisolutions.com/research-analytics-index-solutions/research-screening/the-carbon-underground-200/?cn-reloaded=1);
* [3.1.12.](#3.1.12) _Ecocide_: Commit ecocide:
* [3.1.12.1.](#3.1.12.1) For the purpose of this section, “ecocide” means unlawful or wanton acts committed with knowledge that there is a substantial likelihood of severe and either widespread or long-term damage to the environment being caused by those acts;
* [3.1.12.2.](#3.1.12.2) For the purpose of further defining ecocide and the terms contained in the previous paragraph:
* [3.1.12.2.1.](#3.1.12.2.1) “Wanton” means with reckless disregard for damage which would be clearly excessive in relation to the social and economic benefits anticipated;
* [3.1.12.2.2.](#3.1.12.2.2) “Severe” means damage which involves very serious adverse changes, disruption, or harm to any element of the environment, including grave impacts on human life or natural, cultural, or economic resources;
* [3.1.12.2.3.](#3.1.12.2.3) “Widespread” means damage which extends beyond a limited geographic area, crosses state boundaries, or is suffered by an entire ecosystem or species or a large number of human beings;
* [3.1.12.2.4.](#3.1.12.2.4) “Long-term” means damage which is irreversible or which cannot be redressed through natural recovery within a reasonable period of time; and
* [3.1.12.2.5.](#3.1.12.2.5) “Environment” means the earth, its biosphere, cryosphere, lithosphere, hydrosphere, and atmosphere, as well as outer space
(See Section II, _Independent Expert Panel for the Legal Definition of Ecocide_, Stop Ecocide Foundation and the Promise Institute for Human Rights at UCLA School of Law, June 2021);
* [3.1.13.](#3.1.13) _Extractive Industries_: Be an individual or entity, or a representative, agent, affiliate, successor, attorney, or assign of an individual or entity, that engages in fossil fuel or mineral exploration, extraction, development, or sale;
* [3.1.14.](#3.1.14) _Boycott / Divestment / Sanctions_: Be an individual or entity, or a representative, agent, affiliate, successor, attorney, or assign of an individual or entity, identified by the Boycott, Divestment, Sanctions (“BDS”) movement on its website (<https://bdsmovement.net/> and <https://bdsmovement.net/get-involved/what-to-boycott>) as a target for boycott;
* [3.1.15.](#3.1.15) _Taliban_: Be an individual or entity that:
* [3.1.15.1.](#3.1.15.1) engages in any commercial transactions with the Taliban; or
* [3.1.15.2.](#3.1.15.2) is a representative, agent, affiliate, successor, attorney, or assign of the Taliban;
* [3.1.16.](#3.1.16) _Myanmar_: Be an individual or entity that:
* [3.1.16.1.](#3.1.16.1) engages in any commercial transactions with the Myanmar/Burmese military junta; or
* [3.1.16.2.](#3.1.16.2) is a representative, agent, affiliate, successor, attorney, or assign of the Myanmar/Burmese government;
* [3.1.17.](#3.1.17) _Xinjiang Uygur Autonomous Region_: Be an individual or entity, or a representative, agent, affiliate, successor, attorney, or assign of any individual or entity, that does business in, purchases goods from, or otherwise benefits from goods produced in the Xinjiang Uygur Autonomous Region of China;
* [3.1.18.](#3.1.18) _US Tariff Act_: Be an individual or entity:
* [3.1.18.1.](#3.1.18.1) which U.S. Customs and Border Protection (CBP) has currently issued a Withhold Release Order (WRO) or finding against based on reasonable suspicion of forced labor; or
* [3.1.18.2.](#3.1.18.2) that is a representative, agent, affiliate, successor, attorney, or assign of an individual or entity that does business with an individual or entity which currently has a WRO or finding from CBP issued against it based on reasonable suspicion of forced labor;
* [3.1.19.](#3.1.19) _Mass Surveillance_: Be a government agency or multinational corporation, or a representative, agent, affiliate, successor, attorney, or assign of a government or multinational corporation, which participates in mass surveillance programs;
* [3.1.20.](#3.1.20) _Military Activities_: Be an entity or a representative, agent, affiliate, successor, attorney, or assign of an entity which conducts military activities;
* [3.1.21.](#3.1.21) _Law Enforcement_: Be an individual or entity, or a or a representative, agent, affiliate, successor, attorney, or assign of an individual or entity, that provides good or services to, or otherwise enters into any commercial contracts with, any local, state, or federal law enforcement agency;
* [3.1.22.](#3.1.22) _Media_: Be an individual or entity, or a or a representative, agent, affiliate, successor, attorney, or assign of an individual or entity, that broadcasts messages promoting killing, torture, or other forms of extreme violence;
* [3.1.23.](#3.1.23) Interfere with Workers' free exercise of the right to organize and associate (See Article 20, United Nations Universal Declaration of Human Rights; C087 - Freedom of Association and Protection of the Right to Organise Convention, 1948 (No. 87), International Labour Organization; Article 8, International Covenant on Economic, Social and Cultural Rights); and
* [3.1.24.](#3.1.24) Harm the environment in a manner inconsistent with local, state, national, or international law.
* [3.2.](#3.2) The Licensee SHALL:
* [3.2.1.](#3.2.1) _Social Auditing_: Only use social auditing mechanisms that adhere to Worker-Driven Social Responsibility Networks Statement of Principles (<https://wsr-network.org/what-is-wsr/statement-of-principles/>) over traditional social auditing mechanisms, to the extent the Licensee uses any social auditing mechanisms at all;
* [3.2.2.](#3.2.2) _Workers on Board of Directors_: Ensure that if the Licensee has a Board of Directors, 30% of Licensees board seats are held by Workers paid no more than 200% of the compensation of the lowest paid Worker of the Licensee;
* [3.2.3.](#3.2.3) _Supply Chain_: Provide clear, accessible supply chain data to the public in accordance with the following conditions:
* [3.2.3.1.](#3.2.3.1) All data will be on Licensees website and/or, to the extent Licensee is a representative, agent, affiliate, successor, attorney, subsidiary, or assign, on Licensees principals or parents website or some other online platform accessible to the public via an internet search on a common internet search engine; and
* [3.2.3.2.](#3.2.3.2) Data published will include, where applicable, manufacturers, top tier suppliers, subcontractors, cooperatives, component parts producers, and farms;
* [3.2.4.](#3.2.4) Provide equal pay for equal work where the performance of such work requires equal skill, effort, and responsibility, and which are performed under similar working conditions, except where such payment is made pursuant to:
* [3.2.4.1.](#3.2.4.1) A seniority system;
* [3.2.4.2.](#3.2.4.2) A merit system;
* [3.2.4.3.](#3.2.4.3) A system which measures earnings by quantity or quality of production; or
* [3.2.4.4.](#3.2.4.4) A differential based on any other factor other than sex, gender, sexual orientation, race, ethnicity, nationality, religion, caste, age, medical disability or impairment, and/or any other like circumstances (See 29 U.S.C.A. § 206(d)(1); Article 23, _United Nations Universal Declaration of Human Rights_; Article 7, _International Covenant on Economic, Social and Cultural Rights_; Article 26, _International Covenant on Civil and Political Rights_); and
* [3.2.5.](#3.2.5) Allow for reasonable limitation of working hours and periodic holidays with pay (See Article 24, _United Nations Universal Declaration of Human Rights_; Article 7, _International Covenant on Economic, Social and Cultural Rights_).
**[4.](#4) SUPPLY CHAIN IMPACTED PARTIES:**
_This section identifies additional individuals or entities that a Licensee could harm as a result of violating the Ethical Standards section, the condition that the Licensee must voluntarily accept a Duty of Care for those individuals or entities, and the right to a private right of action that those individuals or entities possess as a result of violations of the Ethical Standards section._
[4.1.](#4.1) In addition to the above Ethical Standards, Licensee voluntarily accepts a Duty of Care for Supply Chain Impacted Parties of this License, including individuals and communities impacted by violations of the Ethical Standards. The Duty of Care is breached when a provision within the Ethical Standards section is violated by a Licensee, one of its successors or assigns, or by an individual or entity that exists within the Supply Chain prior to a good or service reaching the Licensee.
[4.2.](#4.2) Breaches of the Duty of Care, as stated within this section, shall create a private right of action, allowing any Supply Chain Impacted Party harmed by the Licensee to take legal action against the Licensee in accordance with applicable negligence laws, whether they be in tort law, delict law, and/or similar bodies of law closely related to tort and/or delict law, regardless if Licensee is directly responsible for the harms suffered by a Supply Chain Impacted Party. Nothing in this section shall be interpreted to include acts committed by individuals outside of the scope of his/her/their employment.
[5.](#5) **NOTICE:** _This section explains when a Licensee must notify others of the License._
[5.1.](#5.1) _Distribution of Notice_: Licensee must ensure that everyone who receives a copy of or uses any part of Software from Licensee, with or without changes, also receives the License and the copyright notice included with Software (and if included by the Licensor, patent, trademark, and attribution notice). Licensee must ensure that License is prominently displayed so that any individual or entity seeking to download, copy, use, or otherwise receive any part of Software from Licensee is notified of this License and its terms and conditions. Licensee must cause any modified versions of the Software to carry prominent notices stating that Licensee changed the Software.
[5.2.](#5.2) _Modified Software_: Licensee is free to create modifications of the Software and distribute only the modified portion created by Licensee, however, any derivative work stemming from the Software or its code must be distributed pursuant to this License, including this Notice provision.
[5.3.](#5.3) _Recipients as Licensees_: Any individual or entity that uses, copies, modifies, reproduces, distributes, or prepares derivative work based upon the Software, all or part of the Softwares code, or a derivative work developed by using the Software, including a portion of its code, is a Licensee as defined above and is subject to the terms and conditions of this License.
**[6.](#6) REPRESENTATIONS AND WARRANTIES:**
[6.1.](#6.1) _Disclaimer of Warranty_: TO THE FULL EXTENT ALLOWED BY LAW, THIS SOFTWARE COMES “AS IS,” WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED, AND LICENSOR SHALL NOT BE LIABLE TO ANY PERSON OR ENTITY FOR ANY DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THIS LICENSE, UNDER ANY LEGAL CLAIM.
[6.2.](#6.2) _Limitation of Liability_: LICENSEE SHALL HOLD LICENSOR HARMLESS AGAINST ANY AND ALL CLAIMS, DEBTS, DUES, LIABILITIES, LIENS, CAUSES OF ACTION, DEMANDS, OBLIGATIONS, DISPUTES, DAMAGES, LOSSES, EXPENSES, ATTORNEYS' FEES, COSTS, LIABILITIES, AND ALL OTHER CLAIMS OF EVERY KIND AND NATURE WHATSOEVER, WHETHER KNOWN OR UNKNOWN, ANTICIPATED OR UNANTICIPATED, FORESEEN OR UNFORESEEN, ACCRUED OR UNACCRUED, DISCLOSED OR UNDISCLOSED, ARISING OUT OF OR RELATING TO LICENSEES USE OF THE SOFTWARE. NOTHING IN THIS SECTION SHOULD BE INTERPRETED TO REQUIRE LICENSEE TO INDEMNIFY LICENSOR, NOR REQUIRE LICENSOR TO INDEMNIFY LICENSEE.
**[7.](#7) TERMINATION**
[7.1.](#7.1) _Violations of Ethical Standards or Breaching Duty of Care_: If Licensee violates the Ethical Standards section or Licensee, or any other person or entity within the Supply Chain prior to a good or service reaching the Licensee, breaches its Duty of Care to Supply Chain Impacted Parties, Licensee must remedy the violation or harm caused by Licensee within 30 days of being notified of the violation or harm. If Licensee fails to remedy the violation or harm within 30 days, all rights in the Software granted to Licensee by License will be null and void as between Licensor and Licensee.
[7.2.](#7.2) _Failure of Notice_: If any person or entity notifies Licensee in writing that Licensee has not complied with the Notice section of this License, Licensee can keep this License by taking all practical steps to comply within 30 days after the notice of noncompliance. If Licensee does not do so, Licensees License (and all rights licensed hereunder) will end immediately.
[7.3.](#7.3) _Judicial Findings_: In the event Licensee is found by a civil, criminal, administrative, or other court of competent jurisdiction, or some other adjudicating body with legal authority, to have committed actions which are in violation of the Ethical Standards or Supply Chain Impacted Party sections of this License, all rights granted to Licensee by this License will terminate immediately.
[7.4.](#7.4) _Patent Litigation_: If Licensee institutes patent litigation against any entity (including a cross-claim or counterclaim in a suit) alleging that the Software, all or part of the Softwares code, or a derivative work developed using the Software, including a portion of its code, constitutes direct or contributory patent infringement, then any patent license, along with all other rights, granted to Licensee under this License will terminate as of the date such litigation is filed.
[7.5.](#7.5) _Additional Remedies_: Termination of the License by failing to remedy harms in no way prevents Licensor or Supply Chain Impacted Party from seeking appropriate remedies at law or in equity.
**[8.](#8) MISCELLANEOUS:**
[8.1.](#8.1) _Conditions_: Sections 3, 4.1, 5.1, 5.2, 7.1, 7.2, 7.3, and 7.4 are conditions of the rights granted to Licensee in the License.
[8.2.](#8.2) _Equitable Relief_: Licensor and any Supply Chain Impacted Party shall be entitled to equitable relief, including injunctive relief or specific performance of the terms hereof, in addition to any other remedy to which they are entitled at law or in equity.
[8.3.](#8.3) _Copyleft_: Modified software, source code, or other derivative work must be licensed, in its entirety, under the exact same conditions as this License.
[8.4.](#8.4) _Severability_: If any term or provision of this License is determined to be invalid, illegal, or unenforceable by a court of competent jurisdiction, any such determination of invalidity, illegality, or unenforceability shall not affect any other term or provision of this License or invalidate or render unenforceable such term or provision in any other jurisdiction. If the determination of invalidity, illegality, or unenforceability by a court of competent jurisdiction pertains to the terms or provisions contained in the Ethical Standards section of this License, all rights in the Software granted to Licensee shall be deemed null and void as between Licensor and Licensee.
[8.5.](#8.5) _Section Titles_: Section titles are solely written for organizational purposes and should not be used to interpret the language within each section.
[8.6.](#8.6) _Citations_: Citations are solely written to provide context for the source of the provisions in the Ethical Standards.
[8.7.](#8.7) _Section Summaries_: Some sections have a brief _italicized description_ which is provided for the sole purpose of briefly describing the section and should not be used to interpret the terms of the License.
[8.8.](#8.8) _Entire License_: This is the entire License between the Licensor and Licensee with respect to the claims released herein and that the consideration stated herein is the only consideration or compensation to be paid or exchanged between them for this License. This License cannot be modified or amended except in a writing signed by Licensor and Licensee.
[8.9.](#8.9) _Successors and Assigns_: This License shall be binding upon and inure to the benefit of the Licensors and Licensees respective heirs, successors, and assigns.

View file

@ -1,7 +1,11 @@
# MPL3115A2
[![Build Status](https://drone.harton.dev/api/badges/james/mpl3115a2/status.svg)](https://drone.harton.dev/james/mpl3115a2)
[![Hex.pm](https://img.shields.io/hexpm/v/mpl3115a2.svg)](https://hex.pm/packages/mpl3115a2)
[![Hippocratic License HL3-FULL](https://img.shields.io/static/v1?label=Hippocratic%20License&message=HL3-FULL&labelColor=5e2751&color=bc8c3d)](https://firstdonoharm.dev/version/3/0/full.html)
Elixir driver for the MPL3115A2 barometric pressure, altitude and temperature
sensor. I'm using [Adafruit's breakout](https://www.adafruit.com/product/1893).
sensor. I'm using [Adafruit's breakout](https://www.adafruit.com/product/1893).
## Usage
@ -10,13 +14,13 @@ Add your device to your config like so:
config :mpl3115a2,
devices: [%{bus: "i2c-1", address: 0x60}]
And start your application. Your devices will be reset with defaults and you
will be able to take temperature and pressure or altitude readings. See
And start your application. Your devices will be reset with defaults and you
will be able to take temperature and pressure or altitude readings. See
`MPL3115A2.Commands.initialize!/1` for more details on the default
initialization.
This device is capable of much more advanced usage than the `MPL3115A2.Device`
module makes use of. It was all that I needed at the time. For advanced usage
module makes use of. It was all that I needed at the time. For advanced usage
you can use the `MPL3115A2.Commands` and `MPL3115A2.Registers` modules directly.
Feel free to send PR's.
@ -28,7 +32,7 @@ by adding `mpl3115a2` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:mpl3115a2, "~> 0.1.0"}
{:mpl3115a2, "~> 1.0.1"}
]
end
```
@ -37,3 +41,20 @@ Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_do
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/mpl3115a2](https://hexdocs.pm/mpl3115a2).
## Github Mirror
This repository is mirrored [on Github](https://github.com/jimsynz/mpl3115a2)
from it's primary location [on my Forgejo instance](https://harton.dev/james/mpl3115a2).
Feel free to raise issues and open PRs on Github.
## License
This software is licensed under the terms of the
[HL3-FULL](https://firstdonoharm.dev), see the `LICENSE.md` file included with
this package for the terms.
This license actively proscribes this software being used by and for some
industries, countries and activities. If your usage of this software doesn't
comply with the terms of this license, then [contact me](mailto:james@harton.nz)
with the details of your use-case to organise the purchase of a license - the
cost of which may include a donation to a suitable charity or NGO.

View file

@ -2,3 +2,11 @@ import Config
config :mpl3115a2,
devices: [%{bus: "i2c-1", address: 0x60}]
config :git_ops,
mix_project: Mix.Project.get!(),
changelog_file: "CHANGELOG.md",
repository_url: "https://harton.dev/james/mpl3115a2",
manage_mix_version?: true,
manage_readme_version: "README.md",
version_tag_prefix: "v"

File diff suppressed because it is too large Load diff

View file

@ -1,23 +0,0 @@
defmodule MPL3115A2.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
children = [
{Registry, keys: :unique, name: MPL3115A2.Registry}
]
devices =
:mpl3115a2
|> Application.get_env(:devices, [])
|> Enum.map(&{MPL3115A2.Device, &1})
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: MPL3115A2.Supervisor]
Supervisor.start_link(children ++ devices, opts)
end
end

File diff suppressed because it is too large Load diff

View file

@ -1,234 +0,0 @@
defmodule MPL3115A2.Device do
alias MPL3115A2.{Device, Commands}
alias ElixirALE.I2C
use GenServer
require Logger
@moduledoc """
A process which manages the MPL3115A2 peripheral.
"""
@type device_name :: any
@type altitude :: non_neg_integer()
@type pressure :: non_neg_integer()
@type temperature :: number
@doc """
Returns true of there is pressure or temperature data ready for reading.
"""
@spec pressure_or_temperature_data_ready?(pid | device_name) :: boolean
def pressure_or_temperature_data_ready?(pid) when is_pid(pid),
do: GenServer.call(pid, :pressure_or_temperature_data_ready?)
def pressure_or_temperature_data_ready?(device_name),
do:
GenServer.call(
{:via, Registry, {MPL3115A2.Registry, device_name}},
:pressure_or_temperature_data_ready?
)
@doc """
Returns true of there is pressure data ready for reading.
"""
@spec pressure_data_available?(pid | device_name) :: boolean
def pressure_data_available?(pid) when is_pid(pid),
do: GenServer.call(pid, :pressure_data_available?)
def pressure_data_available?(device_name),
do:
GenServer.call(
{:via, Registry, {MPL3115A2.Registry, device_name}},
:pressure_data_available?
)
@doc """
Returns true of there is temperature data ready for reading.
"""
@spec temperature_data_available?(pid | device_name) :: boolean
def temperature_data_available?(pid) when is_pid(pid),
do: GenServer.call(pid, :temperature_data_available?)
def temperature_data_available?(device_name),
do:
GenServer.call(
{:via, Registry, {MPL3115A2.Registry, device_name}},
:temperature_data_available?
)
@doc """
Returns the current altutude (in meters).
"""
@spec altitude(pid | device_name) :: altitude
def altitude(pid) when is_pid(pid), do: GenServer.call(pid, :altitude)
def altitude(device_name),
do:
GenServer.call(
{:via, Registry, {MPL3115A2.Registry, device_name}},
:altitude
)
@doc """
Returns the current barometric pressure (in Pascals).
"""
@spec pressure(pid | device_name) :: pressure
def pressure(pid) when is_pid(pid), do: GenServer.call(pid, :pressure)
def pressure(device_name),
do:
GenServer.call(
{:via, Registry, {MPL3115A2.Registry, device_name}},
:pressure
)
@doc """
Returns the current temperature (in )
"""
@spec temperature(pid | device_name) :: temperature
def temperature(pid) when is_pid(pid), do: GenServer.call(pid, :temperature)
def temperature(device_name),
do:
GenServer.call(
{:via, Registry, {MPL3115A2.Registry, device_name}},
:temperature
)
@doc """
Returns the change in altitude since the last sample (in meters).
"""
@spec altitude_delta(pid | device_name) :: altitude
def altitude_delta(pid) when is_pid(pid), do: GenServer.call(pid, :altitude_delta)
def altitude_delta(device_name),
do:
GenServer.call(
{:via, Registry, {MPL3115A2.Registry, device_name}},
:altitude_delta
)
@doc """
Returns the change in pressure since the last sample (in Pascals).
"""
@spec pressure_delta(pid | device_name) :: pressure
def pressure_delta(pid) when is_pid(pid), do: GenServer.call(pid, :pressure_delta)
def pressure_delta(device_name),
do:
GenServer.call(
{:via, Registry, {MPL3115A2.Registry, device_name}},
:pressure_delta
)
@doc """
Returns the change in temperature since the last sample (in )
"""
@spec temperature_delta(pid | device_name) :: temperature
def temperature_delta(pid) when is_pid(pid), do: GenServer.call(pid, :temperature_delta)
def temperature_delta(device_name),
do:
GenServer.call(
{:via, Registry, {MPL3115A2.Registry, device_name}},
:temperature_delta
)
@doc """
Execute an arbitrary function with the PID of the I2C connection.
"""
@spec execute(pid | device_name, (pid -> any)) :: any
def execute(pid, function) when is_pid(pid) and is_function(function, 1),
do: GenServer.call(pid, {:execute, function})
def execute(device_name, function) when is_function(function, 1),
do: GenServer.call({:via, Registry, {MPL3115A2.Registry, device_name}}, {:execute, function})
@doc false
def start_link(config), do: GenServer.start_link(Device, config)
@impl true
def init(%{bus: bus, address: address} = state) do
name = device_name(state)
{:ok, _} = Registry.register(MPL3115A2.Registry, name, self())
Process.flag(:trap_exit, true)
Logger.info("Connecting to MPL3115A2 device on #{inspect(name)}")
{:ok, pid} = I2C.start_link(bus, address)
with 0xC4 <- Commands.who_am_i(pid),
:ok <- Commands.initialize!(pid, state) do
state =
state
|> Map.merge(%{name: name, i2c: pid})
{:ok, state}
else
i when is_integer(i) ->
{:stop, "Device responded incorrectly to WHO_AM_I command with #{inspect(i)}"}
{:error, message} ->
{:stop, message}
end
end
@impl true
def terminate(_reason, %{i2c: pid, name: name}) do
Logger.info("Disconnecting from MPL3115A2 device on #{inspect(name)}")
I2C.release(pid)
end
@impl true
def handle_call(:pressure_or_temperature_data_ready?, _from, %{i2c: pid} = state) do
{:reply, Commands.pressure_or_temperature_data_ready(pid), state}
end
def handle_call(:pressure_data_available?, _from, %{i2c: pid} = state) do
{:reply, Commands.pressure_data_available(pid), state}
end
def handle_call(:temperature_data_available?, _from, %{i2c: pid} = state) do
{:reply, Commands.temperature_data_available(pid), state}
end
def handle_call(:altitude, _from, %{i2c: pid} = state) do
{:reply, Commands.altitude(pid), state}
end
def handle_call(:temperature, _from, %{i2c: pid} = state) do
{:reply, Commands.temperature(pid), state}
end
def handle_call(:pressure, _from, %{i2c: pid} = state) do
{:reply, Commands.pressure(pid), state}
end
def handle_call(:altitude_delta, _from, %{i2c: pid} = state) do
{:reply, Commands.altitude_delta(pid), state}
end
def handle_call(:temperature_delta, _from, %{i2c: pid} = state) do
{:reply, Commands.temperature_delta(pid), state}
end
def handle_call(:pressure_delta, _from, %{i2c: pid} = state) do
{:reply, Commands.pressure_delta(pid), state}
end
def handle_call({:execute, function}, _from, %{i2c: pid} = state) do
{:reply, function.(pid), state}
end
@doc false
def child_spec(config) do
%{
id: {MPL3115A2.Device, device_name(config)},
start: {MPL3115A2.Device, :start_link, [config]},
restart: :transient
}
end
defp device_name(%{bus: bus, address: address} = config),
do: Map.get(config, :name, {bus, address})
end

View file

@ -1,317 +1,55 @@
defmodule MPL3115A2.Registers do
use Bitwise
alias ElixirALE.I2C
use Wafer.Registers
@moduledoc """
This module provides a wrapper around the MPL3115A2 registers
described in Freescale's data sheet.
Don't access these directly unless you know what you're doing.
It's better to use the `Commands` module instead.
"""
@doc """
STATUS register; 0x00; 1 byte, RO
"""
def status(pid), do: read_register(pid, 0)
@doc """
OUT_P_MSB register; 0x01, 1 byte, RO
OUT_P_CSB register; 0x02, 1 byte, RO
OUT_P_LSB register; 0x03, 1 byte, RO
"""
def pressure_data_out(pid) do
with msb <- read_register(pid, 1),
csb <- read_register(pid, 2),
lsb <- read_register(pid, 3),
do: msb <> csb <> lsb
end
@doc """
OUT_T_MSB register; 0x04, 1 byte, RO
OUT_T_LSB register; 0x05, 1 byte, RO
"""
def temperature_data_out(pid) do
with msb <- read_register(pid, 4),
lsb <- read_register(pid, 5),
do: msb <> lsb
end
@doc """
DR_STATUS register; 0x06, 1 byte, RO
"""
def data_ready_status(pid), do: read_register(pid, 6)
@doc """
OUT_P_DELTA_MSB register; 0x07, 1 byte, RO
OUT_P_DELTA_CSB register; 0x08, 1 byte, RO
OUT_P_DELTA_LSB register; 0x09, 1 byte, RO
"""
def pressure_data_out_delta(pid) do
with msb <- read_register(pid, 7),
csb <- read_register(pid, 8),
lsb <- read_register(pid, 9),
do: msb <> csb <> lsb
end
@doc """
OUT_T_DELTA_MSB register; 0x0a, 1 byte, RO
OUT_T_DELTA_LSB register; 0x0b, 1 byte, RO
"""
def temperature_data_out_delta(pid) do
with msb <- read_register(pid, 0xA),
lsb <- read_register(pid, 0xB),
do: msb <> lsb
end
@doc """
WHO_AM_I register; 0x0c, 1 byte, RO
"""
def who_am_i(pid), do: read_register(pid, 0xC)
@doc """
F_STATUS register; 0x0d, 1 byte, RO
"""
def fifo_status(pid), do: read_register(pid, 0xD)
@doc """
F_DATA register; 0x0e, 1 byte, RO
"""
def fifo_data_access(pid), do: read_register(pid, 0xE)
@doc """
F_SETUP register; 0x0f, 1 byte, RW
"""
def fifo_setup(pid), do: read_register(pid, 0xF)
def fifo_setup(pid, value), do: write_register(pid, 0xF, value)
@doc """
TIME_DLY register; 0x10, 1 byte, RO
"""
def time_delay(pid), do: read_register(pid, 0x10)
@doc """
SYSMOD register; 0x11, 1 byte, RO
"""
def system_mode(pid), do: read_register(pid, 0x11)
@doc """
INT_SOURCE register; 0x12, 1 byte, RO
"""
def interrupt_source(pid), do: read_register(pid, 0x12)
@doc """
PT_DATA_CFG register; 0x13, 1 byte, RW
"""
def pt_data_configuration(pid), do: read_register(pid, 0x13)
def pt_data_configuration(pid, value), do: write_register(pid, 0x13, value)
@doc """
BAR_IN_MSB register; 0x14, 1 byte, RW
BAR_IN_LSB register; 0x15, 1 byte, RW
"""
def barometric_input(pid) do
with msb <- read_register(pid, 0x14),
lsb <- read_register(pid, 0x15),
do: msb <> lsb
end
def barometric_input(pid, value) do
msb = value >>> 8 &&& 0xFF
lsb = value &&& 0xFF
with :ok <- write_register(pid, 0x14, msb),
:ok <- write_register(pid, 0x15, lsb),
do: :ok
end
@doc """
P_TGT_MSB register; 0x16, 1 byte, RW
P_TGT_LSB register; 0x17, 1 byte, RW
"""
def pressure_target(pid) do
with msb <- read_register(pid, 0x16),
lsb <- read_register(pid, 0x17),
do: msb <> lsb
end
def pressure_target(pid, value) do
msb = value >>> 8 &&& 0xFF
lsb = value &&& 0xFF
with :ok <- write_register(pid, 0x16, msb),
:ok <- write_register(pid, 0x17, lsb),
do: :ok
end
@doc """
T_TGT register; 0x18, 1 byte, RO
"""
def temperature_target(pid), do: read_register(pid, 0x18)
def temperature_target(pid, value), do: write_register(pid, 0x18, value)
@doc """
P_WND_MSB register; 0x19, 1 byte, RW
P_WND_LSB register; 0x1a, 1 byte, RW
"""
def pressure_altitude_window(pid) do
with msb <- read_register(pid, 0x19),
lsb <- read_register(pid, 0x1A),
do: msb <> lsb
end
def pressure_altitude_window(pid, value) do
msb = value >>> 8 &&& 0xFF
lsb = value &&& 0xFF
with :ok <- write_register(pid, 0x19, msb),
:ok <- write_register(pid, 0x1A, lsb),
do: :ok
end
@doc """
T_WND register; 0x1b, 1 byte, RW
"""
def temperature_window(pid), do: read_register(pid, 0x1B)
def temperature_window(pid, value), do: write_register(pid, 0x1B, value)
@doc """
P_MIN_MSB register; 0x1c, 1 byte, RW
P_MIN_CSB register; 0x1d, 1 byte, RW
P_MIN_LSB register; 0x1e, 1 byte, RW
"""
def minimum_pressure_data(pid) do
with msb <- read_register(pid, 0x1C),
csb <- read_register(pid, 0x1D),
lsb <- read_register(pid, 0x1E),
do: msb <> csb <> lsb
end
def minimum_pressure_data(pid, value) do
msb = value >>> 16 &&& 0xFF
csb = value >>> 8 &&& 0xFF
lsb = value &&& 0xFF
with :ok <- write_register(pid, 0x1C, msb),
:ok <- write_register(pid, 0x1D, csb),
:ok <- write_register(pid, 0x1E, lsb),
do: :ok
end
@doc """
T_MIN_MSB register; 0x1f, 1 byte, RW
T_MIN_LSB register; 0x20, 1 byte, RW
"""
def minimum_temperature_data(pid) do
with msb <- read_register(pid, 0x1F),
lsb <- read_register(pid, 0x20),
do: msb <> lsb
end
def minimum_temperature_data(pid, value) do
msb = value >>> 8 && 0xFF
lsb = value &&& 0xFF
with :ok <- write_register(pid, 0x1F, msb),
:ok <- write_register(pid, 0x20, lsb),
do: :ok
end
@doc """
P_MAX_MSB register, 0x21, 1 byte, RW
P_MAX_CSB register, 0x22, 1 byte, RW
P_MAX_LSB register, 0x23, 1 byte, RW
"""
def maximum_pressure_data(pid) do
with msb <- read_register(pid, 0x21),
csb <- read_register(pid, 0x22),
lsb <- read_register(pid, 0x23),
do: msb <> csb <> lsb
end
def maximum_pressure_data(pid, value) do
msb = value >>> 16 &&& 0xFF
csb = value >>> 8 &&& 0xFF
lsb = value &&& 0xFF
with :ok <- write_register(pid, 0x21, msb),
:ok <- write_register(pid, 0x22, csb),
:ok <- write_register(pid, 0x23, lsb),
do: :ok
end
@doc """
T_MAX_MSB register; 0x24, 1 byte, RW
T_MAX_LSB register; 0x25, 1 byte, RW
"""
def maximum_temperature_data(pid) do
with msb <- read_register(pid, 0x24),
lsb <- read_register(pid, 0x25),
do: msb <> lsb
end
def maximum_temperature_data(pid, value) do
msb = value >>> 8 && 0xFF
lsb = value &&& 0xFF
with :ok <- write_register(pid, 0x24, msb),
:ok <- write_register(pid, 0x25, lsb),
do: :ok
end
@doc """
CTRL_REG1 register; 1 byte, 0x26, RW
"""
def control_register1(pid), do: read_register(pid, 0x26)
def control_register1(pid, value), do: write_register(pid, 0x26, value)
@doc """
CTRL_REG2 register; 1 byte, 0x27, RW
"""
def control_register2(pid), do: read_register(pid, 0x27)
def control_register2(pid, value), do: write_register(pid, 0x27, value)
@doc """
CTRL_REG3 register; 1 byte, 0x28, RW
"""
def control_register3(pid), do: read_register(pid, 0x28)
def control_register3(pid, value), do: write_register(pid, 0x28, value)
@doc """
CTRL_REG4 register; 1 byte, 0x29, RW
"""
def control_register4(pid), do: read_register(pid, 0x29)
def control_register4(pid, value), do: write_register(pid, 0x29, value)
@doc """
CTRL_REG5 register; 1 byte, 0x2a, RW
"""
def control_register5(pid), do: read_register(pid, 0x2A)
def control_register5(pid, value), do: write_register(pid, 0x2A, value)
@doc """
OFF_P register; 1 byte, 0x2b, RW
"""
def pressure_data_user_offset(pid), do: read_register(pid, 0x2B)
def pressure_data_user_offset(pid, value), do: write_register(pid, 0x2B, value)
@doc """
OFF_T register; 1 byte, 0x2c, RW
"""
def temperature_data_user_offset(pid), do: read_register(pid, 0x2C)
def temperature_data_user_offset(pid, value), do: write_register(pid, 0x2C, value)
@doc """
OFF_H register; 1 byte, 0x2d, RW
"""
def altitude_data_user_offset(pid), do: read_register(pid, 0x2D)
def altitude_data_user_offset(pid, value), do: write_register(pid, 0x2D, value)
defp read_register(pid, register) do
I2C.write_read(pid, <<register>>, 1)
end
defp write_register(pid, register, value) do
I2C.write(pid, <<register, value>>)
end
defregister(:status, 0x00, :ro, 1)
defregister(:out_p_msb, 0x01, :ro, 1)
defregister(:out_p_csb, 0x02, :ro, 1)
defregister(:out_p_lsb, 0x03, :ro, 1)
defregister(:out_t_msb, 0x04, :ro, 1)
defregister(:out_t_lsb, 0x05, :ro, 1)
defregister(:dr_status, 0x06, :ro, 1)
defregister(:out_p_delta_msb, 0x07, :ro, 1)
defregister(:out_p_delta_csb, 0x08, :ro, 1)
defregister(:out_p_delta_lsb, 0x09, :ro, 1)
defregister(:out_t_delta_msb, 0x0A, :ro, 1)
defregister(:out_t_delta_lsb, 0x0B, :ro, 1)
defregister(:who_am_i, 0x0C, :ro, 1)
defregister(:f_status, 0x0D, :ro, 1)
defregister(:f_data, 0x0E, :ro, 1)
defregister(:f_setup, 0x0F, :rw, 1)
defregister(:time_dly, 0x10, :ro, 1)
defregister(:sysmod, 0x11, :ro, 1)
defregister(:int_source, 0x12, :ro, 1)
defregister(:pt_data_cfg, 0x13, :rw, 1)
defregister(:bar_in_msb, 0x14, :rw, 1)
defregister(:bar_in_lsb, 0x15, :rw, 1)
defregister(:p_tgt_msb, 0x16, :rw, 1)
defregister(:p_tgt_lsb, 0x17, :rw, 1)
defregister(:t_tgt, 0x18, :rw, 1)
defregister(:p_wnd_msb, 0x19, :rw, 1)
defregister(:p_wnd_lsb, 0x1A, :rw, 1)
defregister(:t_wnd, 0x1B, :rw, 1)
defregister(:p_min_msb, 0x1C, :rw, 1)
defregister(:p_min_csb, 0x1D, :rw, 1)
defregister(:p_min_lsb, 0x1E, :rw, 1)
defregister(:t_min_msb, 0x1F, :rw, 1)
defregister(:t_min_lsb, 0x20, :rw, 1)
defregister(:p_max_msb, 0x21, :rw, 1)
defregister(:p_max_csb, 0x22, :rw, 1)
defregister(:p_max_lsb, 0x23, :rw, 1)
defregister(:t_max_msb, 0x24, :rw, 1)
defregister(:t_max_lsb, 0x25, :rw, 1)
defregister(:ctrl_reg1, 0x26, :rw, 1)
defregister(:ctrl_reg2, 0x27, :rw, 1)
defregister(:ctrl_reg3, 0x28, :rw, 1)
defregister(:ctrl_reg4, 0x29, :rw, 1)
defregister(:ctrl_reg5, 0x2A, :rw, 1)
defregister(:off_p, 0x2B, :rw, 1)
defregister(:off_t, 0x2C, :rw, 1)
defregister(:off_h, 0x2D, :rw, 1)
end

35
mix.exs
View file

@ -1,32 +1,40 @@
defmodule MPL3115A2.MixProject do
use Mix.Project
@version "1.0.1"
def project do
[
app: :mpl3115a2,
version: "0.2.0",
version: @version,
elixir: "~> 1.9",
start_permanent: Mix.env() == :prod,
description: "Driver for the MPL3115A2 altimeter connected via I2C.",
deps: deps(),
package: package()
package: package(),
docs: [
main: "readme",
extras: ["README.md", "CHANGELOG.md"]
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger],
mod: {MPL3115A2.Application, []}
extra_applications: [:logger]
]
end
def package do
[
maintainers: ["James Harton <james@automat.nz>"],
licenses: ["MIT"],
maintainers: ["James Harton <james@harton.nz>"],
licenses: ["HL3-FULL"],
links: %{
"Source" => "https://gitlab.com/jimsy/mpl3115a2"
"Source" => "https://harton.dev/james/mpl3115a2",
"GitHub" => "https://github.com/jimsynz/mpl3115a2",
"Changelog" => "https://docs.harton.nz/james/mpl3115a2/changelog.html",
"Sponsor" => "https://github.com/sponsors/jimsynz"
}
]
end
@ -34,8 +42,17 @@ defmodule MPL3115A2.MixProject do
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:elixir_ale, "~> 1.2"},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false}
{:circuits_i2c, "~> 2.0", optional: true},
{:credo, "~> 1.6", only: ~w[dev test]a, runtime: false},
{:dialyxir, "~> 1.4", only: ~w[dev test]a, runtime: false},
{:doctor, "~> 0.21", only: ~w[dev test]a, runtime: false},
{:earmark, "~> 1.4", only: ~w[dev test]a, runtime: false},
{:elixir_ale, "~> 1.2", optional: true},
{:ex_check, "~> 0.16", only: ~w[dev test]a, runtime: false},
{:ex_doc, "~> 0.30", only: ~w[dev test]a, runtime: false},
{:git_ops, "~> 2.4", only: ~w[dev test]a, runtime: false},
{:mimic, "~> 1.5", only: :test},
{:wafer, "~> 1.0"}
]
end
end

View file

@ -1,9 +1,25 @@
%{
"earmark": {:hex, :earmark, "1.4.1", "07bb382826ee8d08d575a1981f971ed41bd5d7e86b917fd012a93c51b5d28727", [:mix], [], "hexpm"},
"elixir_ale": {:hex, :elixir_ale, "1.2.1", "07ac2f17a0191b8bd3b0df6b526c7f699a3a4d690c9def573fcb5824eef24d98", [:make, :mix], [{:elixir_make, "~> 0.4", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm"},
"elixir_make": {:hex, :elixir_make, "0.6.0", "38349f3e29aff4864352084fc736fa7fa0f2995a819a737554f7ebd28b85aaab", [:mix], [], "hexpm"},
"ex_doc": {:hex, :ex_doc, "0.21.2", "caca5bc28ed7b3bdc0b662f8afe2bee1eedb5c3cf7b322feeeb7c6ebbde089d6", [:mix], [{:earmark, "~> 1.3.3 or ~> 1.4", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"},
"makeup": {:hex, :makeup, "1.0.0", "671df94cf5a594b739ce03b0d0316aa64312cee2574b6a44becb83cd90fb05dc", [:mix], [{:nimble_parsec, "~> 0.5.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm"},
"makeup_elixir": {:hex, :makeup_elixir, "0.14.0", "cf8b7c66ad1cff4c14679698d532f0b5d45a3968ffbcbfd590339cb57742f1ae", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm"},
"nimble_parsec": {:hex, :nimble_parsec, "0.5.1", "c90796ecee0289dbb5ad16d3ad06f957b0cd1199769641c961cfe0b97db190e0", [:mix], [], "hexpm"},
"bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"},
"circuits_i2c": {:hex, :circuits_i2c, "2.0.4", "d08568730ca8a8237d0221b0fdf81f3e2e20385e449d4aa70fcb4c90b3b6543c", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "fbfe2630bc30944aab7920818f1a2bf8a18acc1148385c947990aa0724f52f36"},
"credo": {:hex, :credo, "1.7.7", "771445037228f763f9b2afd612b6aa2fd8e28432a95dbbc60d8e03ce71ba4446", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "8bc87496c9aaacdc3f90f01b7b0582467b69b4bd2441fe8aae3109d843cc2f2e"},
"decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"},
"dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"},
"doctor": {:hex, :doctor, "0.21.0", "20ef89355c67778e206225fe74913e96141c4d001cb04efdeba1a2a9704f1ab5", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "a227831daa79784eb24cdeedfa403c46a4cb7d0eab0e31232ec654314447e4e0"},
"earmark": {:hex, :earmark, "1.4.46", "8c7287bd3137e99d26ae4643e5b7ef2129a260e3dcf41f251750cb4563c8fb81", [:mix], [], "hexpm", "798d86db3d79964e759ddc0c077d5eb254968ed426399fbf5a62de2b5ff8910a"},
"earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"},
"elixir_ale": {:hex, :elixir_ale, "1.2.1", "07ac2f17a0191b8bd3b0df6b526c7f699a3a4d690c9def573fcb5824eef24d98", [:make, :mix], [{:elixir_make, "~> 0.4", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "bfb099137500a3b8c4a1750cf07f2d704897ef9feac3412064bf9edc7d74193c"},
"elixir_make": {:hex, :elixir_make, "0.8.3", "d38d7ee1578d722d89b4d452a3e36bcfdc644c618f0d063b874661876e708683", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.0", [hex: :certifi, repo: "hexpm", optional: true]}], "hexpm", "5c99a18571a756d4af7a4d89ca75c28ac899e6103af6f223982f09ce44942cc9"},
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
"ex_check": {:hex, :ex_check, "0.16.0", "07615bef493c5b8d12d5119de3914274277299c6483989e52b0f6b8358a26b5f", [:mix], [], "hexpm", "4d809b72a18d405514dda4809257d8e665ae7cf37a7aee3be6b74a34dec310f5"},
"ex_doc": {:hex, :ex_doc, "0.30.0", "ed94bf5183f559d2f825e4f866cc0eab277bbb17da76aff40f8e0f149656943e", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "6743fe46704fe27e2f2558faa61f00e5356528768807badb2092d38476d6dac2"},
"file_system": {:hex, :file_system, "1.0.0", "b689cc7dcee665f774de94b5a832e578bd7963c8e637ef940cd44327db7de2cd", [:mix], [], "hexpm", "6752092d66aec5a10e662aefeed8ddb9531d79db0bc145bb8c40325ca1d8536d"},
"git_cli": {:hex, :git_cli, "0.3.0", "a5422f9b95c99483385b976f5d43f7e8233283a47cda13533d7c16131cb14df5", [:mix], [], "hexpm", "78cb952f4c86a41f4d3511f1d3ecb28edb268e3a7df278de2faa1bd4672eaf9b"},
"git_ops": {:hex, :git_ops, "2.6.1", "cc7799a68c26cf814d6d1a5121415b4f5bf813de200908f930b27a2f1fe9dad5", [:mix], [{:git_cli, "~> 0.2", [hex: :git_cli, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "ce62d07e41fe993ec22c35d5edb11cf333a21ddaead6f5d9868fcb607d42039e"},
"jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"},
"makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"},
"makeup_elixir": {:hex, :makeup_elixir, "0.16.1", "cc9e3ca312f1cfeccc572b37a09980287e243648108384b97ff2b76e505c3555", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "e127a341ad1b209bd80f7bd1620a15693a9908ed780c3b763bccf7d200c767c6"},
"makeup_erlang": {:hex, :makeup_erlang, "0.1.2", "ad87296a092a46e03b7e9b0be7631ddcf64c790fa68a9ef5323b6cbb36affc72", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f3f5a1ca93ce6e092d92b6d9c049bcda58a3b617a8d888f8e7231c85630e8108"},
"mimic": {:hex, :mimic, "1.8.2", "f4cf6ad13a305c5ee1a6c304ee36fc7afb3ad748e2af8cd5fbf122f44a283534", [:mix], [], "hexpm", "abc982d5fdcc4cb5292980cb698cd47c0c5d9541b401e540fb695b69f1d46485"},
"nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"},
"wafer": {:hex, :wafer, "1.1.0", "21947fb1e23038390351bd26b22bf4b849b88841e38ff6cc7c463b37915a9ce8", [:mix], [{:circuits_gpio, "< 3.0.0", [hex: :circuits_gpio, repo: "hexpm", optional: true]}, {:circuits_i2c, "< 3.0.0", [hex: :circuits_i2c, repo: "hexpm", optional: true]}, {:circuits_spi, "< 3.0.0", [hex: :circuits_spi, repo: "hexpm", optional: true]}], "hexpm", "777cd98681a5bbd74f01a39795fc0ab204788f3813742968ab350fd0ee81955b"},
}

6
renovate.json Normal file
View file

@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>renovate/renovate"
]
}

View file

@ -1,8 +0,0 @@
defmodule MPL3115A2Test do
use ExUnit.Case
doctest MPL3115A2
test "greets the world" do
assert MPL3115A2.hello() == :world
end
end

4
test/mpl3115a2_test.exs Normal file
View file

@ -0,0 +1,4 @@
defmodule MPL3115A2Test do
use ExUnit.Case
doctest MPL3115A2
end