Skip to content

Commit a958a32

Browse files
committed
ports/espressif/bindings: apply black_bindings.py
1 parent ed2211b commit a958a32

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

ports/espressif/bindings/esp32_camera/Camera.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
//| external_clock_frequency: int,
5555
//| powerdown_pin: Optional[microcontroller.Pin] = None,
5656
//| reset_pin: Optional[microcontroller.Pin] = None,
57-
//| pixel_format: PixelFormat=PixelFormat.RGB565,
58-
//| frame_size: FrameSize=FrameSize.QQVGA,
59-
//| jpeg_quality: int=15,
57+
//| pixel_format: PixelFormat = PixelFormat.RGB565,
58+
//| frame_size: FrameSize = FrameSize.QQVGA,
59+
//| jpeg_quality: int = 15,
6060
//| framebuffer_count: int = 1,
6161
//| grab_mode: GrabMode = GrabMode.WHEN_EMPTY,
6262
//| ) -> None:
@@ -194,6 +194,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(esp32_camera_camera___exit___obj, 4,
194194

195195
//| frame_available: bool
196196
//| """True if a frame is available, False otherwise"""
197+
//|
197198

198199
STATIC mp_obj_t esp32_camera_camera_frame_available_get(const mp_obj_t self_in) {
199200
esp32_camera_camera_obj_t *self = MP_OBJ_TO_PTR(self_in);
@@ -205,7 +206,9 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(esp32_camera_camera_frame_available_get_obj, es
205206
MP_PROPERTY_GETTER(esp32_camera_camera_frame_available_obj,
206207
(mp_obj_t)&esp32_camera_camera_frame_available_get_obj);
207208

208-
//| def take(self, timeout: Optional[float]=0.25) -> Optional[displayio.Bitmap | ReadableBuffer]:
209+
//| def take(
210+
//| self, timeout: Optional[float] = 0.25
211+
//| ) -> Optional[displayio.Bitmap | ReadableBuffer]:
209212
//| """Record a frame. Wait up to 'timeout' seconds for a frame to be captured.
210213
//|
211214
//| In the case of timeout, `None` is returned.
@@ -291,6 +294,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(esp32_camera_camera_reconfigure_obj, 1, esp32_camera_
291294

292295
//| pixel_format: PixelFormat
293296
//| """The pixel format of captured frames"""
297+
//|
294298

295299
STATIC mp_obj_t esp32_camera_camera_get_pixel_format(const mp_obj_t self_in) {
296300
esp32_camera_camera_obj_t *self = MP_OBJ_TO_PTR(self_in);
@@ -305,6 +309,7 @@ MP_PROPERTY_GETTER(esp32_camera_camera_pixel_format_obj,
305309

306310
//| frame_size: FrameSize
307311
//| """The size of captured frames"""
312+
//|
308313

309314
STATIC mp_obj_t esp32_camera_camera_get_frame_size(const mp_obj_t self_in) {
310315
esp32_camera_camera_obj_t *self = MP_OBJ_TO_PTR(self_in);

ports/espressif/bindings/esp32_camera/__init__.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
//| Non-Espressif microcontrollers use the `imagecapture` module together with wrapper libraries such as `adafruit_ov5640 <https://circuitpython.readthedocs.io/projects/ov5640/en/latest/>`_.
4646
//|
4747
//| """
48+
//|
4849

4950
//| class GrabMode:
5051
//| """Controls when a new frame is grabbed."""

ports/espressif/bindings/espidf/__init__.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
//| """Direct access to a few ESP-IDF details. This module *should not* include any functionality
3838
//| that could be implemented by other frameworks. It should only include ESP-IDF specific
3939
//| things."""
40+
//|
4041

4142
//| def heap_caps_get_total_size() -> int:
4243
//| """Return the total size of the ESP-IDF, which includes the CircuitPython heap."""
@@ -73,6 +74,7 @@ MP_DEFINE_CONST_FUN_OBJ_0(espidf_heap_caps_get_largest_free_block_obj, espidf_he
7374
//|
7475
//| This is necessary when upgrading from CircuitPython 6.3.0 or earlier to CircuitPython 7.0.0, because the
7576
//| layout of data in nvs has changed. The old data will be lost when you perform this operation."""
77+
//|
7678
STATIC mp_obj_t espidf_erase_nvs(void) {
7779
ESP_ERROR_CHECK(nvs_flash_deinit());
7880
ESP_ERROR_CHECK(nvs_flash_erase());
@@ -103,8 +105,10 @@ const mp_obj_type_t mp_type_espidf_IDFError = {
103105

104106

105107
//| import builtins
108+
//|
106109
//| class MemoryError(builtins.MemoryError):
107110
//| """Raised when an ESP IDF memory allocation fails."""
111+
//|
108112
//| ...
109113
//|
110114
NORETURN void mp_raise_espidf_MemoryError(void) {
@@ -122,13 +126,15 @@ const mp_obj_type_t mp_type_espidf_MemoryError = {
122126

123127
//| def get_total_psram() -> int:
124128
//| """Returns the number of bytes of psram detected, or 0 if psram is not present or not configured"""
129+
//|
125130
STATIC mp_obj_t espidf_get_total_psram(void) {
126131
return MP_OBJ_NEW_SMALL_INT(common_hal_espidf_get_total_psram());
127132
}
128133
MP_DEFINE_CONST_FUN_OBJ_0(espidf_get_total_psram_obj, espidf_get_total_psram);
129134

130135
//| def get_reserved_psram() -> int:
131136
//| """Returns number of bytes of psram reserved for use by esp-idf, either a board-specific default value or the value defined in ``/.env``."""
137+
//|
132138
STATIC mp_obj_t espidf_get_reserved_psram(void) {
133139
return MP_OBJ_NEW_SMALL_INT(common_hal_espidf_get_reserved_psram());
134140
}

0 commit comments

Comments
 (0)