mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #1179 from openmv/nano_sensor
Implement sensor driver for nrf/Nano 33
This commit is contained in:
commit
935b58d0ae
@ -1 +1 @@
|
||||
Subproject commit 25402f4ce908d6f76180a0bde3c9f1f03b61a459
|
||||
Subproject commit 7e9eeadd0a64f9f69f3447d0c090349595e3071f
|
||||
@ -44,6 +44,7 @@
|
||||
// Enable sensor drivers
|
||||
#define OMV_ENABLE_OV2640 (0)
|
||||
#define OMV_ENABLE_OV5640 (0)
|
||||
#define OMV_ENABLE_OV7670 (1)
|
||||
#define OMV_ENABLE_OV7690 (0)
|
||||
#define OMV_ENABLE_OV7725 (0)
|
||||
#define OMV_ENABLE_OV9650 (0)
|
||||
@ -62,11 +63,7 @@
|
||||
|
||||
// If buffer size is bigger than this threshold, the quality is reduced.
|
||||
// This is only used for JPEG images sent to the IDE not normal compression.
|
||||
#define JPEG_QUALITY_THRESH (320*240*2)
|
||||
|
||||
// Low and high JPEG QS.
|
||||
#define JPEG_QUALITY_LOW 50
|
||||
#define JPEG_QUALITY_HIGH 90
|
||||
#define JPEG_QUALITY_THRESH (320*240)
|
||||
|
||||
// Low and high JPEG QS.
|
||||
#define JPEG_QUALITY_LOW 50
|
||||
@ -103,6 +100,12 @@
|
||||
#define FIR_I2C_SDA_PIN (31)
|
||||
#define FIR_I2C_SPEED (CAMBUS_SPEED_FULL)
|
||||
|
||||
// ISC I2C
|
||||
#define ISC_I2C_ID (0)
|
||||
#define ISC_I2C_SCL_PIN (2)
|
||||
#define ISC_I2C_SDA_PIN (31)
|
||||
#define ISC_I2C_SPEED (CAMBUS_SPEED_FULL)
|
||||
|
||||
// I2C0
|
||||
#define TWI0_ID (0)
|
||||
#define TWI0_SCL_PIN (2)
|
||||
@ -120,6 +123,40 @@
|
||||
#define PDM_CLK_PIN (26)
|
||||
#define PDM_PWR_PIN (17)
|
||||
|
||||
// DCMI
|
||||
#define DCMI_PWDN_PIN (29)
|
||||
//#define DCMI_RESET_PIN (30)
|
||||
|
||||
#define DCMI_D0_PIN (32+2)
|
||||
#define DCMI_D1_PIN (32+3)
|
||||
#define DCMI_D2_PIN (32+10)
|
||||
#define DCMI_D3_PIN (32+11)
|
||||
#define DCMI_D4_PIN (32+12)
|
||||
#define DCMI_D5_PIN (32+13)
|
||||
#define DCMI_D6_PIN (32+14)
|
||||
#define DCMI_D7_PIN (32+15)
|
||||
|
||||
#define DCMI_VSYNC_PIN (21)
|
||||
#define DCMI_HSYNC_PIN (5)
|
||||
#define DCMI_PXCLK_PIN (4)
|
||||
#define DCMI_XCLK_PIN (27)
|
||||
|
||||
#if defined(DCMI_RESET_PIN)
|
||||
#define DCMI_RESET_LOW() nrf_gpio_pin_clear(DCMI_RESET_PIN)
|
||||
#define DCMI_RESET_HIGH() nrf_gpio_pin_set(DCMI_RESET_PIN)
|
||||
#else
|
||||
#define DCMI_RESET_LOW()
|
||||
#define DCMI_RESET_HIGH()
|
||||
#endif
|
||||
|
||||
#if defined(DCMI_PWDN_PIN)
|
||||
#define DCMI_PWDN_LOW() nrf_gpio_pin_clear(DCMI_PWDN_PIN)
|
||||
#define DCMI_PWDN_HIGH() nrf_gpio_pin_set(DCMI_PWDN_PIN)
|
||||
#else
|
||||
#define DCMI_PWDN_LOW()
|
||||
#define DCMI_PWDN_HIGH()
|
||||
#endif
|
||||
|
||||
// FIR Module
|
||||
#define OMV_ENABLE_FIR_MLX90621 (1)
|
||||
#define OMV_ENABLE_FIR_MLX90640 (1)
|
||||
|
||||
@ -16,3 +16,4 @@ MICROPY_PY_ULAB=1
|
||||
MICROPY_PY_AUDIO=1
|
||||
MICROPY_PY_LCD = 0
|
||||
MICROPY_PY_TV = 0
|
||||
MICROPY_PY_SENSOR = 1
|
||||
|
||||
@ -81,6 +81,8 @@
|
||||
#include "py_audio.h"
|
||||
#include "framebuffer.h"
|
||||
#include "omv_boardconfig.h"
|
||||
#include "cambus.h"
|
||||
#include "sensor.h"
|
||||
|
||||
uint32_t HAL_GetHalVersion()
|
||||
{
|
||||
@ -151,7 +153,11 @@ soft_reset:
|
||||
uart_init0();
|
||||
#endif
|
||||
|
||||
#if MICROPY_PY_SENSOR
|
||||
sensor_init();
|
||||
#endif
|
||||
framebuffer_init0();
|
||||
fb_alloc_init0();
|
||||
|
||||
#if (MICROPY_PY_BLE_NUS == 0) && (MICROPY_HW_USB_CDC == 0)
|
||||
{
|
||||
|
||||
1060
src/omv/ports/nrf/sensor.c
Normal file
1060
src/omv/ports/nrf/sensor.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user