Merge pull request #4058 from thread-liu/liukang

[add] dcmi and ov2640 driver.
This commit is contained in:
Bernard Xiong authored and GitHub committed 2020-12-07 00:11:12 +08:00
commit cc9374f052
6 files changed
+1841 -17

No files matched your search

+51 -17
View File
@@ -41,6 +41,13 @@ menu "Onboard Peripheral Drivers"
select RT_USING_DFS_ELMFAT
default n
config BSP_USING_OV2640
bool "Enable camera (ov2640)"
select BSP_USING_DCMI
select BSP_USING_I2C
select BSP_USING_I2C2
default n
endmenu
menu "On-chip Peripheral Drivers"
@@ -98,28 +105,55 @@ menu "On-chip Peripheral Drivers"
select RT_USING_SPI
default n
menuconfig BSP_USING_I2C1
bool "Enable I2C1 BUS (software simulation)"
default n
select RT_USING_I2C
select RT_USING_I2C_BITOPS
select RT_USING_PIN
if BSP_USING_I2C1
comment "Notice: PH4 --> 116; PH5 --> 117"
config BSP_I2C1_SCL_PIN
int "i2c1 scl pin number"
range 1 176
default 116
config BSP_I2C1_SDA_PIN
int "I2C1 sda pin number"
range 1 176
default 117
endif
menuconfig BSP_USING_I2C
bool "Enable I2C BUS (software simulation)"
select RT_USING_I2C
select RT_USING_I2C_BITOPS
select RT_USING_PIN
default n
if BSP_USING_I2C
menuconfig BSP_USING_I2C1
bool "Enable I2C1 BUS (software simulation)"
default n
if BSP_USING_I2C1
comment "Notice: PH4 --> 116; PH5 --> 117"
config BSP_I2C1_SCL_PIN
int "i2c1 scl pin number"
range 1 176
default 116
config BSP_I2C1_SDA_PIN
int "I2C1 sda pin number"
range 1 176
default 117
menuconfig BSP_USING_I2C2
bool "Enable I2C2 BUS (software simulation)"
default n
endif
menuconfig BSP_USING_I2C2
bool "Enable I2C2 BUS (software simulation)"
default n
if BSP_USING_I2C2
comment "Notice: PH13 --> 125; PH15 --> 127"
config BSP_I2C2_SCL_PIN
int "i2c2 scl pin number"
range 1 176
default 127
config BSP_I2C2_SDA_PIN
int "I2C2 sda pin number"
range 1 176
default 125
endif
endif
config BSP_USING_ON_CHIP_FLASH
bool "Enable on-chip FLASH"
default n
config BSP_USING_DCMI
bool "Enable DCMI"
default n
menuconfig BSP_USING_ONCHIP_RTC
bool "Enable RTC"
select RT_USING_RTC
@@ -17,6 +17,10 @@ if GetDepend(['BSP_USING_QSPI_FLASH']):
src += Glob('ports/drv_qspi_flash.c')
if GetDepend(['BSP_USING_SDMMC']):
src += Glob('ports/drv_sdio.c')
if GetDepend(['BSP_USING_DCMI']):
src += Glob('ports/drv_dcmi.c')
if GetDepend(['BSP_USING_OV2640']):
src += Glob('ports/drv_ov2640.c')
path = [cwd]
path += [cwd + '/CubeMX_Config/Inc']
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2006-2022, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-07-27 thread-liu the first version
*/
#ifndef __DRV_DCMI_H__
#define __DRV_DCMI_H__
#include "board.h"
#ifdef __cplusplus
extern "C" {
#endif
struct rt_dcmi_device
{
struct rt_device parent;
};
extern DMA_HandleTypeDef hdma_dcmi;
extern void rt_hw_dcmi_dma_config(rt_uint32_t dst_addr1, rt_uint32_t dst_addr2, rt_uint32_t len);
extern void DCMI_Start(void);
extern void DCMI_Stop(void);
#ifdef __cplusplus
}
#endif
#endif
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff