Commit Graph

16 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
Dan Halbert 4d175ab41a convert to MP_DEFINED_CONST_OBJ_TYPE() 2023-09-19 21:09:29 -04:00
Dan Halbert 0d2c3c3f08 wip: continuing compilation fixes; mp_obj_alloc everywhere 2023-08-07 20:45:57 -04: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
Kamil Tomaszewski 00426dc232 camera: Update camera_make_new arguments 2021-11-17 16:42:47 +01:00
Jeff Epler 4e7c1a4bd4 Rename make_new's parameter to `all_args`
.. and fix two straggling modules that weren't updated at all.
Maybe they're not included in any builds?
2021-10-15 13:49:33 -05:00
Dan Halbert 1acafbf675 Fix n_args_min on many MP_DEFINE_CONST_FUN_OBJ_KW() 2021-10-07 16:55:19 -04:00
Rob Capellini 9002f351b4 Convert more modules to use MP_REGISTER_MODULE
Convert _eve, _pew, aesio, alarm, audiopwmio, bitops, camera, canio, dualbank, gnss, i2cperipheral, imagecapture, ipaddress, memorymonitor, sdioio, socketpool, ssl, uheap, ustack, watchdog, and wifi modules to use MP_REGISTER_MODULE.

Related to #5183.
2021-09-01 00:19:05 -04:00
Scott Shawcroft 71d2536725
Build fixes thanks to jepler 2021-05-06 09:04:56 -07:00
microDev a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Jeff Epler 3c4562c3ca camera: Provide correct forward-declaration of camera_imageformat_type
This resolves the build error
```
arm-none-eabi-ld: build-spresense/libmpy.a(Camera.o):(.rodata.camera_imageformat_type+0x0): multiple definition of `camera_imageformat_type'; build-spresense/libmpy.a(__init__.o):(.rodata.camera_imageformat_type+0x0): first defined here
arm-none-eabi-ld: build-spresense/libmpy.a(ImageFormat.o):(.rodata.camera_imageformat_type+0x0): multiple definition of `camera_imageformat_type'; build-spresense/libmpy.a(__init__.o):(.rodata.camera_imageformat_type+0x0): first defined here
arm-none-eabi-ld: build-spresense/libmpy.a(Camera.o):(.rodata.camera_imageformat_type+0x0): multiple definition of `camera_imageformat_type'; build-spresense/libmpy.a(__init__.o):(.rodata.camera_imageformat_type+0x0): first defined here
```
2020-12-15 10:40:24 -06:00
Kamil Tomaszewski 61687c81d8 camera: Pass width and height to take_picture() 2020-09-16 13:55:57 +02:00
Kamil Tomaszewski ce7ee58e92 camera: Update camera module 2020-09-14 13:12:20 +02:00
Kamil Tomaszewski c2fc592c2c camera: Change API 2020-09-14 13:11:15 +02:00
Kamil Tomaszewski 064c597b60 camera: Implement new library for camera 2020-09-14 13:11:15 +02:00