Skip to content

Commit e6f3840

Browse files
authored
Merge pull request #16 from adafruit/REUSE
Ran pre-commit, added licenses
2 parents d126094 + 8640638 commit e6f3840

19 files changed

+478
-78
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
*.mpy
26
.idea
37
__pycache__

.pylintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
[MASTER]
26

37
# A comma-separated list of package or module names from where C extensions may

.readthedocs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
python:
26
version: 3
37
requirements_file: requirements.txt

CODE_OF_CONDUCT.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2014 Coraline Ada Ehmke
3+
SPDX-FileCopyrightText: 2019 Kattni Rembor for Adafruit Industries
4+
SPDX-License-Identifier: CC-BY-4.0
5+
-->
6+
17
# Adafruit Community Code of Conduct
28

39
## Our Pledge
@@ -43,7 +49,7 @@ Examples of unacceptable behavior by participants include:
4349

4450
The goal of the standards and moderation guidelines outlined here is to build
4551
and maintain a respectful community. We ask that you don’t just aim to be
46-
"technically unimpeachable", but rather try to be your best self.
52+
"technically unimpeachable", but rather try to be your best self.
4753

4854
We value many things beyond technical expertise, including collaboration and
4955
supporting others within our community. Providing a positive experience for
@@ -74,9 +80,9 @@ You may report in the following ways:
7480
In any situation, you may send an email to <[email protected]>.
7581

7682
On the Adafruit Discord, you may send an open message from any channel
77-
to all Community Moderators by tagging @community moderators. You may
78-
also send an open message from any channel, or a direct message to
79-
@kattni#1507, @tannewt#4653, @Dan Halbert#1614, @cater#2442,
83+
to all Community Moderators by tagging @community moderators. You may
84+
also send an open message from any channel, or a direct message to
85+
@kattni#1507, @tannewt#4653, @Dan Halbert#1614, @cater#2442,
8086
@sommersoft#0222, @Mr. Certainly#0472 or @Andon#8175.
8187

8288
Email and direct message reports will be kept confidential.

LICENSES/CC-BY-4.0.txt

Lines changed: 324 additions & 0 deletions
Large diffs are not rendered by default.

LICENSES/MIT.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
MIT License Copyright (c) <year> <copyright holders>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice (including the next
11+
paragraph) shall be included in all copies or substantial portions of the
12+
Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
17+
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
18+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
19+
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

LICENSES/Unlicense.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
This is free and unencumbered software released into the public domain.
2+
3+
Anyone is free to copy, modify, publish, use, compile, sell, or distribute
4+
this software, either in source code form or as a compiled binary, for any
5+
purpose, commercial or non-commercial, and by any means.
6+
7+
In jurisdictions that recognize copyright laws, the author or authors of this
8+
software dedicate any and all copyright interest in the software to the public
9+
domain. We make this dedication for the benefit of the public at large and
10+
to the detriment of our heirs and successors. We intend this dedication to
11+
be an overt act of relinquishment in perpetuity of all present and future
12+
rights to this software under copyright law.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
17+
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
18+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
19+
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information,
20+
please refer to <https://unlicense.org/>

README.rst.license

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
3+
SPDX-License-Identifier: MIT

adafruit_ina260.py

