mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-19 07:13:30 +08:00
fix: fix wrong define and warning
This commit is contained in:
parent
d9ca4e85f6
commit
d6b05287bb
@ -12,13 +12,13 @@ src = Split("""
|
|||||||
src += ['drv_common.c']
|
src += ['drv_common.c']
|
||||||
src += ['drv_clk.c']
|
src += ['drv_clk.c']
|
||||||
|
|
||||||
if GetDepend(['RT_USING_PIN']):
|
if GetDepend(['BSP_USING_GPIO']):
|
||||||
src += ['drv_gpio.c']
|
src += ['drv_gpio.c']
|
||||||
|
|
||||||
if GetDepend(['RT_USING_WDT']):
|
if GetDepend(['BSP_USING_UART']):
|
||||||
src += ['drv_wdt.c']
|
src += ['drv_wdt.c']
|
||||||
|
|
||||||
if GetDepend(['RT_USING_SERIAL']):
|
if GetDepend(['BSP_USING_UART']):
|
||||||
src += ['drv_usart.c']
|
src += ['drv_usart.c']
|
||||||
|
|
||||||
if GetDepend(['BSP_USING_PWM']):
|
if GetDepend(['BSP_USING_PWM']):
|
||||||
|
@ -31,6 +31,7 @@ CONFIG_RT_TIMER_THREAD_STACK_SIZE=512
|
|||||||
# CONFIG_RT_KSERVICE_USING_STDLIB is not set
|
# CONFIG_RT_KSERVICE_USING_STDLIB is not set
|
||||||
# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set
|
# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set
|
||||||
# CONFIG_RT_USING_ASM_MEMCPY is not set
|
# CONFIG_RT_USING_ASM_MEMCPY is not set
|
||||||
|
# CONFIG_RT_USING_TINY_FFS is not set
|
||||||
CONFIG_RT_DEBUG=y
|
CONFIG_RT_DEBUG=y
|
||||||
# CONFIG_RT_DEBUG_COLOR is not set
|
# CONFIG_RT_DEBUG_COLOR is not set
|
||||||
# CONFIG_RT_DEBUG_INIT_CONFIG is not set
|
# CONFIG_RT_DEBUG_INIT_CONFIG is not set
|
||||||
@ -134,7 +135,7 @@ CONFIG_RT_SERIAL_RB_BUFSZ=64
|
|||||||
# CONFIG_RT_USING_I2C is not set
|
# CONFIG_RT_USING_I2C is not set
|
||||||
# CONFIG_RT_USING_PHY is not set
|
# CONFIG_RT_USING_PHY is not set
|
||||||
CONFIG_RT_USING_PIN=y
|
CONFIG_RT_USING_PIN=y
|
||||||
# CONFIG_RT_USING_ADC is not set
|
CONFIG_RT_USING_ADC=y
|
||||||
# CONFIG_RT_USING_DAC is not set
|
# CONFIG_RT_USING_DAC is not set
|
||||||
CONFIG_RT_USING_PWM=y
|
CONFIG_RT_USING_PWM=y
|
||||||
# CONFIG_RT_USING_MTD_NOR is not set
|
# CONFIG_RT_USING_MTD_NOR is not set
|
||||||
@ -167,6 +168,7 @@ CONFIG_RT_LIBC_USING_TIME=y
|
|||||||
# CONFIG_RT_LIBC_USING_FILEIO is not set
|
# CONFIG_RT_LIBC_USING_FILEIO is not set
|
||||||
# CONFIG_RT_USING_MODULE is not set
|
# CONFIG_RT_USING_MODULE is not set
|
||||||
CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
|
CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
|
||||||
|
# CONFIG_RT_USING_POSIX is not set
|
||||||
# CONFIG_RT_USING_PTHREADS is not set
|
# CONFIG_RT_USING_PTHREADS is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -580,14 +582,14 @@ CONFIG_SOC_N32G452XX=y
|
|||||||
#
|
#
|
||||||
# Onboard Peripheral Drivers
|
# Onboard Peripheral Drivers
|
||||||
#
|
#
|
||||||
|
CONFIG_BSP_USING_UART=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# On-chip Peripheral Drivers
|
# On-chip Peripheral Drivers
|
||||||
#
|
#
|
||||||
CONFIG_RT_USING_GPIO=y
|
CONFIG_BSP_USING_GPIO=y
|
||||||
# CONFIG_BSP_USING_ON_CHIP_FLASH is not set
|
# CONFIG_BSP_USING_ON_CHIP_FLASH is not set
|
||||||
# CONFIG_BSP_USING_WDT is not set
|
# CONFIG_BSP_USING_WDT is not set
|
||||||
CONFIG_BSP_USING_UART=y
|
|
||||||
CONFIG_BSP_USING_UART1=y
|
CONFIG_BSP_USING_UART1=y
|
||||||
# CONFIG_BSP_USING_UART2 is not set
|
# CONFIG_BSP_USING_UART2 is not set
|
||||||
# CONFIG_BSP_USING_UART3 is not set
|
# CONFIG_BSP_USING_UART3 is not set
|
||||||
|
@ -9,9 +9,9 @@ config SOC_N32G452XX
|
|||||||
|
|
||||||
menu "Onboard Peripheral Drivers"
|
menu "Onboard Peripheral Drivers"
|
||||||
|
|
||||||
config RT_USING_SERIAL
|
config BSP_USING_UART
|
||||||
bool "Enable USART (uart1)"
|
bool "Enable USART (uart1)"
|
||||||
select BSP_USING_UART
|
select RT_USING_SERIAL
|
||||||
select BSP_USING_UART1
|
select BSP_USING_UART1
|
||||||
default y
|
default y
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ endmenu
|
|||||||
|
|
||||||
menu "On-chip Peripheral Drivers"
|
menu "On-chip Peripheral Drivers"
|
||||||
|
|
||||||
config RT_USING_GPIO
|
config BSP_USING_GPIO
|
||||||
bool "Enable GPIO"
|
bool "Enable GPIO"
|
||||||
select RT_USING_PIN
|
select RT_USING_PIN
|
||||||
default y
|
default y
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
* 2021-08-20 breo.com first version
|
* 2021-08-20 breo.com first version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
#include <rtdevice.h>
|
#include <rtdevice.h>
|
||||||
#include "n32g45x.h"
|
#include "n32g45x.h"
|
||||||
@ -383,7 +384,7 @@ static void uart_test(void)
|
|||||||
static rt_device_t u2 = NULL;
|
static rt_device_t u2 = NULL;
|
||||||
uart_test_rw(u2, "uart2");
|
uart_test_rw(u2, "uart2");
|
||||||
#endif
|
#endif
|
||||||
#ifdef BSP_USING_UART2
|
#ifdef BSP_USING_UART3
|
||||||
static rt_device_t u3 = NULL;
|
static rt_device_t u3 = NULL;
|
||||||
uart_test_rw(u3, "uart3");
|
uart_test_rw(u3, "uart3");
|
||||||
#endif
|
#endif
|
||||||
|
@ -84,6 +84,7 @@
|
|||||||
#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_PIN
|
#define RT_USING_PIN
|
||||||
|
#define RT_USING_ADC
|
||||||
#define RT_USING_PWM
|
#define RT_USING_PWM
|
||||||
#define RT_USING_WDT
|
#define RT_USING_WDT
|
||||||
|
|
||||||
@ -175,10 +176,11 @@
|
|||||||
|
|
||||||
/* Onboard Peripheral Drivers */
|
/* Onboard Peripheral Drivers */
|
||||||
|
|
||||||
|
#define BSP_USING_UART
|
||||||
|
|
||||||
/* On-chip Peripheral Drivers */
|
/* On-chip Peripheral Drivers */
|
||||||
|
|
||||||
#define RT_USING_GPIO
|
#define BSP_USING_GPIO
|
||||||
#define BSP_USING_UART
|
|
||||||
#define BSP_USING_UART1
|
#define BSP_USING_UART1
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user