mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Make TV and LCD optional
This commit is contained in:
parent
8fdac0a0ac
commit
c2567c3416
10
src/Makefile
10
src/Makefile
@ -142,6 +142,16 @@ MPY_CFLAGS += -DMICROPY_PY_MICRO_SPEECH=1
|
||||
MICROPY_ARGS += MICROPY_PY_MICRO_SPEECH=1
|
||||
endif
|
||||
|
||||
ifeq ($(MICROPY_PY_LCD), 1)
|
||||
MPY_CFLAGS += -DMICROPY_PY_LCD=1
|
||||
MICROPY_ARGS += MICROPY_PY_LCD=1
|
||||
endif
|
||||
|
||||
ifeq ($(MICROPY_PY_TV), 1)
|
||||
MPY_CFLAGS += -DMICROPY_PY_TV=1
|
||||
MICROPY_ARGS += MICROPY_PY_TV=1
|
||||
endif
|
||||
|
||||
# Include the port Makefile.
|
||||
include $(OMV_DIR)/ports/$(PORT)/omv_portconfig.mk
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 338e3f91cf96c105c683eb0dbf9c990d74e85728
|
||||
Subproject commit e5d4238a436a2a0d57fd7c7820eab49c3b2185c4
|
||||
@ -21,3 +21,5 @@ MICROPY_PY_LWIP = 1
|
||||
MICROPY_PY_NETWORK_CYW43 = 1
|
||||
MICROPY_PY_AUDIO = 0
|
||||
MICROPY_PY_MICRO_SPEECH = 0
|
||||
MICROPY_PY_LCD = 1
|
||||
MICROPY_PY_TV = 1
|
||||
|
||||
@ -14,3 +14,5 @@ OMV_HSE_VALUE=12000000
|
||||
DFU_DEVICE=0x0483:0xdf11
|
||||
MICROPY_PY_ULAB=1
|
||||
MICROPY_PY_AUDIO=1
|
||||
MICROPY_PY_LCD = 0
|
||||
MICROPY_PY_TV = 0
|
||||
|
||||
@ -14,3 +14,5 @@ OMV_ENABLE_BL=1
|
||||
OMV_ENABLE_UVC=1
|
||||
MICROPY_PY_SENSOR = 1
|
||||
MICROPY_PY_WINC1500 = 1
|
||||
MICROPY_PY_LCD = 1
|
||||
MICROPY_PY_TV = 1
|
||||
|
||||
@ -15,3 +15,5 @@ OMV_ENABLE_UVC=1
|
||||
MICROPY_PY_SENSOR = 1
|
||||
MICROPY_PY_ULAB = 1
|
||||
MICROPY_PY_WINC1500 = 1
|
||||
MICROPY_PY_LCD = 1
|
||||
MICROPY_PY_TV = 1
|
||||
|
||||
@ -16,3 +16,5 @@ MICROPY_PY_SENSOR = 1
|
||||
MICROPY_PY_ULAB = 1
|
||||
MICROPY_PY_WINC1500 = 1
|
||||
MICROPY_PY_IMU = 1
|
||||
MICROPY_PY_LCD = 1
|
||||
MICROPY_PY_TV = 1
|
||||
|
||||
@ -15,3 +15,5 @@ OMV_ENABLE_UVC=1
|
||||
MICROPY_PY_SENSOR = 1
|
||||
MICROPY_PY_ULAB = 1
|
||||
MICROPY_PY_WINC1500 = 1
|
||||
MICROPY_PY_LCD = 1
|
||||
MICROPY_PY_TV = 1
|
||||
|
||||
@ -15,3 +15,5 @@ OMV_ENABLE_UVC=1
|
||||
MICROPY_PY_SENSOR = 1
|
||||
MICROPY_PY_ULAB = 1
|
||||
MICROPY_PY_WINC1500 = 1
|
||||
MICROPY_PY_LCD = 1
|
||||
MICROPY_PY_TV = 1
|
||||
|
||||
@ -20,3 +20,5 @@ MICROPY_PY_LWIP = 1
|
||||
MICROPY_PY_NETWORK_CYW43 = 1
|
||||
MICROPY_PY_AUDIO = 1
|
||||
MICROPY_PY_MICRO_SPEECH = 1
|
||||
MICROPY_PY_LCD = 1
|
||||
MICROPY_PY_TV = 1
|
||||
|
||||
@ -22,6 +22,8 @@
|
||||
#include "omv_boardconfig.h"
|
||||
#include STM32_HAL_H
|
||||
|
||||
#if MICROPY_PY_LCD
|
||||
|
||||
#define FRAMEBUFFER_COUNT 3
|
||||
static int framebuffer_head = 0;
|
||||
static volatile int framebuffer_tail = 0;
|
||||
@ -1790,3 +1792,5 @@ void py_lcd_init0()
|
||||
{
|
||||
py_lcd_deinit();
|
||||
}
|
||||
|
||||
#endif // MICROPY_PY_LCD
|
||||
|
||||
@ -18,6 +18,8 @@
|
||||
#include "py_lcd_cec.h"
|
||||
#include "omv_boardconfig.h"
|
||||
|
||||
#if MICROPY_PY_LCD
|
||||
|
||||
#ifdef OMV_CEC_PRESENT
|
||||
static mp_obj_t lcd_cec_user_cb = NULL;
|
||||
|
||||
@ -598,3 +600,5 @@ void lcd_cec_register_cec_receive_cb(mp_obj_t cb, mp_obj_t dst_addr)
|
||||
if (cb != mp_const_none) extint_enable(OMV_CEC_PIN->pin);
|
||||
}
|
||||
#endif // OMV_CEC_PRESENT
|
||||
|
||||
#endif // MICROPY_PY_LCD
|
||||
|
||||
@ -19,6 +19,8 @@
|
||||
#include "omv_boardconfig.h"
|
||||
#include STM32_HAL_H
|
||||
|
||||
#if MICROPY_PY_LCD
|
||||
|
||||
#ifdef OMV_TOUCH_PRESENT
|
||||
#define FT5X06_I2C_ADDR 0x38
|
||||
static mp_obj_base_t *lcd_touch_bus = NULL;
|
||||
@ -187,3 +189,5 @@ void lcd_touch_register_touch_cb(mp_obj_t cb)
|
||||
if (cb != mp_const_none) extint_enable(OMV_TOUCH_INT_PIN->pin);
|
||||
}
|
||||
#endif // OMV_TOUCH_PRESENT
|
||||
|
||||
#endif // MICROPY_PY_LCD
|
||||
|
||||
@ -18,6 +18,8 @@
|
||||
#include "omv_boardconfig.h"
|
||||
#include STM32_HAL_H
|
||||
|
||||
#if MICROPY_PY_TV
|
||||
|
||||
#define TV_WIDTH 352
|
||||
#define TV_HEIGHT 240
|
||||
#define TV_REFRESH 60
|
||||
@ -1063,3 +1065,5 @@ void py_tv_init0()
|
||||
{
|
||||
py_tv_deinit();
|
||||
}
|
||||
|
||||
#endif // MICROPY_PY_TV
|
||||
|
||||
Loading…
Reference in New Issue
Block a user