Lines changed: 57 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
1-
# The MIT License (MIT)
1+
# SPDX-FileCopyrightText: Bryan Siepert 2019 for Adafruit Industries
22
#
3-
# Copyright (c) 2019 Bryan Siepert for Adafruit Industries
4-
#
5-
# Permission is hereby granted, free of charge, to any person obtaining a copy
6-
# of this software and associated documentation files (the "Software"), to deal
7-
# in the Software without restriction, including without limitation the rights
8-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
# copies of the Software, and to permit persons to whom the Software is
10-
# furnished to do so, subject to the following conditions:
11-
#
12-
# The above copyright notice and this permission notice shall be included in
13-
# all copies or substantial portions of the Software.
14-
#
15-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
# THE SOFTWARE.
3+
# SPDX-License-Identifier: MIT
4+
225
"""
236
`adafruit_ina260`
247
================================================================================
@@ -69,20 +52,20 @@
6952
class Mode:
7053
"""Modes avaible to be set
7154
72-
+--------------------+---------------------------------------------------------------------+
73-
| Mode | Description |
74-
+====================+=====================================================================+
75-
| ``Mode.CONTINUOUS``| Default: The sensor will continuously measure the bus voltage and |
76-
| | shunt voltage across the shunt resistor to calculate ``power`` and |
77-
| | ``current`` |
78-
+--------------------+---------------------------------------------------------------------+
79-
| ``Mode.TRIGGERED`` | The sensor will immediately begin measuring and calculating current,|
80-
| | bus voltage, and power. Re-set this mode to initiate another |
81-
| | measurement |
82-
+--------------------+---------------------------------------------------------------------+
83-
| ``Mode.SHUTDOWN`` | Shutdown the sensor, reducing the quiescent current and turning off|
84-
| | current into the device inputs. Set another mode to re-enable |
85-
+--------------------+---------------------------------------------------------------------+
55+
+--------------------+---------------------------------------------------------------------+
56+
| Mode | Description |
57+
+====================+=====================================================================+
58+
| ``Mode.CONTINUOUS``| Default: The sensor will continuously measure the bus voltage and |
59+
| | shunt voltage across the shunt resistor to calculate ``power`` and |
60+
| | ``current`` |
61+
+--------------------+---------------------------------------------------------------------+
62+
| ``Mode.TRIGGERED`` | The sensor will immediately begin measuring and calculating current,|
63+
| | bus voltage, and power. Re-set this mode to initiate another |
64+
| | measurement |
65+
+--------------------+---------------------------------------------------------------------+
66+
| ``Mode.SHUTDOWN`` | Shutdown the sensor, reducing the quiescent current and turning off|
67+
| | current into the device inputs. Set another mode to re-enable |
68+
+--------------------+---------------------------------------------------------------------+
8669
8770
"""
8871

@@ -94,25 +77,25 @@ class Mode:
9477
class ConversionTime:
9578
"""Options for ``current_conversion_time`` or ``voltage_conversion_time``
9679
97-
+----------------------------------+------------------+
98-
| ``ConversionTime`` | Time |
99-
+==================================+==================+
100-
| ``ConversionTime.TIME_140_us`` | 140 us |
101-
+----------------------------------+------------------+
102-
| ``ConversionTime.TIME_204_us`` | 204 us |
103-
+----------------------------------+------------------+
104-
| ``ConversionTime.TIME_332_us`` | 332 us |
105-
+----------------------------------+------------------+
106-
| ``ConversionTime.TIME_558_us`` | 588 us |
107-
+----------------------------------+------------------+
108-
| ``ConversionTime.TIME_1_1_ms`` | 1.1 ms (Default) |
109-
+----------------------------------+------------------+
110-
| ``ConversionTime.TIME_2_116_ms`` | 2.116 ms |
111-
+----------------------------------+------------------+
112-
| ``ConversionTime.TIME_4_156_ms`` | 4.156 ms |
113-
+----------------------------------+------------------+
114-
| ``ConversionTime.TIME_8_244_ms`` | 8.244 ms |
115-
+----------------------------------+------------------+
80+
+----------------------------------+------------------+
81+
| ``ConversionTime`` | Time |
82+
+==================================+==================+
83+
| ``ConversionTime.TIME_140_us`` | 140 us |
84+
+----------------------------------+------------------+
85+
| ``ConversionTime.TIME_204_us`` | 204 us |
86+
+----------------------------------+------------------+
87+
| ``ConversionTime.TIME_332_us`` | 332 us |
88+
+----------------------------------+------------------+
89+
| ``ConversionTime.TIME_558_us`` | 588 us |
90+
+----------------------------------+------------------+
91+
| ``ConversionTime.TIME_1_1_ms`` | 1.1 ms (Default) |
92+
+----------------------------------+------------------+
93+
| ``ConversionTime.TIME_2_116_ms`` | 2.116 ms |
94+
+----------------------------------+------------------+
95+
| ``ConversionTime.TIME_4_156_ms`` | 4.156 ms |
96+
+----------------------------------+------------------+
97+
| ``ConversionTime.TIME_8_244_ms`` | 8.244 ms |
98+
+----------------------------------+------------------+
11699
117100
"""
118101

@@ -129,25 +112,25 @@ class ConversionTime:
129112
class AveragingCount:
130113
"""Options for ``averaging_count``
131114
132-
+-------------------------------+------------------------------------+
133-
| ``AveragingCount`` | Number of measurements to average |
134-
+===============================+====================================+
135-
| ``AveragingCount.COUNT_1`` | 1 (Default) |
136-
+-------------------------------+------------------------------------+
137-
| ``AveragingCount.COUNT_4`` | 4 |
138-
+-------------------------------+------------------------------------+
139-
| ``AveragingCount.COUNT_16`` | 16 |
140-
+-------------------------------+------------------------------------+
141-
| ``AveragingCount.COUNT_64`` | 64 |
142-
+-------------------------------+------------------------------------+
143-
| ``AveragingCount.COUNT_128`` | 128 |
144-
+-------------------------------+------------------------------------+
145-
| ``AveragingCount.COUNT_256`` | 256 |
146-
+-------------------------------+------------------------------------+
147-
| ``AveragingCount.COUNT_512`` | 512 |
148-
+-------------------------------+------------------------------------+
149-
| ``AveragingCount.COUNT_1024`` | 1024 |
150-
+-------------------------------+------------------------------------+
115+
+-------------------------------+------------------------------------+
116+
| ``AveragingCount`` | Number of measurements to average |
117+
+===============================+====================================+
118+
| ``AveragingCount.COUNT_1`` | 1 (Default) |
119+
+-------------------------------+------------------------------------+
120+
| ``AveragingCount.COUNT_4`` | 4 |
121+
+-------------------------------+------------------------------------+
122+
| ``AveragingCount.COUNT_16`` | 16 |
123+
+-------------------------------+------------------------------------+
124+
| ``AveragingCount.COUNT_64`` | 64 |
125+
+-------------------------------+------------------------------------+
126+
| ``AveragingCount.COUNT_128`` | 128 |
127+
+-------------------------------+------------------------------------+
128+
| ``AveragingCount.COUNT_256`` | 256 |
129+
+-------------------------------+------------------------------------+
130+
| ``AveragingCount.COUNT_512`` | 512 |
131+
+-------------------------------+------------------------------------+
132+
| ``AveragingCount.COUNT_1024`` | 1024 |
133+
+-------------------------------+------------------------------------+
151134
152135
"""
153136

@@ -167,8 +150,8 @@ class AveragingCount:
167150
class INA260:
168151
"""Driver for the INA260 power and current sensor.
169152
170-
:param ~busio.I2C i2c_bus: The I2C bus the INA260 is connected to.
171-
:param address: The I2C device address for the sensor. Default is ``0x40``.
153+
:param ~busio.I2C i2c_bus: The I2C bus the INA260 is connected to.
154+
:param address: The I2C device address for the sensor. Default is ``0x40``.
172155
173156
"""
174157

docs/_static/favicon.ico.license

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SPDX-FileCopyrightText: 2018 Phillip Torrone for Adafruit Industries
2+
3+
SPDX-License-Identifier: CC-BY-4.0

docs/api.rst.license

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-FileCopyrightText: 2020 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT

docs/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# -*- coding: utf-8 -*-
22

3+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
4+
#
5+
# SPDX-License-Identifier: MIT
6+
37
import os
48
import sys
59

docs/examples.rst.license

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-FileCopyrightText: 2020 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT

docs/index.rst.license

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-FileCopyrightText: 2020 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT

examples/ina260_averaging.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
# SPDX-License-Identifier: MIT
3+
14
import time
25
import board
36
from adafruit_ina260 import INA260, AveragingCount

examples/ina260_modes.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
# SPDX-License-Identifier: MIT
3+
14
import time
25
import board
36
from adafruit_ina260 import INA260, Mode

examples/ina260_simpletest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
# SPDX-License-Identifier: MIT
3+
14
import time
25
import board
36
import adafruit_ina260

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
Adafruit-Blinka
26
adafruit-circuitpython-busdevice
37
adafruit-circuitpython-register

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
"""A setuptools based setup module.
26
37
See:

0 commit comments

Comments
 (0)