From 7edeb4fbeea8ff4c365f70b504dc67b2a8a95136 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Sun, 3 Nov 2024 13:50:17 +0100 Subject: [PATCH] boards/PICO: Rename RPI Pico. --- src/omv/boards/PICO/dcmi.pio | 89 ------------- src/omv/boards/PICO/imlib_config.h | 149 ---------------------- src/omv/boards/PICO/manifest.py | 17 --- src/omv/boards/PICO/omv_boardconfig.cmake | 10 -- src/omv/boards/PICO/omv_boardconfig.h | 113 ---------------- src/omv/boards/PICO/omv_boardconfig.mk | 1 - src/omv/boards/PICO/ulab_config.h | 16 --- 7 files changed, 395 deletions(-) delete mode 100644 src/omv/boards/PICO/dcmi.pio delete mode 100644 src/omv/boards/PICO/imlib_config.h delete mode 100644 src/omv/boards/PICO/manifest.py delete mode 100644 src/omv/boards/PICO/omv_boardconfig.cmake delete mode 100644 src/omv/boards/PICO/omv_boardconfig.h delete mode 100755 src/omv/boards/PICO/omv_boardconfig.mk delete mode 100644 src/omv/boards/PICO/ulab_config.h diff --git a/src/omv/boards/PICO/dcmi.pio b/src/omv/boards/PICO/dcmi.pio deleted file mode 100644 index 39c4091eb..000000000 --- a/src/omv/boards/PICO/dcmi.pio +++ /dev/null @@ -1,89 +0,0 @@ -; This file is part of the OpenMV project. -; -; Copyright (c) 2013-2021 Ibrahim Abdelkader -; Copyright (c) 2013-2021 Kwabena W. Agyeman -; -; This work is licensed under the MIT license, see the file LICENSE for details. -; Image Sensor PIO program. - -.define public PXCLK 11 -.define public HSYNC 12 -.define public VSYNC 13 - -.program dcmi_default -.wrap_target - pull block ; Read number of lines in OSR - mov y, osr ; Copy OSR to Y - pull block ; Read line width in bytes in OSR - - wait 1 gpio VSYNC ; Wait for VSYNC to go low - wait 0 gpio VSYNC - -HSYNC_LOOP: - mov x, osr ; Copy line width from OSR to X - wait 0 gpio HSYNC ; Wait for HSYNC to go high - wait 1 gpio HSYNC - -PIXEL_LOOP: - wait 0 gpio PXCLK - wait 1 gpio PXCLK - in pins 8 - jmp x-- PIXEL_LOOP ; Keep reading pixels while x != 0 - jmp y-- HSYNC_LOOP ; Keep reading lines while y != 0 -.wrap - -.program dcmi_odd_byte -.wrap_target - pull block ; Read number of lines in OSR - mov y, osr ; Copy OSR to Y - pull block ; Read line width in bytes in OSR - - wait 1 gpio VSYNC ; Wait for VSYNC to go low - wait 0 gpio VSYNC - -HSYNC_LOOP: - mov x, osr ; Copy line width from OSR to X - wait 0 gpio HSYNC ; Wait for HSYNC to go high - wait 1 gpio HSYNC - -PIXEL_LOOP: - wait 0 gpio PXCLK - wait 1 gpio PXCLK - in pins 8 - wait 0 gpio PXCLK - wait 1 gpio PXCLK - jmp x-- PIXEL_LOOP ; Keep reading pixels while x != 0 - jmp y-- HSYNC_LOOP ; Keep reading lines while y != 0 -.wrap - -% c-sdk { -int omv_csi_config(omv_csi_config_t config) { - if (config == OMV_CSI_CONFIG_PIXFORMAT) { - uint offset; - pio_sm_config config; - - pio_sm_set_enabled(OMV_CSI_PIO, OMV_CSI_SM, false); - pio_sm_clear_fifos(OMV_CSI_PIO, OMV_CSI_SM); - - for(uint i=OMV_CSI_D0_PIN; i - * Copyright (c) 2013-2021 Kwabena W. Agyeman - * - * This work is licensed under the MIT license, see the file LICENSE for details. - * - * Image library configuration. - */ -#ifndef __IMLIB_CONFIG_H__ -#define __IMLIB_CONFIG_H__ - -// Enable Image I/O -//#define IMLIB_ENABLE_IMAGE_IO - -// Enable Image File I/O -// Not filesystem yet -//#define IMLIB_ENABLE_IMAGE_FILE_IO - -// Enable LAB LUT -//#define IMLIB_ENABLE_LAB_LUT - -// Enable YUV LUT -//#define IMLIB_ENABLE_YUV_LUT - -// Enable ISP ops -//#define IMLIB_ENABLE_ISP_OPS - -// Enable binary ops -//#define IMLIB_ENABLE_BINARY_OPS - -// Enable math ops -//#define IMLIB_ENABLE_MATH_OPS - -// Enable flood_fill() -//#define IMLIB_ENABLE_FLOOD_FILL - -// Enable mean() -//#define IMLIB_ENABLE_MEAN - -// Enable median() -//#define IMLIB_ENABLE_MEDIAN - -// Enable mode() -//#define IMLIB_ENABLE_MODE - -// Enable midpoint() -//#define IMLIB_ENABLE_MIDPOINT - -// Enable morph() -//#define IMLIB_ENABLE_MORPH - -// Enable Gaussian -//#define IMLIB_ENABLE_GAUSSIAN - -// Enable Laplacian -//#define IMLIB_ENABLE_LAPLACIAN - -// Enable bilateral() -//#define IMLIB_ENABLE_BILATERAL - -// Enable linpolar() -//#define IMLIB_ENABLE_LINPOLAR - -// Enable logpolar() -//#define IMLIB_ENABLE_LOGPOLAR - -// Enable lens_corr() -//#define IMLIB_ENABLE_LENS_CORR - -// Enable rotation_corr() -//#define IMLIB_ENABLE_ROTATION_CORR - -// Enable phasecorrelate() -//#if defined(IMLIB_ENABLE_ROTATION_CORR) -//#define IMLIB_ENABLE_FIND_DISPLACEMENT -//#endif - -// Enable get_similarity() -//#define IMLIB_ENABLE_GET_SIMILARITY - -// Enable find_lines() -//#define IMLIB_ENABLE_FIND_LINES - -// Enable find_line_segments() -//#define IMLIB_ENABLE_FIND_LINE_SEGMENTS - -// Enable find_circles() -//#define IMLIB_ENABLE_FIND_CIRCLES - -// Enable find_rects() -//#define IMLIB_ENABLE_FIND_RECTS - -// Enable find_qrcodes() (14 KB) -//#define IMLIB_ENABLE_QRCODES - -// Enable find_apriltags() (64 KB) -//#define IMLIB_ENABLE_APRILTAGS - -// Enable fine find_apriltags() - (8-way connectivity versus 4-way connectivity) -// #define IMLIB_ENABLE_FINE_APRILTAGS - -// Enable high res find_apriltags() - uses more RAM -// #define IMLIB_ENABLE_HIGH_RES_APRILTAGS - -// Enable find_datamatrices() (26 KB) -//#define IMLIB_ENABLE_DATAMATRICES - -// Enable find_barcodes() (42 KB) -//#define IMLIB_ENABLE_BARCODES - -// Enable find_features() and built-in Haar cascades. (75KBs) -//#define IMLIB_ENABLE_FEATURES -//#define IMLIB_ENABLE_FEATURES_BUILTIN_FACE_CASCADE -//#define IMLIB_ENABLE_FEATURES_BUILTIN_EYES_CASCADE - -// Enable Tensor Flow -#if !defined(CUBEAI) -//#define IMLIB_ENABLE_TFLM -#endif - -// Enable FAST (20+ KBs). -// #define IMLIB_ENABLE_FAST - -// Enable find_template() -//#define IMLIB_FIND_TEMPLATE - -// Enable find_lbp() -//#define IMLIB_ENABLE_FIND_LBP - -// Enable find_keypoints() -//#if defined(IMLIB_ENABLE_FAST) || defined(IMLIB_ENABLE_AGAST) -//#define IMLIB_ENABLE_FIND_KEYPOINTS -//#endif - -// Enable load, save and match descriptor -//#define IMLIB_ENABLE_DESCRIPTOR - -// Enable find_hog() -//#define IMLIB_ENABLE_HOG - -// Enable selective_search() -//#define IMLIB_ENABLE_SELECTIVE_SEARCH - -// Stereo Imaging -// #define IMLIB_ENABLE_STEREO_DISPARITY - -#endif //__IMLIB_CONFIG_H__ diff --git a/src/omv/boards/PICO/manifest.py b/src/omv/boards/PICO/manifest.py deleted file mode 100644 index f934dd6df..000000000 --- a/src/omv/boards/PICO/manifest.py +++ /dev/null @@ -1,17 +0,0 @@ -include("$(MPY_DIR)/extmod/asyncio") - -# Networking -require("ssl") -require("ntptime") -require("webrepl") - -# Drivers -require("onewire") -require("ds18x20") -require("dht") -require("neopixel") -freeze ("$(OMV_LIB_DIR)/", "machine.py") - -# Utils -require("time") -require("logging") diff --git a/src/omv/boards/PICO/omv_boardconfig.cmake b/src/omv/boards/PICO/omv_boardconfig.cmake deleted file mode 100644 index ff35ae4a8..000000000 --- a/src/omv/boards/PICO/omv_boardconfig.cmake +++ /dev/null @@ -1,10 +0,0 @@ -set(MICROPY_PY_CSI 1) -set(MICROPY_PY_ULAB 1) -set(MICROPY_PY_NINAW10 0) -set(MICROPY_PY_WINC1500 0) -set(MICROPY_PY_BLUETOOTH 0) -set(MICROPY_BLUETOOTH_NIMBLE 0) -set(MICROPY_PY_AUDIO 0) -set(MICROPY_PY_DISPLAY 0) -set(MICROPY_PY_TV 0) -set(MICROPY_PY_BUZZER 0) diff --git a/src/omv/boards/PICO/omv_boardconfig.h b/src/omv/boards/PICO/omv_boardconfig.h deleted file mode 100644 index 6cc6922e7..000000000 --- a/src/omv/boards/PICO/omv_boardconfig.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * This file is part of the OpenMV project. - * - * Copyright (c) 2013-2024 Ibrahim Abdelkader - * Copyright (c) 2013-2024 Kwabena W. Agyeman - * - * This work is licensed under the MIT license, see the file LICENSE for details. - * - * Board configuration and pin definitions. - */ -#ifndef __OMV_BOARDCONFIG_H__ -#define __OMV_BOARDCONFIG_H__ - -// Architecture info -#define OMV_BOARD_ARCH "PICO M0" // 33 chars max -#define OMV_BOARD_TYPE "PICO" -#ifndef LINKER_SCRIPT -extern unsigned char *OMV_BOARD_UID_ADDR; // Unique ID address. -#endif -#define OMV_BOARD_UID_SIZE 2 // Unique ID size in words. -#define OMV_BOARD_UID_OFFSET 4 // Bytes offset for multi-word UIDs. - -// JPEG configuration. -#define OMV_JPEG_CODEC_ENABLE (0) -#define OMV_JPEG_QUALITY_LOW (35) -#define OMV_JPEG_QUALITY_HIGH (60) -#define OMV_JPEG_QUALITY_THRESHOLD (160 * 120) - -// CSI drivers configuration. -#define OMV_OV7670_ENABLE (1) -#define OMV_OV7670_VERSION (70) -#define OMV_OV7670_CLKRC (0x00) - -// FIR drivers configuration. -#define OMV_FIR_MLX90621_ENABLE (0) -#define OMV_FIR_MLX90640_ENABLE (0) -#define OMV_FIR_MLX90641_ENABLE (0) -#define OMV_FIR_AMG8833_ENABLE (1) -#define OMV_FIR_LEPTON_ENABLE (0) - -// UMM heap block size -#define OMV_UMM_BLOCK_SIZE 16 - -// USB IRQn. -#define OMV_USB_IRQN (USBCTRL_IRQ_IRQn) -#define OMV_USB1_IRQ_HANDLER (USBD_IRQHandler) - -// Linker script constants (see the linker script template port/x.ld.S). -#define OMV_MAIN_MEMORY RAM // Data/BSS memory -#define OMV_GC_BLOCK0_MEMORY RAM // Main GC block. -#define OMV_GC_BLOCK0_SIZE (32 * 1024) -#define OMV_STACK_MEMORY RAM // stack memory -#define OMV_STACK_SIZE (8K) -#define OMV_FB_MEMORY RAM // Framebuffer, fb_alloc -#define OMV_FB_SIZE (151K) // FB memory: header + QVGA/GS image -#define OMV_FB_ALLOC_SIZE (12K) // minimum fb alloc size -#define OMV_JPEG_SIZE (20K) // IDE JPEG buffer (header + data). - -// GP LED -#define OMV_LED_PIN (25) - -// FIR I2C -#define OMV_FIR_I2C_ID (0) -#define OMV_FIR_I2C_SPEED (OMV_I2C_SPEED_FULL) - -// ISC I2C -#define OMV_CSI_I2C_ID (1) -#define OMV_CSI_I2C_SPEED (OMV_I2C_SPEED_STANDARD) - -// I2C0 -#define OMV_I2C0_ID (0) -#define OMV_I2C0_SCL_PIN (21) -#define OMV_I2C0_SDA_PIN (20) - -// I2C1 -#define OMV_I2C1_ID (1) -#define OMV_I2C1_SCL_PIN (15) -#define OMV_I2C1_SDA_PIN (14) - -#define OMV_LCD_SPI (spi0) -#define OMV_LCD_CS_PIN (17) -#define OMV_LCD_MOSI_PIN (19) -#define OMV_LCD_SCLK_PIN (18) -#define OMV_LCD_RST_PIN (20) -#define OMV_LCD_RS_PIN (21) - -// Camera interface. -#define OMV_CSI_PIO (pio0) -#define OMV_CSI_SM (0) -#define OMV_CSI_DMA (0) -#define OMV_CSI_DMA_IRQ (DMA_IRQ_0) -#define OMV_CSI_DMA_CHANNEL (0) -#define OMV_CSI_CLK_SOURCE (OMV_CSI_CLK_SOURCE_TIM) -#define OMV_CSI_CLK_FREQUENCY (12500000) - -#define OMV_CSI_D0_PIN (2) -#define OMV_CSI_D1_PIN (3) -#define OMV_CSI_D2_PIN (4) -#define OMV_CSI_D3_PIN (5) -#define OMV_CSI_D4_PIN (6) -#define OMV_CSI_D5_PIN (7) -#define OMV_CSI_D6_PIN (8) -#define OMV_CSI_D7_PIN (9) - -// Must match the pins defined in dcmi.pio. -#define OMV_CSI_HSYNC_PIN (12) -#define OMV_CSI_VSYNC_PIN (13) -#define OMV_CSI_PXCLK_PIN (11) -#define OMV_CSI_MXCLK_PIN (10) -#define OMV_CSI_POWER_PIN (0) -#define OMV_CSI_RESET_PIN (1) - -#endif //__OMV_BOARDCONFIG_H__ diff --git a/src/omv/boards/PICO/omv_boardconfig.mk b/src/omv/boards/PICO/omv_boardconfig.mk deleted file mode 100755 index 7d62f97c9..000000000 --- a/src/omv/boards/PICO/omv_boardconfig.mk +++ /dev/null @@ -1 +0,0 @@ -PORT=rp2 diff --git a/src/omv/boards/PICO/ulab_config.h b/src/omv/boards/PICO/ulab_config.h deleted file mode 100644 index a7e8e7711..000000000 --- a/src/omv/boards/PICO/ulab_config.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * This file is part of the OpenMV project. - * Copyright (c) 2013-2016 Kwabena W. Agyeman - * This work is licensed under the MIT license, see the file LICENSE for details. - * - * Ulab config file. - * - */ -#ifndef __ULAB_CONFIG_H__ -#define __ULAB_CONFIG_H__ -// Override ulab defaults here. -#define ULAB_SUPPORTS_COMPLEX (0) -#define NDARRAY_BINARY_USES_FUN_POINTER (1) -#define ULAB_SCIPY_HAS_OPTIMIZE_MODULE (0) -#define ULAB_SCIPY_HAS_SPECIAL_MODULE (0) -#endif //__ULAB_CONFIG_H__