qwiic-sd-expansion-py 1.0.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qwiic_sd_expansion_py-1.0.12/CHANGELOG.md +224 -0
- qwiic_sd_expansion_py-1.0.12/DESCRIPTION.rst +8 -0
- qwiic_sd_expansion_py-1.0.12/LICENSE +21 -0
- qwiic_sd_expansion_py-1.0.12/MANIFEST.in +4 -0
- qwiic_sd_expansion_py-1.0.12/PKG-INFO +48 -0
- qwiic_sd_expansion_py-1.0.12/README.md +586 -0
- qwiic_sd_expansion_py-1.0.12/qwiic_sd_expansion_py.egg-info/PKG-INFO +48 -0
- qwiic_sd_expansion_py-1.0.12/qwiic_sd_expansion_py.egg-info/SOURCES.txt +13 -0
- qwiic_sd_expansion_py-1.0.12/qwiic_sd_expansion_py.egg-info/dependency_links.txt +1 -0
- qwiic_sd_expansion_py-1.0.12/qwiic_sd_expansion_py.egg-info/requires.txt +1 -0
- qwiic_sd_expansion_py-1.0.12/qwiic_sd_expansion_py.egg-info/top_level.txt +1 -0
- qwiic_sd_expansion_py-1.0.12/qwiic_sd_expansion_py.py +2685 -0
- qwiic_sd_expansion_py-1.0.12/setup.cfg +4 -0
- qwiic_sd_expansion_py-1.0.12/setup.py +107 -0
- qwiic_sd_expansion_py-1.0.12/tests/test_qwiic_sd_expansion_py.py +857 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the Qwiic Python driver are documented here.
|
|
4
|
+
|
|
5
|
+
## [1.0.12] - 2026-12-04
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **Packaging metadata**: `python_requires='>=3.8'` and `project_urls` (source,
|
|
10
|
+
documentation, changelog, umbrella project).
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **The sdist could not be built or installed.** `setup.py` reads
|
|
15
|
+
`DESCRIPTION.rst` at build time, and without a `MANIFEST.in` setuptools left
|
|
16
|
+
that file out of the tarball, so `pip install` of the sdist failed with
|
|
17
|
+
`FileNotFoundError: DESCRIPTION.rst`. `MANIFEST.in` now ships
|
|
18
|
+
`DESCRIPTION.rst`, `README.md`, `CHANGELOG.md` and `LICENSE`.
|
|
19
|
+
|
|
20
|
+
### Release
|
|
21
|
+
|
|
22
|
+
- First release published to PyPI as `qwiic_sd_expansion_py`.
|
|
23
|
+
|
|
24
|
+
## [1.0.11] - 2026-12-04
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- **Development status is `5 - Production/Stable`.** The Beta marker introduced
|
|
29
|
+
in 1.0.10 described the independent packaging change, not the driver's
|
|
30
|
+
maturity; the API, protocol revision and test coverage are unchanged.
|
|
31
|
+
|
|
32
|
+
## [1.0.10] - 2026-12-04
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- **The package metadata no longer claims SparkFun authorship.** Author and
|
|
37
|
+
maintainer are now `syntax1269 <syntax1269@gmail.com>`; the previous
|
|
38
|
+
`info@sparkfun.com` contact came from SparkFun's own driver template, not from
|
|
39
|
+
this project.
|
|
40
|
+
- **Distribution name is `qwiic_sd_expansion_py`** (was
|
|
41
|
+
`sparkfun_qwiic_sd_expansion_py`). The module that is imported was already
|
|
42
|
+
`qwiic_sd_expansion_py`, so no code changes: imports, examples and the Qwiic
|
|
43
|
+
discovery contract are unaffected.
|
|
44
|
+
- **Development status is `4 - Beta`** instead of `5 - Production/Stable`, which
|
|
45
|
+
describes an independent driver rather than a SparkFun-vetted release.
|
|
46
|
+
- Headers, `README.md`, `DESCRIPTION.rst` and the documentation now state that
|
|
47
|
+
this is an independent driver, not a SparkFun product, while keeping the
|
|
48
|
+
factual references to the `sparkfun_qwiic_i2c` transport it depends on.
|
|
49
|
+
|
|
50
|
+
## [1.0.9] - 2026-11-23
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
|
|
54
|
+
- **Capability discovery**: `MICROSDEXP_CMD_CAPABILITIES (0x45)`, a
|
|
55
|
+
`Capabilities` value object, `capabilities()` and `supports(bit)`, with
|
|
56
|
+
CRC-16/CCITT-FALSE validation over frame bytes 0..29. A NACK from older
|
|
57
|
+
firmware reports `MicroSDExpError.UNSUPPORTED` (10) and is non-fatal in
|
|
58
|
+
`begin()`.
|
|
59
|
+
|
|
60
|
+
## [Unreleased]
|
|
61
|
+
|
|
62
|
+
### Added
|
|
63
|
+
|
|
64
|
+
- **One-shot file helpers**: `write_text()` / `write_file()` create or truncate,
|
|
65
|
+
write, commit and close in one call; `append_text()` / `append_file()` append
|
|
66
|
+
atomically (no `close()` needed). Streaming API is unchanged.
|
|
67
|
+
- **`pwm_write(pin, duty)`** — raw duty `0..255` for a pin already in
|
|
68
|
+
`MICROSDEXP_PIN_MODE_PWM_OUTPUT`. `write_pin()` now passes its value through
|
|
69
|
+
unchanged instead of coercing it to `0/1`, so PWM works through either method.
|
|
70
|
+
PA0 is rejected; PB3 is threshold-only. New `examples/ex10_pwm_fade.py`.
|
|
71
|
+
- Wire constants and methods for the new firmware commands:
|
|
72
|
+
`MICROSDEXP_CMD_MODULE_CLOCK` (`0x1B`), `MICROSDEXP_CMD_PIN_MODE_READ`
|
|
73
|
+
(`0x1E`) and `MICROSDEXP_CMD_VOLUME_NAME` (`0x1F`).
|
|
74
|
+
- **`module_clock_hz()`** — read the measured CPU clock directly (4 B LE).
|
|
75
|
+
`firmware_clock_hz()` is now a deprecated alias of it; neither parses the
|
|
76
|
+
banner any more.
|
|
77
|
+
- **`pin_mode(pin_id)`** / **`pin_modes()`** — read the configured mode (0..4)
|
|
78
|
+
of one or all six expansion pins (PA5, PB2, PB3, PA0, PA1, PA4) from a single
|
|
79
|
+
`0x1E` read; pins absent on the board report `0xFF` / `None`.
|
|
80
|
+
- **`volume_name()`** — read the NUL-terminated FAT volume label (`0x1F`).
|
|
81
|
+
- **`MICROSDEXP_CMD_CLOCK` (`0x0E`)** — the current firmware makes the clock
|
|
82
|
+
command bidirectional: it now returns the same six bytes it writes.
|
|
83
|
+
`CLOCK_SET` remains as a legacy alias.
|
|
84
|
+
- **`set_clock(year, month, day, hour, minute, second)`** — set the software RTC
|
|
85
|
+
date/time, converting the full year to the one-byte `year - 2000` offset;
|
|
86
|
+
invalid fields set `INVALID` without bus traffic. **`read_clock()`** reads the
|
|
87
|
+
six bytes back as `(year, month, day, hour, minute, second)`, or `None` with
|
|
88
|
+
`INVALID` on a short frame. The clock is a software RTC used for FAT file
|
|
89
|
+
timestamps; it keeps advancing once set. The module boots at `2026-11-01 00:00:00`.
|
|
90
|
+
- **`examples/set_clock.py`** — set a realistic date/time at startup, print
|
|
91
|
+
`read_clock()` and `diagnostics()`.
|
|
92
|
+
|
|
93
|
+
### Changed
|
|
94
|
+
|
|
95
|
+
- **`version()` now returns the whole 3-line firmware banner** (version, product
|
|
96
|
+
name, copyright), stripping NUL padding and trailing whitespace but keeping
|
|
97
|
+
internal newlines. The banner no longer contains the clock, so the old
|
|
98
|
+
dotted-token scan is gone. `firmware_banner()` is unchanged.
|
|
99
|
+
- **`diagnostics()`** now prints the banner's extra lines on their own rows and
|
|
100
|
+
reports the volume name, module clock and all six pin modes in a fixed order.
|
|
101
|
+
It also prints `Current Date/Time: YYYY-MM-DD HH:MM:SS` (or `n/a`) immediately
|
|
102
|
+
after `Module detected:`.
|
|
103
|
+
- Refreshed the in-memory mock, tests, README, API docs and wiki protocol
|
|
104
|
+
reference (new commands, bidirectional clock command and new banner format).
|
|
105
|
+
The mock now boots at `2026-11-01 00:00:00` and reports a placeholder
|
|
106
|
+
banner version.
|
|
107
|
+
|
|
108
|
+
## [1.0.8] - 2026-11-20
|
|
109
|
+
|
|
110
|
+
### Added (expansion pins)
|
|
111
|
+
|
|
112
|
+
- Pin IDs `MICROSDEXP_PIN_PA0` (0), `PA1` (1), `PA4` (4) and reserved `PF7` (7)
|
|
113
|
+
join PA5/PB2/PB3; `set_pin_mode` / `write_pin` dispatch to commands
|
|
114
|
+
`0x32`–`0x38`. New `adc_pin(pin)` reads PA5 or PA4.
|
|
115
|
+
|
|
116
|
+
### Added
|
|
117
|
+
|
|
118
|
+
- **`card_present()`** — check whether a card is inserted before file I/O,
|
|
119
|
+
with a dedicated `NO_CARD` error. The module itself NACKs card commands
|
|
120
|
+
while no card is inserted.
|
|
121
|
+
- **`ex0_quickstart.py`** — the first example: write a short file and read it back.
|
|
122
|
+
- Four new examples: `ex6_sensor_ring_logger.py` (500 Hz sampling into a
|
|
123
|
+
512-byte ring, drained with `write_now()` / `committed_bytes()`),
|
|
124
|
+
`ex7_config_save_load.py` (checked queries plus a staged settings update),
|
|
125
|
+
`ex8_dual_module_mirror.py` (two modules on one bus with `sticky_error`
|
|
126
|
+
failover) and `ex9_threshold_bitbang_alert.py` (CSV logging plus a
|
|
127
|
+
module-side strobe script).
|
|
128
|
+
|
|
129
|
+
### Fixed
|
|
130
|
+
|
|
131
|
+
- **`poll_op()` no longer leaves a phantom open file.** A failed async OPEN
|
|
132
|
+
now clears `_file_open` / `_read_started` instead of applying the success
|
|
133
|
+
side effects (including the spurious stream-priming READ).
|
|
134
|
+
- **Abandoned async ops no longer wedge an instance.** `begin()` and `reboot()`
|
|
135
|
+
reset `_async_pending` and the optimistic file state; synchronous file calls
|
|
136
|
+
made while an op is pending return `INVALID` instead of interleaving.
|
|
137
|
+
- **Mutating housekeeping now respects the single open handle.** `mkdir()`,
|
|
138
|
+
`rmdir()` and `remove()` return `INVALID` while a file is open (or an async
|
|
139
|
+
op is pending). Read-only queries are unchanged.
|
|
140
|
+
- **Zero-length `write()` / `read()` are clean no-ops** (`last_ok` stays true
|
|
141
|
+
instead of reporting `NO_FILE`). Added boundary round-trip tests at
|
|
142
|
+
1/63/64/65/255/256 bytes with 64 B and 16 B chunks.
|
|
143
|
+
|
|
144
|
+
## [1.0.7] - 2026-11-19
|
|
145
|
+
|
|
146
|
+
### Added
|
|
147
|
+
|
|
148
|
+
- **Checked query variants**: `exists_checked`, `file_size_checked` and
|
|
149
|
+
`is_directory_checked` return `(ok, value)` so "not found" is distinct from
|
|
150
|
+
a failed I²C transaction. Added `last_ok` shorthand. Original methods
|
|
151
|
+
unchanged.
|
|
152
|
+
|
|
153
|
+
## [1.0.6] - 2026-11-19
|
|
154
|
+
|
|
155
|
+
### Added
|
|
156
|
+
|
|
157
|
+
- **Non-blocking submit/poll API**: `begin_open_write`, `begin_open_read`,
|
|
158
|
+
`begin_close`, `begin_format`, `begin_query`, `poll_op`, `write_now`,
|
|
159
|
+
`read_now`, `committed_bytes`, plus the `AsyncOp` token and `ASYNC_*` result
|
|
160
|
+
constants. No sleeps; one STATUS read per poll; only one pending operation.
|
|
161
|
+
No feature flag needed; the blocking API is unchanged.
|
|
162
|
+
- Example `ex5_nonblocking_write.py` and updated README/RTD documentation.
|
|
163
|
+
|
|
164
|
+
## [1.0.5] - 2026-11-19
|
|
165
|
+
|
|
166
|
+
### Changed
|
|
167
|
+
|
|
168
|
+
- Documented blocking behavior and worst-case timeouts for every high-level
|
|
169
|
+
method in README and RTD docs. The Python ports remain synchronous; use a
|
|
170
|
+
background thread/task if your application cannot block.
|
|
171
|
+
|
|
172
|
+
## [1.0.4] - 2026-11-19
|
|
173
|
+
|
|
174
|
+
### Added
|
|
175
|
+
|
|
176
|
+
- **`diagnostics()`** returns a one-page health report (module, firmware and
|
|
177
|
+
protocol version, card/filesystem, capacity and free space, I²C address,
|
|
178
|
+
communication verdict) for customer troubleshooting. Safe before `begin()`
|
|
179
|
+
(`n/a` for unreadable fields) and leaves `last_error` unchanged. Uses the
|
|
180
|
+
module's real `free_clusters` value.
|
|
181
|
+
- `examples/ex4_diagnostics.py` and an API entry for the new method.
|
|
182
|
+
|
|
183
|
+
## [1.0.3] - 2026-11-19
|
|
184
|
+
|
|
185
|
+
### Added
|
|
186
|
+
|
|
187
|
+
- **Sticky error API.** `sticky_error` reports the first failure since
|
|
188
|
+
`clear_error()`; `last_error` keeps its per-call semantics. Internal calls can
|
|
189
|
+
no longer hide a real fault from a caller that checks the sticky value.
|
|
190
|
+
- **Version parse signal.** `version()` now sets `INVALID` when no dotted token
|
|
191
|
+
can be parsed from the answered banner.
|
|
192
|
+
|
|
193
|
+
## [1.0.2] - 2026-11-18
|
|
194
|
+
|
|
195
|
+
### Fixed
|
|
196
|
+
|
|
197
|
+
- **Consistent sensor error sentinel.** `temperature_k()` and `adc_pa5()` now
|
|
198
|
+
both return `0xFFFF` on any failure (bus error or short read), matching the
|
|
199
|
+
Arduino and CircuitPython ports. `temperature_k()` previously returned `0`.
|
|
200
|
+
|
|
201
|
+
## [1.0.1] - 2026-11-18
|
|
202
|
+
|
|
203
|
+
### Fixed
|
|
204
|
+
|
|
205
|
+
- **`version()` against the multi-line banner.** The driver now parses the 112-byte
|
|
206
|
+
version banner for the dotted version token (a dotted version token verified), falling back
|
|
207
|
+
to the legacy bare string. Added `firmware_banner()` and `firmware_clock_hz()`.
|
|
208
|
+
- **`format()` timing.** Now waits on a dedicated 300 s budget instead of the
|
|
209
|
+
15 s operation timeout.
|
|
210
|
+
- **Allocation-free CircuitPython fast path.** Streams through the underlying
|
|
211
|
+
`busio.I2C` via reusable buffers when qwiic_i2c exposes `_i2cbus`, with a
|
|
212
|
+
portable fallback on other backends.
|
|
213
|
+
|
|
214
|
+
### Changed
|
|
215
|
+
|
|
216
|
+
- Standardized identifiers across the three host ports (`MICROSDEXP_*`,
|
|
217
|
+
`MicroSDExpError`, `MicroSDExpFile`, `microSDexp`).
|
|
218
|
+
|
|
219
|
+
## [1.0.0] - 2026-11-16
|
|
220
|
+
|
|
221
|
+
### Added
|
|
222
|
+
|
|
223
|
+
- Full file/directory API, Qwiic discovery, expansion-pin and bit-bang API.
|
|
224
|
+
- 256-byte read chunk and ACK-paced writes.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
qwiic_sd_expansion_py
|
|
2
|
+
=====================
|
|
3
|
+
|
|
4
|
+
Python module for the I2C microSD Expansion: SD-card storage over just 2
|
|
5
|
+
wires (I2C), with expansion-pin control and a module-side WS2812B bit-bang
|
|
6
|
+
engine. It is an independent driver for the Qwiic Python ecosystem (Qwiic_Py),
|
|
7
|
+
built on the ``sparkfun_qwiic_i2c`` transport and dynamically discoverable by
|
|
8
|
+
it. Not authored, published or endorsed by SparkFun Electronics.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 I2C microSD Expansion contributors
|
|
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 all
|
|
13
|
+
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 THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: qwiic_sd_expansion_py
|
|
3
|
+
Version: 1.0.12
|
|
4
|
+
Summary: Qwiic Python driver for the I2C microSD Expansion module
|
|
5
|
+
Home-page: https://github.com/syntax1269/I2C_microSD_Expansion_Qwiic_Py
|
|
6
|
+
Author: syntax1269
|
|
7
|
+
Author-email: syntax1269@gmail.com
|
|
8
|
+
Maintainer: syntax1269
|
|
9
|
+
Maintainer-email: syntax1269@gmail.com
|
|
10
|
+
License: MIT
|
|
11
|
+
Project-URL: Source, https://github.com/syntax1269/I2C_microSD_Expansion_Qwiic_Py
|
|
12
|
+
Project-URL: Documentation, https://i2c-microsd-expansion-qwiic-py.readthedocs.io/
|
|
13
|
+
Project-URL: Changelog, https://github.com/syntax1269/I2C_microSD_Expansion_Qwiic_Py/blob/main/CHANGELOG.md
|
|
14
|
+
Project-URL: Umbrella project, https://github.com/syntax1269/I2C-microSD-Expansion
|
|
15
|
+
Keywords: electronics,maker,qwiic,i2c,sd,storage
|
|
16
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
17
|
+
Classifier: Intended Audience :: Developers
|
|
18
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
19
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Requires-Python: >=3.8
|
|
22
|
+
Description-Content-Type: text/x-rst
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: sparkfun_qwiic_i2c
|
|
25
|
+
Dynamic: author
|
|
26
|
+
Dynamic: author-email
|
|
27
|
+
Dynamic: classifier
|
|
28
|
+
Dynamic: description
|
|
29
|
+
Dynamic: description-content-type
|
|
30
|
+
Dynamic: home-page
|
|
31
|
+
Dynamic: keywords
|
|
32
|
+
Dynamic: license
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
Dynamic: maintainer
|
|
35
|
+
Dynamic: maintainer-email
|
|
36
|
+
Dynamic: project-url
|
|
37
|
+
Dynamic: requires-dist
|
|
38
|
+
Dynamic: requires-python
|
|
39
|
+
Dynamic: summary
|
|
40
|
+
|
|
41
|
+
qwiic_sd_expansion_py
|
|
42
|
+
=====================
|
|
43
|
+
|
|
44
|
+
Python module for the I2C microSD Expansion: SD-card storage over just 2
|
|
45
|
+
wires (I2C), with expansion-pin control and a module-side WS2812B bit-bang
|
|
46
|
+
engine. It is an independent driver for the Qwiic Python ecosystem (Qwiic_Py),
|
|
47
|
+
built on the ``sparkfun_qwiic_i2c`` transport and dynamically discoverable by
|
|
48
|
+
it. Not authored, published or endorsed by SparkFun Electronics.
|