mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #1051 from openmv/sensor_module
Make py sensor module configurable.
This commit is contained in:
commit
6e3fa2ba98
@ -1 +1 @@
|
|||||||
Subproject commit 8e0531df1397cee56c6d9d18f8af2220fa4c3d1f
|
Subproject commit 7a39d799900826ff07bb427633a8ad857e6afe42
|
||||||
15
src/omv/boards/NANO33/omv_boardconfig.mk
Executable file
15
src/omv/boards/NANO33/omv_boardconfig.mk
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
MCU=NRF52840
|
||||||
|
CPU=cortex-m4
|
||||||
|
FPU=fpv4-sp-d16
|
||||||
|
PORT=nrf
|
||||||
|
SD=s140
|
||||||
|
HAL_DIR=hal/nrfx
|
||||||
|
NRF_SOFTDEV=s140_nrf52_6.1.1
|
||||||
|
ARM_MATH=ARM_MATH_CM4
|
||||||
|
CFLAGS_MCU=NRF52_SERIES
|
||||||
|
OMV_BOARD_EXTRA_CFLAGS = -DCONFIG_GPIO_AS_PINRESET -DNRF52840_XXAA -DSOFTDEVICE_PRESENT -DBLUETOOTH_SD_DEBUG=1 -DBLUETOOTH_SD=140
|
||||||
|
VECT_TAB_OFFSET=0x26000
|
||||||
|
MAIN_APP_ADDR=0x00026000
|
||||||
|
OMV_HSE_VALUE=12000000
|
||||||
|
DFU_DEVICE=0x0483:0xdf11
|
||||||
|
MICROPY_PY_ULAB=1
|
||||||
@ -12,5 +12,6 @@ OMV_HSE_VALUE=12000000
|
|||||||
DFU_DEVICE=0x0483:0xdf11
|
DFU_DEVICE=0x0483:0xdf11
|
||||||
OMV_ENABLE_BL=1
|
OMV_ENABLE_BL=1
|
||||||
OMV_ENABLE_UVC=1
|
OMV_ENABLE_UVC=1
|
||||||
|
MICROPY_PY_SENSOR = 1
|
||||||
MICROPY_PY_WINC1500 = 1
|
MICROPY_PY_WINC1500 = 1
|
||||||
$(error "This camera is no longer supported :O Have fun hacking the code $(BRACKET)")
|
$(error "This camera is no longer supported :O Have fun hacking the code $(BRACKET)")
|
||||||
|
|||||||
@ -12,4 +12,5 @@ OMV_HSE_VALUE=12000000
|
|||||||
DFU_DEVICE=0x0483:0xdf11
|
DFU_DEVICE=0x0483:0xdf11
|
||||||
OMV_ENABLE_BL=1
|
OMV_ENABLE_BL=1
|
||||||
OMV_ENABLE_UVC=1
|
OMV_ENABLE_UVC=1
|
||||||
|
MICROPY_PY_SENSOR = 1
|
||||||
MICROPY_PY_WINC1500 = 1
|
MICROPY_PY_WINC1500 = 1
|
||||||
|
|||||||
@ -12,5 +12,6 @@ OMV_HSE_VALUE=12000000
|
|||||||
DFU_DEVICE=0x0483:0xdf11
|
DFU_DEVICE=0x0483:0xdf11
|
||||||
OMV_ENABLE_BL=1
|
OMV_ENABLE_BL=1
|
||||||
OMV_ENABLE_UVC=1
|
OMV_ENABLE_UVC=1
|
||||||
|
MICROPY_PY_SENSOR = 1
|
||||||
MICROPY_PY_ULAB = 1
|
MICROPY_PY_ULAB = 1
|
||||||
MICROPY_PY_WINC1500 = 1
|
MICROPY_PY_WINC1500 = 1
|
||||||
|
|||||||
@ -12,6 +12,7 @@ OMV_HSE_VALUE=12000000
|
|||||||
DFU_DEVICE=0x0483:0xdf11
|
DFU_DEVICE=0x0483:0xdf11
|
||||||
OMV_ENABLE_BL=1
|
OMV_ENABLE_BL=1
|
||||||
OMV_ENABLE_UVC=1
|
OMV_ENABLE_UVC=1
|
||||||
|
MICROPY_PY_SENSOR = 1
|
||||||
MICROPY_PY_ULAB = 1
|
MICROPY_PY_ULAB = 1
|
||||||
MICROPY_PY_WINC1500 = 1
|
MICROPY_PY_WINC1500 = 1
|
||||||
MICROPY_PY_IMU = 1
|
MICROPY_PY_IMU = 1
|
||||||
|
|||||||
@ -12,5 +12,6 @@ OMV_HSE_VALUE=12000000
|
|||||||
DFU_DEVICE=0x0483:0xdf11
|
DFU_DEVICE=0x0483:0xdf11
|
||||||
OMV_ENABLE_BL=1
|
OMV_ENABLE_BL=1
|
||||||
OMV_ENABLE_UVC=1
|
OMV_ENABLE_UVC=1
|
||||||
|
MICROPY_PY_SENSOR = 1
|
||||||
MICROPY_PY_ULAB = 1
|
MICROPY_PY_ULAB = 1
|
||||||
MICROPY_PY_WINC1500 = 1
|
MICROPY_PY_WINC1500 = 1
|
||||||
|
|||||||
@ -12,5 +12,6 @@ OMV_HSE_VALUE=12000000
|
|||||||
DFU_DEVICE=0x0483:0xdf11
|
DFU_DEVICE=0x0483:0xdf11
|
||||||
OMV_ENABLE_BL=1
|
OMV_ENABLE_BL=1
|
||||||
OMV_ENABLE_UVC=1
|
OMV_ENABLE_UVC=1
|
||||||
|
MICROPY_PY_SENSOR = 1
|
||||||
MICROPY_PY_ULAB = 1
|
MICROPY_PY_ULAB = 1
|
||||||
MICROPY_PY_WINC1500 = 1
|
MICROPY_PY_WINC1500 = 1
|
||||||
|
|||||||
@ -13,6 +13,7 @@ DFU_DEVICE=0x2341:0x035b
|
|||||||
OMV_BOARD_EXTRA_CFLAGS = -DCORE_CM7
|
OMV_BOARD_EXTRA_CFLAGS = -DCORE_CM7
|
||||||
OMV_ENABLE_BL=0
|
OMV_ENABLE_BL=0
|
||||||
OMV_ENABLE_UVC=1
|
OMV_ENABLE_UVC=1
|
||||||
|
MICROPY_PY_SENSOR = 1
|
||||||
MICROPY_PY_ULAB = 1
|
MICROPY_PY_ULAB = 1
|
||||||
MICROPY_PY_WINC1500 = 0
|
MICROPY_PY_WINC1500 = 0
|
||||||
MICROPY_PY_LWIP = 1
|
MICROPY_PY_LWIP = 1
|
||||||
|
|||||||
@ -12,6 +12,9 @@
|
|||||||
#include "py/mphal.h"
|
#include "py/mphal.h"
|
||||||
#include "py/nlr.h"
|
#include "py/nlr.h"
|
||||||
#include "pin.h"
|
#include "pin.h"
|
||||||
|
|
||||||
|
#if MICROPY_PY_SENSOR
|
||||||
|
|
||||||
#include "sensor.h"
|
#include "sensor.h"
|
||||||
#include "imlib.h"
|
#include "imlib.h"
|
||||||
#include "xalloc.h"
|
#include "xalloc.h"
|
||||||
@ -927,3 +930,4 @@ const mp_obj_module_t sensor_module = {
|
|||||||
.base = { &mp_type_module },
|
.base = { &mp_type_module },
|
||||||
.globals = (mp_obj_t)&globals_dict,
|
.globals = (mp_obj_t)&globals_dict,
|
||||||
};
|
};
|
||||||
|
#endif //MICROPY_PY_SENSOR
|
||||||
|
|||||||
@ -32,6 +32,10 @@ MPY_CFLAGS += -I$(TOP_DIR)/$(MICROPY_DIR)/ports/stm32/lwip_inc/
|
|||||||
# in MicroPython's Makefile, to enable or disable compiling additional modules.
|
# in MicroPython's Makefile, to enable or disable compiling additional modules.
|
||||||
MICROPY_ARGS = BOARD=$(TARGET) DEBUG=$(DEBUG) QSTR_DEFS="$(OMV_QSTR_DEFS)" MPY_LIB_DIR=$(MPY_LIB_DIR)
|
MICROPY_ARGS = BOARD=$(TARGET) DEBUG=$(DEBUG) QSTR_DEFS="$(OMV_QSTR_DEFS)" MPY_LIB_DIR=$(MPY_LIB_DIR)
|
||||||
|
|
||||||
|
ifeq ($(MICROPY_PY_SENSOR), 1)
|
||||||
|
MPY_CFLAGS += -DMICROPY_PY_SENSOR=1
|
||||||
|
MICROPY_ARGS += MICROPY_PY_SENSOR=1
|
||||||
|
endif
|
||||||
ifeq ($(MICROPY_PY_WINC1500), 1)
|
ifeq ($(MICROPY_PY_WINC1500), 1)
|
||||||
MPY_CFLAGS += -DMICROPY_PY_WINC1500=1
|
MPY_CFLAGS += -DMICROPY_PY_WINC1500=1
|
||||||
MICROPY_ARGS += MICROPY_PY_WINC1500=1
|
MICROPY_ARGS += MICROPY_PY_WINC1500=1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user