Skip to content

Commit 471115f

Browse files
committed
Change default sm_id values of PIO drivers
Camera drivers no longer have a default, must be specified Example driver initialization now uses sm_id 4 and 5 to not conflict with XRP's encoders
1 parent e2872c2 commit 471115f

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

cv2_drivers/cameras/hm01b0_pio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ def __init__(
1010
pin_vsync,
1111
pin_hsync,
1212
pin_pclk,
13+
sm_id,
1314
pin_xclk = None,
1415
xclk_freq = 25_000_000,
15-
sm_id = 0,
1616
num_data_pins = 1,
1717
i2c_address = 0x24,
1818
):

cv2_drivers/cameras/ov5640_pio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ def __init__(
1010
pin_vsync,
1111
pin_hsync,
1212
pin_pclk,
13+
sm_id,
1314
pin_xclk = None,
1415
xclk_freq = 5_000_000,
15-
sm_id = 0,
1616
i2c_address = 0x3c
1717
):
1818
# Create the frame buffer

examples/cv2_hardware_init/camera.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
pin_vsync = 13,
2020
pin_hsync = 14,
2121
pin_pclk = 15,
22+
sm_id = 5,
2223
pin_xclk = None, # Optional xclock pin, specify if needed
2324
num_data_pins = 1 # Number of data pins used by the camera (1, 4, or 8)
2425
)

examples/cv2_hardware_init/display.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# display = st7789_pio.ST7789_PIO(
2929
# width = 240,
3030
# height = 320,
31-
# sm_id = 1,
31+
# sm_id = 4,
3232
# pin_clk = 18,
3333
# pin_tx = 19,
3434
# pin_dc = 16,

0 commit comments

Comments
 (0)