Commit graph

224 commits

Author SHA1 Message Date
foamyguy
1539f0a96e change to ruff 2025-05-16 18:31:52 +00:00
f78d675d42
Merge pull request #76 from adafruit/fix-print-c-program
Avoid printing `True` in C program
2025-01-23 16:41:06 -06:00
649526118b Avoid printing True in C program
& test it!

Closes: #74
2025-01-23 16:13:12 -06:00
foamyguy
00cb534d03 add sphinx configuration to rtd.yaml
Signed-off-by: foamyguy <foamyguy@gmail.com>
2025-01-16 09:17:23 -06:00
Scott Shawcroft
0482020265
Merge pull request #73 from adafruit/side-set-pindirs-directive
Add support for `.side_set ... pindirs`
2024-12-03 10:16:09 -08:00
23bd1b13e7 Add support for .side_set ... pindirs
This also requires a core change to set the respective bit in the
PIO hardware.
2024-12-01 11:11:09 -06:00
foamyguy
de37174dbc remove deprecated get_html_theme_path() call
Signed-off-by: foamyguy <foamyguy@gmail.com>
2024-10-07 14:48:47 -05:00
11ddcb5327
Merge pull request #72 from adafruit/public-labels-etc
Add public_labels, test of labels
2024-09-24 16:58:45 -05:00
d6dcfab478
Update adafruit_pioasm.py
Co-authored-by: Scott Shawcroft <scott@adafruit.com>
2024-09-24 16:58:29 -05:00
Scott Shawcroft
76f9692750
Merge pull request #71 from adafruit/doc
Start documenting the PIO language subset supported by adafuit_pioasm
2024-09-20 10:15:36 -07:00
b746aec729 Add public_labels, test of labels
Now, a label declared with `public foo:` will be exported in the
`public_labels` property of `Program` objects.

Additionally, a test of this feature as well as the existing
duplicate label detection feature is added.

Change the return type of `assemble` so that it better reflects reality

Add docstrings for the public properties of Program objects
2024-09-19 22:13:14 -05:00
4f1bfde858 Expand documentation of syntax a bit 2024-09-19 12:49:01 -05:00
4d17d310df Start documenting the PIO language subset supported by adafuit_pioasm
this documentation could be more complete, but it's better than
nothing.
2024-09-19 11:54:05 -05:00
Scott Shawcroft
5e7678e26c
Merge pull request #68 from adafruit/rp2350
add language features for .pio_version 1
2024-09-19 09:53:07 -07:00
2b219924fd
Merge pull request #70 from adafruit/fix-rotaryencoder-example
Remove call to never-defined function
2024-09-18 16:52:15 -05:00
8f52bea49d Rename this file to emphasize it's for generating test cases
.. not part of the testsuite proper.
2024-09-18 15:12:50 -05:00
19f5967fbd Remove call to never-defined function 2024-09-18 15:10:11 -05:00
ce01b8c10f add Program.from_file 2024-09-15 14:31:01 -05:00
679feb8e21 Fix assembly of irq & mov rxfifo[] instructions to match sdk pioasm 2024-09-13 16:32:12 -05:00
89fc1a125a Add (failing) test comparing "all" instructions to sdk pioasm
the failing tests will be addressed next. They fall into two simple
classes, both pertaining to the new piov1 instructions.
2024-09-13 16:01:53 -05:00
87bf9a7830 remove a debug print 2024-09-13 14:51:06 -05:00
403da520a6 Adjust condition in which ".out 16" is accepted syntax
this feature is in all PIO versions
2024-09-13 14:49:58 -05:00
bdc9fe8277 Update based on review comments 2024-09-13 14:44:11 -05:00
3159513f9b Add an example using the RP2350 "mov ,txfifo[]" feature 2024-09-13 09:56:57 -05:00
919d075f34 Fix checking fifo mode for mov rxfifo instructions 2024-09-13 09:55:26 -05:00
eaa8bb0dc7 fix markup 2024-09-10 14:16:25 -05:00
8a97f71b0c More piov2 updates
* As an extension, ".fifo auto" may be specified to request CircuitPython's
   auto fifo join behavior
 * bounds check on `.set` directive improved
 * redundant kwargs (e.g., out_count vs out_pin_count) fixed
2024-09-10 14:09:34 -05:00
b379f05b29 Merge mov_status_count & _param into mov_status_n
.. and correct .mov_status irq prev and range handling
2024-09-10 11:20:48 -05:00
foamyguy
341a234f0a
Merge pull request #66 from timchinowsky/add_pioasm_i2c_codec
add codec example
2024-09-08 08:25:21 -05:00
foamyguy
a9f20eabe1 pylint allow 2024-09-08 08:18:38 -05:00
86f02e8b83 Add wait jmppin & wait irq prev/next 2024-09-08 08:01:09 -05:00
7acebc63b0 Add mov pindirs 2024-09-07 08:50:25 -05:00
895f8eb056 add mov rxfifo 2024-09-07 08:43:56 -05:00
4f98480aeb Add irq prev/next 2024-09-05 19:54:52 -05:00
e9858c3666 Add .set 2024-09-05 13:50:19 -05:00
ed74947440 Add .out directive 2024-09-05 13:46:47 -05:00
5659a2672a Improve error handling of origin & mov_status directives 2024-09-05 13:18:49 -05:00
4deafa6c65 Add and test .in directive 2024-09-05 13:18:26 -05:00
ff1f57dfb1 Check directives that must come before an instruction 2024-09-05 13:13:20 -05:00
9874ce3f51 Start to consolidate argument range checking 2024-09-05 09:56:47 -05:00
cfa740077f Improve line splitting 2024-09-05 09:55:08 -05:00
cfee88e040 Add .mov_status 2024-09-05 09:49:50 -05:00
3da0f6cea2 Add .fifo directive 2024-09-05 09:05:47 -05:00
a8fa218e45 Recognize .pio_version directive (integer arguments only) 2024-09-05 08:37:43 -05:00
Tim
755d5c6197 add codec example 2024-08-09 14:26:54 -07:00
357f933f10
Merge pull request #65 from adafruit/better-error-sideset-delay
Better diagnose the incorrect lines like "side 1" or "[5]"
2024-07-11 17:19:19 -05:00
be66c02eb3 Better diagnose the incorrect lines like "side 1" or "[5]"
Before this, the exception would be 'IndexError: list index out of range'.
Now it is 'Unknown instruction: side' or similar.

(These need an instruction, even if it's a `nop`: `nop side 1 [5]`)
2024-07-10 08:09:46 -05:00
Scott Shawcroft
73170ebf96
Merge pull request #64 from kbsriram/add-types
Add type annotations for library and tests.
2024-05-29 11:19:05 -07:00
KB Sriram
3e6a8bc392 Add type annotations for library and tests.
Verified that `mypy --strict adafruit_pioasm.py tests` runs without
errors.

Fixes: https://github.com/adafruit/Adafruit_CircuitPython_PIOASM/issues/24
2024-05-27 12:30:52 -07:00
Scott Shawcroft
41a7218ac6
Merge pull request #63 from kbsriram/add-out-tests
Add tests for "out" and "in".
2024-04-26 10:00:42 -07:00