mirror of https://github.com/RT-Thread/rt-thread
[stm32][rt-spark] support nano version
This commit is contained in:
parent
975af5fd54
commit
0ad5c9585d
|
@ -8,11 +8,13 @@
|
||||||
* 2018-12-22 zylx first version
|
* 2018-12-22 zylx first version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "board.h"
|
#include <rtconfig.h>
|
||||||
|
#include <rtdef.h>
|
||||||
|
|
||||||
#ifdef BSP_USING_ON_CHIP_FLASH
|
#ifdef BSP_USING_ON_CHIP_FLASH
|
||||||
#include "drv_config.h"
|
#include "drv_config.h"
|
||||||
#include "drv_flash.h"
|
#include "drv_flash.h"
|
||||||
|
#include <board.h>
|
||||||
|
|
||||||
#if defined(RT_USING_FAL)
|
#if defined(RT_USING_FAL)
|
||||||
#include "fal.h"
|
#include "fal.h"
|
||||||
|
|
|
@ -10,11 +10,13 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "board.h"
|
#include <rtconfig.h>
|
||||||
|
#include <rtdef.h>
|
||||||
|
|
||||||
#ifdef BSP_USING_ON_CHIP_FLASH
|
#ifdef BSP_USING_ON_CHIP_FLASH
|
||||||
#include "drv_config.h"
|
#include "drv_config.h"
|
||||||
#include "drv_flash.h"
|
#include "drv_flash.h"
|
||||||
|
#include <board.h>
|
||||||
|
|
||||||
#if defined(RT_USING_FAL)
|
#if defined(RT_USING_FAL)
|
||||||
#include "fal.h"
|
#include "fal.h"
|
||||||
|
|
|
@ -8,11 +8,13 @@
|
||||||
* 2018-12-5 SummerGift first version
|
* 2018-12-5 SummerGift first version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "board.h"
|
#include <rtconfig.h>
|
||||||
|
#include <rtdef.h>
|
||||||
|
|
||||||
#ifdef BSP_USING_ON_CHIP_FLASH
|
#ifdef BSP_USING_ON_CHIP_FLASH
|
||||||
#include "drv_config.h"
|
#include "drv_config.h"
|
||||||
#include "drv_flash.h"
|
#include "drv_flash.h"
|
||||||
|
#include <board.h>
|
||||||
|
|
||||||
#if defined(RT_USING_FAL)
|
#if defined(RT_USING_FAL)
|
||||||
#include "fal.h"
|
#include "fal.h"
|
||||||
|
|
|
@ -8,11 +8,13 @@
|
||||||
* 2018-12-5 SummerGift first version
|
* 2018-12-5 SummerGift first version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "board.h"
|
#include <rtconfig.h>
|
||||||
|
#include <rtdef.h>
|
||||||
|
|
||||||
#ifdef BSP_USING_ON_CHIP_FLASH
|
#ifdef BSP_USING_ON_CHIP_FLASH
|
||||||
#include "drv_config.h"
|
#include "drv_config.h"
|
||||||
#include "drv_flash.h"
|
#include "drv_flash.h"
|
||||||
|
#include <board.h>
|
||||||
|
|
||||||
#if defined(RT_USING_FAL)
|
#if defined(RT_USING_FAL)
|
||||||
#include "fal.h"
|
#include "fal.h"
|
||||||
|
|
|
@ -11,11 +11,13 @@
|
||||||
* 2021-8-11 CX fix the sector calculation error bug
|
* 2021-8-11 CX fix the sector calculation error bug
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "board.h"
|
#include <rtconfig.h>
|
||||||
|
#include <rtdef.h>
|
||||||
|
|
||||||
#ifdef BSP_USING_ON_CHIP_FLASH
|
#ifdef BSP_USING_ON_CHIP_FLASH
|
||||||
#include "drv_config.h"
|
#include "drv_config.h"
|
||||||
#include "drv_flash.h"
|
#include "drv_flash.h"
|
||||||
|
#include <board.h>
|
||||||
|
|
||||||
#if defined(RT_USING_FAL)
|
#if defined(RT_USING_FAL)
|
||||||
#include "fal.h"
|
#include "fal.h"
|
||||||
|
|
|
@ -8,11 +8,13 @@
|
||||||
* 2020-06-27 NU-LL first version
|
* 2020-06-27 NU-LL first version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "board.h"
|
#include <rtconfig.h>
|
||||||
|
#include <rtdef.h>
|
||||||
|
|
||||||
#ifdef BSP_USING_ON_CHIP_FLASH
|
#ifdef BSP_USING_ON_CHIP_FLASH
|
||||||
#include "drv_config.h"
|
#include "drv_config.h"
|
||||||
#include "drv_flash.h"
|
#include "drv_flash.h"
|
||||||
|
#include <board.h>
|
||||||
|
|
||||||
#if defined(RT_USING_FAL)
|
#if defined(RT_USING_FAL)
|
||||||
#include "fal.h"
|
#include "fal.h"
|
||||||
|
|
|
@ -12,11 +12,13 @@
|
||||||
* 2021-3-3 zhuyf233 fix some bugs
|
* 2021-3-3 zhuyf233 fix some bugs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "board.h"
|
#include <rtconfig.h>
|
||||||
|
#include <rtdef.h>
|
||||||
|
|
||||||
#ifdef BSP_USING_ON_CHIP_FLASH
|
#ifdef BSP_USING_ON_CHIP_FLASH
|
||||||
#include "drv_config.h"
|
#include "drv_config.h"
|
||||||
#include "drv_flash.h"
|
#include "drv_flash.h"
|
||||||
|
#include <board.h>
|
||||||
|
|
||||||
#if defined(RT_USING_FAL)
|
#if defined(RT_USING_FAL)
|
||||||
#include "fal.h"
|
#include "fal.h"
|
||||||
|
|
|
@ -8,11 +8,13 @@
|
||||||
* 2018-12-5 SummerGift first version
|
* 2018-12-5 SummerGift first version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "board.h"
|
#include <rtconfig.h>
|
||||||
|
#include <rtdef.h>
|
||||||
|
|
||||||
#ifdef BSP_USING_ON_CHIP_FLASH
|
#ifdef BSP_USING_ON_CHIP_FLASH
|
||||||
#include "drv_config.h"
|
#include "drv_config.h"
|
||||||
#include "drv_flash.h"
|
#include "drv_flash.h"
|
||||||
|
#include <board.h>
|
||||||
|
|
||||||
#if defined(RT_USING_FAL)
|
#if defined(RT_USING_FAL)
|
||||||
#include "fal.h"
|
#include "fal.h"
|
||||||
|
|
|
@ -8,11 +8,13 @@
|
||||||
* 2020-10-14 Dozingfiretruck first version
|
* 2020-10-14 Dozingfiretruck first version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "board.h"
|
#include <rtconfig.h>
|
||||||
|
#include <rtdef.h>
|
||||||
|
|
||||||
#ifdef BSP_USING_ON_CHIP_FLASH
|
#ifdef BSP_USING_ON_CHIP_FLASH
|
||||||
#include "drv_config.h"
|
#include "drv_config.h"
|
||||||
#include "drv_flash.h"
|
#include "drv_flash.h"
|
||||||
|
#include <board.h>
|
||||||
|
|
||||||
#if defined(RT_USING_FAL)
|
#if defined(RT_USING_FAL)
|
||||||
#include "fal.h"
|
#include "fal.h"
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
CONFIG_RT_USING_NANO=y
|
|
@ -15,7 +15,21 @@ config PKGS_DIR
|
||||||
option env="PKGS_ROOT"
|
option env="PKGS_ROOT"
|
||||||
default "packages"
|
default "packages"
|
||||||
|
|
||||||
|
config SOC_STM32F407ZG
|
||||||
|
bool
|
||||||
|
select SOC_SERIES_STM32F4
|
||||||
|
select RT_USING_COMPONENTS_INIT
|
||||||
|
select RT_USING_USER_MAIN
|
||||||
|
default y
|
||||||
|
|
||||||
|
config BOARD_STM32F407_SPARK
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
|
||||||
source "$RTT_DIR/Kconfig"
|
source "$RTT_DIR/Kconfig"
|
||||||
source "../libraries/Kconfig"
|
|
||||||
source "board/Kconfig"
|
|
||||||
source "$PKGS_DIR/Kconfig"
|
source "$PKGS_DIR/Kconfig"
|
||||||
|
source "../libraries/Kconfig"
|
||||||
|
|
||||||
|
if !RT_USING_NANO
|
||||||
|
source "board/Kconfig"
|
||||||
|
endif
|
||||||
|
|
|
@ -6,12 +6,15 @@
|
||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2023-07-06 Supperthomas first version
|
* 2023-07-06 Supperthomas first version
|
||||||
|
* 2023-12-03 Meco Man support nano version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <rtthread.h>
|
|
||||||
#include <rtdevice.h>
|
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
|
#include <rtthread.h>
|
||||||
|
#include <drv_gpio.h>
|
||||||
|
#ifndef RT_USING_NANO
|
||||||
|
#include <rtdevice.h>
|
||||||
|
#endif /* RT_USING_NANO */
|
||||||
|
|
||||||
#define GPIO_LED_B GET_PIN(F, 11)
|
#define GPIO_LED_B GET_PIN(F, 11)
|
||||||
#define GPIO_LED_R GET_PIN(F, 12)
|
#define GPIO_LED_R GET_PIN(F, 12)
|
||||||
|
|
|
@ -1,16 +1,5 @@
|
||||||
menu "Hardware Drivers Config"
|
menu "Hardware Drivers Config"
|
||||||
|
|
||||||
config SOC_STM32F407ZG
|
|
||||||
bool
|
|
||||||
select SOC_SERIES_STM32F4
|
|
||||||
select RT_USING_COMPONENTS_INIT
|
|
||||||
select RT_USING_USER_MAIN
|
|
||||||
default y
|
|
||||||
|
|
||||||
config BOARD_STM32F407_SPARK
|
|
||||||
bool
|
|
||||||
default y
|
|
||||||
|
|
||||||
menu "Onboard Peripheral Drivers"
|
menu "Onboard Peripheral Drivers"
|
||||||
|
|
||||||
config BSP_USING_USB_TO_USART
|
config BSP_USING_USB_TO_USART
|
||||||
|
@ -31,7 +20,7 @@ menu "Onboard Peripheral Drivers"
|
||||||
select BSP_USING_UART
|
select BSP_USING_UART
|
||||||
select BSP_USING_UART3
|
select BSP_USING_UART3
|
||||||
default n
|
default n
|
||||||
|
|
||||||
menuconfig BSP_USING_RS485
|
menuconfig BSP_USING_RS485
|
||||||
bool "Enable RS485 (uart6)"
|
bool "Enable RS485 (uart6)"
|
||||||
select BSP_USING_UART
|
select BSP_USING_UART
|
||||||
|
@ -69,7 +58,7 @@ menu "Onboard Peripheral Drivers"
|
||||||
select BSP_USING_PWM14_CH1
|
select BSP_USING_PWM14_CH1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
config BSP_USING_ONBOARD_LED_MATRIX
|
config BSP_USING_ONBOARD_LED_MATRIX
|
||||||
bool "Enable Led MATRIX"
|
bool "Enable Led MATRIX"
|
||||||
default n
|
default n
|
||||||
select BSP_USING_PWM
|
select BSP_USING_PWM
|
||||||
|
@ -108,7 +97,7 @@ menu "Onboard Peripheral Drivers"
|
||||||
select BSP_USING_I2C1
|
select BSP_USING_I2C1
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config BSP_USING_ENC28j60
|
config BSP_USING_ENC28j60
|
||||||
bool "Enable Ethernet 28j60"
|
bool "Enable Ethernet 28j60"
|
||||||
default n
|
default n
|
||||||
select BSP_USING_SPI
|
select BSP_USING_SPI
|
||||||
|
@ -127,45 +116,45 @@ menu "Onboard Peripheral Drivers"
|
||||||
select BSP_USING_SDIO
|
select BSP_USING_SDIO
|
||||||
select RT_USING_DFS_ELMFAT
|
select RT_USING_DFS_ELMFAT
|
||||||
default n
|
default n
|
||||||
if BSP_USING_SDCARD_FATFS
|
if BSP_USING_SDCARD_FATFS
|
||||||
menuconfig BSP_USING_FS_AUTO_MOUNT
|
menuconfig BSP_USING_FS_AUTO_MOUNT
|
||||||
bool "Enable filesystem auto mount"
|
bool "Enable filesystem auto mount"
|
||||||
default y
|
default y
|
||||||
endif
|
endif
|
||||||
|
|
||||||
config BSP_USING_FLASH_FATFS
|
config BSP_USING_FLASH_FATFS
|
||||||
bool "Enable FAL filesystem partition base on W25Q64"
|
bool "Enable FAL filesystem partition base on W25Q64"
|
||||||
select BSP_USING_FAL
|
select BSP_USING_FAL
|
||||||
default n
|
default n
|
||||||
if BSP_USING_FLASH_FATFS
|
if BSP_USING_FLASH_FATFS
|
||||||
menuconfig BSP_USING_FLASH_FS_AUTO_MOUNT
|
menuconfig BSP_USING_FLASH_FS_AUTO_MOUNT
|
||||||
bool "Enable filesystem auto mount"
|
bool "Enable filesystem auto mount"
|
||||||
default y
|
default y
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
config BSP_USING_FAL
|
config BSP_USING_FAL
|
||||||
bool "Enable FAL (enable on-chip flash and spi2 flash)"
|
bool "Enable FAL (enable on-chip flash and spi2 flash)"
|
||||||
select BSP_USING_SPI_FLASH
|
select BSP_USING_SPI_FLASH
|
||||||
select RT_USING_FAL
|
select RT_USING_FAL
|
||||||
select FAL_DEBUG_CONFIG
|
select FAL_DEBUG_CONFIG
|
||||||
select FAL_PART_HAS_TABLE_CFG
|
select FAL_PART_HAS_TABLE_CFG
|
||||||
select FAL_USING_SFUD_PORT
|
select FAL_USING_SFUD_PORT
|
||||||
select BSP_USING_ON_CHIP_FLASH
|
select BSP_USING_ON_CHIP_FLASH
|
||||||
|
|
||||||
if BSP_USING_FAL
|
if BSP_USING_FAL
|
||||||
menuconfig BSP_USING_BOOTLOADER
|
menuconfig BSP_USING_BOOTLOADER
|
||||||
bool "Enable bootloader partition table"
|
bool "Enable bootloader partition table"
|
||||||
default n
|
default n
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
config BSP_USING_EASYFLASH
|
config BSP_USING_EASYFLASH
|
||||||
bool "Enable Easy Flash base on FAL"
|
bool "Enable Easy Flash base on FAL"
|
||||||
select BSP_USING_FAL
|
select BSP_USING_FAL
|
||||||
select PKG_USING_EASYFLASH
|
select PKG_USING_EASYFLASH
|
||||||
default n
|
default n
|
||||||
|
|
||||||
menuconfig BSP_USING_RW007_WLAN
|
menuconfig BSP_USING_RW007_WLAN
|
||||||
bool "Enable Rw007 Wlan Base on SPI2"
|
bool "Enable Rw007 Wlan Base on SPI2"
|
||||||
default n
|
default n
|
||||||
|
@ -192,9 +181,9 @@ menu "Onboard Peripheral Drivers"
|
||||||
int "RW007 RESET pin index"
|
int "RW007 RESET pin index"
|
||||||
default 111
|
default 111
|
||||||
endif
|
endif
|
||||||
|
|
||||||
config BSP_USING_AHT21
|
config BSP_USING_AHT21
|
||||||
bool "Enable AHT21(i2c3)"
|
bool "Enable AHT21(i2c3)"
|
||||||
select BSP_USING_I2C
|
select BSP_USING_I2C
|
||||||
select BSP_USING_I2C3
|
select BSP_USING_I2C3
|
||||||
select PKG_USING_SENSORS_DRIVERS
|
select PKG_USING_SENSORS_DRIVERS
|
||||||
|
@ -249,9 +238,9 @@ menu "Onboard Peripheral Drivers"
|
||||||
config BSP_USING_AUDIO_RECORD
|
config BSP_USING_AUDIO_RECORD
|
||||||
bool "Enable Audio Record"
|
bool "Enable Audio Record"
|
||||||
default n
|
default n
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "On-chip Peripheral Drivers"
|
menu "On-chip Peripheral Drivers"
|
||||||
|
@ -369,23 +358,6 @@ menu "On-chip Peripheral Drivers"
|
||||||
default n
|
default n
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_ONCHIP_RTC
|
|
||||||
bool "Enable RTC"
|
|
||||||
select RT_USING_RTC
|
|
||||||
default n
|
|
||||||
if BSP_USING_ONCHIP_RTC
|
|
||||||
choice
|
|
||||||
prompt "Select clock source"
|
|
||||||
default BSP_RTC_USING_LSE
|
|
||||||
|
|
||||||
config BSP_RTC_USING_LSE
|
|
||||||
bool "RTC USING LSE"
|
|
||||||
|
|
||||||
config BSP_RTC_USING_LSI
|
|
||||||
bool "RTC USING LSI"
|
|
||||||
endchoice
|
|
||||||
endif
|
|
||||||
|
|
||||||
menuconfig BSP_USING_PWM
|
menuconfig BSP_USING_PWM
|
||||||
bool "Enable PWM"
|
bool "Enable PWM"
|
||||||
default n
|
default n
|
||||||
|
@ -450,7 +422,7 @@ menu "On-chip Peripheral Drivers"
|
||||||
range 1 176
|
range 1 176
|
||||||
default 91
|
default 91
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_SOFT_SPI2
|
menuconfig BSP_USING_SOFT_SPI2
|
||||||
bool "Enable soft SPI2 BUS (software simulation)"
|
bool "Enable soft SPI2 BUS (software simulation)"
|
||||||
default n
|
default n
|
||||||
|
@ -553,7 +525,7 @@ menu "On-chip Peripheral Drivers"
|
||||||
range 0 143
|
range 0 143
|
||||||
default 80
|
default 80
|
||||||
endif
|
endif
|
||||||
|
|
||||||
menuconfig BSP_USING_I2C3
|
menuconfig BSP_USING_I2C3
|
||||||
bool "Enable I2C3 BUS for AHT21 Onboard(software simulation)"
|
bool "Enable I2C3 BUS for AHT21 Onboard(software simulation)"
|
||||||
default n
|
default n
|
||||||
|
@ -577,7 +549,7 @@ menu "On-chip Peripheral Drivers"
|
||||||
select RT_USING_PM
|
select RT_USING_PM
|
||||||
select RT_USING_HOOK
|
select RT_USING_HOOK
|
||||||
default n
|
default n
|
||||||
|
|
||||||
menuconfig BSP_USING_DAC
|
menuconfig BSP_USING_DAC
|
||||||
bool "Enable DAC"
|
bool "Enable DAC"
|
||||||
default n
|
default n
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
|
#include <drv_common.h>
|
||||||
|
|
||||||
void SystemClock_Config(void)
|
void SystemClock_Config(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,10 +12,7 @@
|
||||||
#ifndef __BOARD_H__
|
#ifndef __BOARD_H__
|
||||||
#define __BOARD_H__
|
#define __BOARD_H__
|
||||||
|
|
||||||
#include <rtthread.h>
|
|
||||||
#include <stm32f4xx.h>
|
#include <stm32f4xx.h>
|
||||||
#include "drv_common.h"
|
|
||||||
#include "drv_gpio.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
|
@ -8,10 +8,11 @@
|
||||||
* 2018-08-27 ZYLX the first version
|
* 2018-08-27 ZYLX the first version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <drivers/pin.h>
|
#include <rtdevice.h>
|
||||||
#include <enc28j60.h>
|
#include <enc28j60.h>
|
||||||
#include "drv_spi.h"
|
#include <drv_spi.h>
|
||||||
#include "board.h"
|
#include <drv_gpio.h>
|
||||||
|
#include <board.h>
|
||||||
|
|
||||||
#define PIN_NRF_IRQ GET_PIN(E,2)
|
#define PIN_NRF_IRQ GET_PIN(E,2)
|
||||||
#define PIN_SPI_CS GET_PIN(A,4)
|
#define PIN_SPI_CS GET_PIN(A,4)
|
||||||
|
|
|
@ -11,8 +11,9 @@
|
||||||
#ifndef _FAL_CFG_H_
|
#ifndef _FAL_CFG_H_
|
||||||
#define _FAL_CFG_H_
|
#define _FAL_CFG_H_
|
||||||
|
|
||||||
#include <rtthread.h>
|
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
|
#include <fal_def.h>
|
||||||
|
|
||||||
#define FLASH_SIZE_GRANULARITY_16K (4 * 16 * 1024)
|
#define FLASH_SIZE_GRANULARITY_16K (4 * 16 * 1024)
|
||||||
#define FLASH_SIZE_GRANULARITY_64K (8 * 64 * 1024)
|
#define FLASH_SIZE_GRANULARITY_64K (8 * 64 * 1024)
|
||||||
#define FLASH_SIZE_GRANULARITY_128K (8 * 128 * 1024)
|
#define FLASH_SIZE_GRANULARITY_128K (8 * 128 * 1024)
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
|
|
||||||
#include <rtdevice.h>
|
#include <rtdevice.h>
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
#include "string.h"
|
#include <string.h>
|
||||||
|
#include <drv_gpio.h>
|
||||||
#include "drv_lcd.h"
|
#include "drv_lcd.h"
|
||||||
#include "drv_lcd_font.h"
|
#include "drv_lcd_font.h"
|
||||||
|
|
||||||
|
|
|
@ -21,19 +21,21 @@
|
||||||
* - logic 1 is: 900ns(H) + 400ns(L)
|
* - logic 1 is: 900ns(H) + 400ns(L)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <rtdevice.h>
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
#include <drv_matrix_led.h>
|
#include <drv_matrix_led.h>
|
||||||
|
#include <drv_common.h>
|
||||||
|
#include <drv_gpio.h>
|
||||||
|
|
||||||
#ifndef LED_NUM
|
#ifndef LED_NUM
|
||||||
#define LED_NUM 19 // LED灯珠个数
|
#define LED_NUM 19 // LED灯珠个数
|
||||||
#endif
|
#endif
|
||||||
#define LED_MATRIX_EN_PIN GET_PIN(F, 2)
|
#define LED_MATRIX_EN_PIN GET_PIN(F, 2)
|
||||||
|
|
||||||
TIM_HandleTypeDef htim3;
|
TIM_HandleTypeDef htim3;
|
||||||
DMA_HandleTypeDef hdma_tim3_ch2;
|
DMA_HandleTypeDef hdma_tim3_ch2;
|
||||||
|
|
||||||
rt_align(4)
|
rt_align(RT_ALIGN_SIZE) uint8_t led_buffer[LED_NUM * 24 * 2];
|
||||||
uint8_t led_buffer[LED_NUM * 24 * 2];
|
|
||||||
|
|
||||||
extern void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
|
extern void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,9 @@
|
||||||
* 2023-05-05 yuanjie add test method
|
* 2023-05-05 yuanjie add test method
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <rtdevice.h>
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
|
#include <drv_gpio.h>
|
||||||
#include "drv_rs485.h"
|
#include "drv_rs485.h"
|
||||||
|
|
||||||
#ifdef BSP_USING_RS485
|
#ifdef BSP_USING_RS485
|
||||||
|
@ -134,4 +136,4 @@ void rs485_test(int argc, void **argv)
|
||||||
}
|
}
|
||||||
MSH_CMD_EXPORT(rs485_test, test rs485 transmission);
|
MSH_CMD_EXPORT(rs485_test, test rs485 transmission);
|
||||||
|
|
||||||
#endif /* bsp_using_RS485 */
|
#endif /* BSP_USING_RS485 */
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
#include "spi_flash.h"
|
#include "spi_flash.h"
|
||||||
#include "spi_flash_sfud.h"
|
#include "spi_flash_sfud.h"
|
||||||
#include "drv_spi.h"
|
#include <drv_spi.h>
|
||||||
#include "drv_soft_spi.h"
|
#include <drv_soft_spi.h>
|
||||||
|
|
||||||
#ifdef BSP_USING_SOFT_SPI_FLASH
|
#ifdef BSP_USING_SOFT_SPI_FLASH
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
#include "spi_flash.h"
|
#include "spi_flash.h"
|
||||||
#include "spi_flash_sfud.h"
|
#include "spi_flash_sfud.h"
|
||||||
#include "drv_spi.h"
|
#include <drv_spi.h>
|
||||||
|
#include <drv_gpio.h>
|
||||||
|
|
||||||
#if defined(BSP_USING_SPI_FLASH)
|
#if defined(BSP_USING_SPI_FLASH)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue