Commit Graph

18 Commits

Author SHA1 Message Date
Dan Halbert
616201109c correct MP_TYPE_FLAG_NONE to MP_TYPE_FLAG_HAS_SPECIAL_ACCESSORS
also remove #include py/objproperty.h where not needed
(side effect of looking for property uses)
2023-11-04 22:51:41 -04:00
Jeff Epler
774f6ac6ab
Switch to using MP_ERROR_TEXT instead of translate, globally 2023-10-30 09:49:06 +01:00
Scott Shawcroft
9633c4e78f
Merge remote-tracking branch 'adafruit/main' into v1.20-merge 2023-10-11 11:21:57 -07:00
Dan Halbert
7e0e6fcdca Metro M4 now compiles 2023-10-03 15:03:59 -04:00
Scott Shawcroft
7938c6cfd2
Remove one I2CPeripheral leftover 2023-10-02 14:36:19 -07:00
Dan Halbert
4d175ab41a convert to MP_DEFINED_CONST_OBJ_TYPE() 2023-09-19 21:09:29 -04:00
Dan Halbert
fe0e2f13bc wip; fix qstr processing 2023-08-10 20:06:32 -04:00
Dan Halbert
0d2c3c3f08 wip: continuing compilation fixes; mp_obj_alloc everywhere 2023-08-07 20:45:57 -04:00
Dan Halbert
a974402542 Improve type validation errors messages, especially for pins 2023-01-10 15:02:55 -05:00
s-ol
40d35e9eaa Don't block in I2CTarget.request(-1)
Partially reverts #6985
Closes #7241
2022-11-20 16:08:00 +01:00
Paulus H.J. Schulinck
89e0601a39 Update I2CTarget.c
Correction of the timeout value range needed to set the timeout to 'forever'.
The line 162 checks timeout for a value of 0 while the function definition defaults timeout to -1. In the current version of the code timeout is only checked for a value of 0 or in the 'else if' part for a value of > 0. So, values of <0 will not be taken in to account.  That is the reason of my modification.
2022-10-03 13:09:40 +01:00
Paulus H.J. Schulinck
041766351c Update I2CTarget.c
Correction in function request() doc function signature.
(after speaking with @jepler on Discord).

(@jepler: 'Circuitpython always has floats enabled')
2022-10-01 22:23:17 +01:00
Paulus H.J. Schulinck
d66eeaab26 Update I2CTarget.c
Modification of the doc text of function request().

1) The timout parameter is a keyword-only argument; so Added '*,' in the function signature;
2) for parameter timeout an integer is expected, not a float.
2022-10-01 21:56:07 +01:00
Jeff Epler
907c5d387f
Tweak black_bindings
Originally, black_bindings found each contiguous "//|" block and sent
it to black independently. This was slower than it needed to be.

Instead, swap the comment prefix: when running black, take off
"//|" prefixes and put "##|" prefixes on all un-prefixed lines.
Then, after black is run, do the opposite operation

This more than doubles the overall speed of "pre-commit run --all",
from 3m20s to 55s CPU time on my local machine (32.5s to under 10s
"elapsed" time)

It also causes a small amount of churn in the bindings, because
black now sees enough context to know whether one 'def' follows another
or ends the 'def's in a 'class'. In the latter case, it adds an extra
newline, which becomes a "//|" line.

I'm less sure why a trailing comma was omitted before down in
rp2pio/StateMachine.c but let's roll with it.
2022-09-30 11:18:13 -05:00
Jeff Epler
b2cc8d2aad
run black_bindings across all bindings 2022-09-27 15:21:42 -05:00
Jeff Epler
4f75d09e86
Get rid of an unneeded message 2022-09-22 11:56:57 -05:00
Jeff Epler
267ec1dc4f
unify some 'must/should be an int' messages 2022-09-22 08:39:32 -05:00
Dan Halbert
84807cd6eb Change I2C terminology from "peripheral" to "target" 2022-08-09 13:13:19 -04:00