Skip to content

Commit

Permalink
Updating Library to new Layout
Browse files Browse the repository at this point in the history
  • Loading branch information
boseji committed Sep 6, 2024
1 parent 24fd7de commit 66c9468
Show file tree
Hide file tree
Showing 13 changed files with 473 additions and 225 deletions.
4 changes: 4 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# We'll use defaults from the LLVM style, but with 4 columns indentation.
# Webkit is preference of Albert van Dalen
BasedOnStyle: WebKit
IndentWidth: 4
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# ignore the Development Flag file.
.development
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Contribution Guidelines

This library is the culmination of the expertise of many members of the open source community who have dedicated their time and hard work. The best way to ask for help or propose a new idea is to [create a new issue](https://github.com/avdwebLibraries/avdweb_AnalogReadFast/issues/new) while creating a Pull Request with your code changes allows you to share your own innovations with the rest of the community.

The following are some guidelines to observe when creating issues or PRs:

- Be friendly; it is important that we can all enjoy a safe space as we are all working on the same project and it is okay for people to have different ideas

- [Use code blocks](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code); it helps us help you when we can read your code! On that note also refrain from pasting more than 30 lines of code in a post, instead [create a gist](https://gist.github.com/) if you need to share large snippets

- Use reasonable titles; refrain from using overly long or capitalized titles as they are usually annoying and do little to encourage others to help :smile:

- Be detailed; refrain from mentioning code problems without sharing your source code and always give information regarding your board and version of the library
3 changes: 2 additions & 1 deletion LICENSE.md → LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2019 Albert van Dalen
Copyright (C) 2019-2024 Albert van Dalen <http://www.avdweb.nl>
Copyright (C) 2024 Abhijit Bose (aka. Boseji)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
40 changes: 34 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,37 @@
### Very fast analogRead()
The standard Arduino analogRead() takes about 112us for the AVR and 425us for the SAMD21, this is very slow.
The new function analogReadFast() takes just 21us.
# `avdweb_AnalogReadFast` Library

Home Page <https://www.avdweb.nl/arduino/adc-dac/fast-10-bit-adc>

## Very fast `analogRead()`

The standard Arduino `analogRead()` takes about `112us` for the AVR and `425us` for the SAMD21, this is very slow.
The new function analogReadFast() takes just 21us.

## Compatibility

#### Compatibility
- AVR boards: Arduino Uno, Nano, Mega, Leonardo, etc.
- SAMD21 boards: Arduino Zero, SAM 15x15, etc.
- SAMD21 boards: Arduino Zero, SAM 15x15, etc.

## Developer Note

Please run code formatting before committing the code.

```sh
clang-format -i src/*.* examples/**/*.ino
```

## License

`SPDX: MIT`

`avdweb_AnalogReadFast` - Fast analogRead 10/12 bit ADC for the Arduino Zero and Uno

Copyright (C) 2019-2024 Albert van Dalen <http://www.avdweb.nl>

Copyright (C) 2024 Abhijit Bose (aka. Boseji) :contributor:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

https://www.avdweb.nl/arduino/adc-dac/fast-10-bit-adc
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
133 changes: 0 additions & 133 deletions Test_AnalogReadFast/Test_AnalogReadFast.ino

This file was deleted.

50 changes: 0 additions & 50 deletions avdweb_AnalogReadFast.h

This file was deleted.

Loading

0 comments on commit 66c9468

Please sign in to comment.