[bsp/stm32] update ov5640 configuration of openmv
This commit is contained in:
parent
da0164cf8e
commit
5e7badd34c
|
@ -1,11 +1,12 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2018-12-13 zylx first version
|
* 2018-12-13 zylx first version
|
||||||
|
* 2022-04-14 Miaowulue add PWM1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __PWM_CONFIG_H__
|
#ifndef __PWM_CONFIG_H__
|
||||||
|
@ -17,6 +18,17 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef BSP_USING_PWM1
|
||||||
|
#ifndef PWM1_CONFIG
|
||||||
|
#define PWM1_CONFIG \
|
||||||
|
{ \
|
||||||
|
.tim_handle.Instance = TIM1, \
|
||||||
|
.name = "pwm1", \
|
||||||
|
.channel = 0 \
|
||||||
|
}
|
||||||
|
#endif /* PWM1_CONFIG */
|
||||||
|
#endif /* BSP_USING_PWM1 */
|
||||||
|
|
||||||
#ifdef BSP_USING_PWM2
|
#ifdef BSP_USING_PWM2
|
||||||
#ifndef PWM2_CONFIG
|
#ifndef PWM2_CONFIG
|
||||||
#define PWM2_CONFIG \
|
#define PWM2_CONFIG \
|
||||||
|
|
|
@ -104,6 +104,9 @@ if GetDepend(['BSP_USING_LTDC']):
|
||||||
src += ['STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_ltdc.c']
|
src += ['STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_ltdc.c']
|
||||||
src += ['STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma2d.c']
|
src += ['STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma2d.c']
|
||||||
|
|
||||||
|
if GetDepend(['BSP_USING_DCMI']):
|
||||||
|
src += ['STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dcmi.c']
|
||||||
|
|
||||||
path = [cwd + '/STM32H7xx_HAL_Driver/Inc',
|
path = [cwd + '/STM32H7xx_HAL_Driver/Inc',
|
||||||
cwd + '/CMSIS/Device/ST/STM32H7xx/Include',
|
cwd + '/CMSIS/Device/ST/STM32H7xx/Include',
|
||||||
cwd + '/CMSIS/Include']
|
cwd + '/CMSIS/Include']
|
||||||
|
|
|
@ -155,7 +155,7 @@ CONFIG_RT_USING_SERIAL_V1=y
|
||||||
CONFIG_RT_SERIAL_USING_DMA=y
|
CONFIG_RT_SERIAL_USING_DMA=y
|
||||||
CONFIG_RT_SERIAL_RB_BUFSZ=64
|
CONFIG_RT_SERIAL_RB_BUFSZ=64
|
||||||
# CONFIG_RT_USING_CAN is not set
|
# CONFIG_RT_USING_CAN is not set
|
||||||
# CONFIG_RT_USING_HWTIMER is not set
|
CONFIG_RT_USING_HWTIMER=y
|
||||||
# CONFIG_RT_USING_CPUTIME is not set
|
# CONFIG_RT_USING_CPUTIME is not set
|
||||||
CONFIG_RT_USING_I2C=y
|
CONFIG_RT_USING_I2C=y
|
||||||
# CONFIG_RT_I2C_DEBUG is not set
|
# CONFIG_RT_I2C_DEBUG is not set
|
||||||
|
@ -165,7 +165,7 @@ CONFIG_RT_USING_I2C_BITOPS=y
|
||||||
CONFIG_RT_USING_PIN=y
|
CONFIG_RT_USING_PIN=y
|
||||||
# CONFIG_RT_USING_ADC is not set
|
# CONFIG_RT_USING_ADC is not set
|
||||||
# CONFIG_RT_USING_DAC is not set
|
# CONFIG_RT_USING_DAC is not set
|
||||||
# CONFIG_RT_USING_PWM is not set
|
CONFIG_RT_USING_PWM=y
|
||||||
# CONFIG_RT_USING_MTD_NOR is not set
|
# CONFIG_RT_USING_MTD_NOR is not set
|
||||||
# CONFIG_RT_USING_MTD_NAND is not set
|
# CONFIG_RT_USING_MTD_NAND is not set
|
||||||
# CONFIG_RT_USING_PM is not set
|
# CONFIG_RT_USING_PM is not set
|
||||||
|
@ -493,6 +493,7 @@ CONFIG_RT_USING_POSIX_FS=y
|
||||||
# CONFIG_PKG_USING_FDT is not set
|
# CONFIG_PKG_USING_FDT is not set
|
||||||
# CONFIG_PKG_USING_CBOX is not set
|
# CONFIG_PKG_USING_CBOX is not set
|
||||||
# CONFIG_PKG_USING_SNOWFLAKE is not set
|
# CONFIG_PKG_USING_SNOWFLAKE is not set
|
||||||
|
# CONFIG_PKG_USING_HASH_MATCH is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# system packages
|
# system packages
|
||||||
|
@ -762,3 +763,6 @@ CONFIG_BSP_USING_I2C1=y
|
||||||
CONFIG_BSP_I2C1_SCL_PIN=24
|
CONFIG_BSP_I2C1_SCL_PIN=24
|
||||||
CONFIG_BSP_I2C1_SDA_PIN=25
|
CONFIG_BSP_I2C1_SDA_PIN=25
|
||||||
# CONFIG_BSP_USING_I2C2 is not set
|
# CONFIG_BSP_USING_I2C2 is not set
|
||||||
|
CONFIG_BSP_USING_PWM=y
|
||||||
|
CONFIG_BSP_USING_PWM1=y
|
||||||
|
CONFIG_BSP_USING_PWM1_CH1=y
|
||||||
|
|
|
@ -93,6 +93,9 @@ menu "Hardware Drivers Config"
|
||||||
select BSP_USING_DCMI
|
select BSP_USING_DCMI
|
||||||
select BSP_USING_I2C
|
select BSP_USING_I2C
|
||||||
select BSP_USING_I2C1
|
select BSP_USING_I2C1
|
||||||
|
select BSP_USING_PWM
|
||||||
|
select BSP_USING_PWM1
|
||||||
|
select BSP_USING_PWM1_CH1
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config BSP_USING_DCMI
|
config BSP_USING_DCMI
|
||||||
|
@ -137,6 +140,21 @@ menu "Hardware Drivers Config"
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
menuconfig BSP_USING_PWM
|
||||||
|
bool "Enable PWM"
|
||||||
|
default n
|
||||||
|
select RT_USING_PWM
|
||||||
|
if BSP_USING_PWM
|
||||||
|
menuconfig BSP_USING_PWM1
|
||||||
|
bool "Enable timer1 output pwm"
|
||||||
|
default n
|
||||||
|
if BSP_USING_PWM1
|
||||||
|
config BSP_USING_PWM1_CH1
|
||||||
|
bool "Enable PWM1 channel1"
|
||||||
|
default n
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
|
@ -18,15 +18,13 @@ path += [cwd + '/CubeMX_Config/Core/Inc']
|
||||||
path += [cwd + '/ports']
|
path += [cwd + '/ports']
|
||||||
|
|
||||||
if GetDepend(['BSP_USING_QSPI_FLASH']):
|
if GetDepend(['BSP_USING_QSPI_FLASH']):
|
||||||
src += Glob('ports/drv_qspi_flash.c')
|
src += ['ports/drv_qspi_flash.c']
|
||||||
if GetDepend(['BSP_USING_SDMMC']):
|
if GetDepend(['BSP_USING_SDMMC']):
|
||||||
src += Glob('ports/drv_sdio.c')
|
src += ['ports/drv_sdio.c']
|
||||||
if GetDepend(['BSP_USING_OV5640']):
|
if GetDepend(['BSP_USING_OV5640']):
|
||||||
src += Glob('ports/drv_ov5640.c')
|
src += ['ports/drv_ov5640.c']
|
||||||
src += [startup_path_prefix + '/STM32H7xx_HAL/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim.c']
|
|
||||||
if GetDepend(['BSP_USING_DCMI']):
|
if GetDepend(['BSP_USING_DCMI']):
|
||||||
src += Glob('ports/drv_dcmi.c')
|
src += ['ports/drv_dcmi.c']
|
||||||
src += [startup_path_prefix + '/STM32H7xx_HAL/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dcmi.c']
|
|
||||||
|
|
||||||
if rtconfig.CROSS_TOOL == 'gcc':
|
if rtconfig.CROSS_TOOL == 'gcc':
|
||||||
src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h743xx.s']
|
src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h743xx.s']
|
||||||
|
|
|
@ -98,9 +98,11 @@
|
||||||
#define RT_USING_SERIAL_V1
|
#define RT_USING_SERIAL_V1
|
||||||
#define RT_SERIAL_USING_DMA
|
#define RT_SERIAL_USING_DMA
|
||||||
#define RT_SERIAL_RB_BUFSZ 64
|
#define RT_SERIAL_RB_BUFSZ 64
|
||||||
|
#define RT_USING_HWTIMER
|
||||||
#define RT_USING_I2C
|
#define RT_USING_I2C
|
||||||
#define RT_USING_I2C_BITOPS
|
#define RT_USING_I2C_BITOPS
|
||||||
#define RT_USING_PIN
|
#define RT_USING_PIN
|
||||||
|
#define RT_USING_PWM
|
||||||
#define RT_USING_RTC
|
#define RT_USING_RTC
|
||||||
#define RT_USING_SDIO
|
#define RT_USING_SDIO
|
||||||
#define RT_SDIO_STACK_SIZE 512
|
#define RT_SDIO_STACK_SIZE 512
|
||||||
|
@ -255,5 +257,8 @@
|
||||||
|
|
||||||
#define BSP_I2C1_SCL_PIN 24
|
#define BSP_I2C1_SCL_PIN 24
|
||||||
#define BSP_I2C1_SDA_PIN 25
|
#define BSP_I2C1_SDA_PIN 25
|
||||||
|
#define BSP_USING_PWM
|
||||||
|
#define BSP_USING_PWM1
|
||||||
|
#define BSP_USING_PWM1_CH1
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue