parent
f82705db1d
commit
9595df24f1
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
# files format check exclude path, please follow the instructions below to modify;
|
||||
# If you need to exclude an entire folder, add the folder path in dir_path;
|
||||
# If you need to exclude a file, add the path to the file in file_path.
|
||||
|
||||
dir_path:
|
||||
- N32G45x_Firmware_Library
|
|
@ -40,10 +40,10 @@ if GetDepend(['RT_USING_DAC']):
|
|||
if GetDepend(['RT_USING_CAN']):
|
||||
src += ['drv_can.c']
|
||||
|
||||
if GetDepend(['BSP_USING_RTC']):
|
||||
if GetDepend(['RT_USING_RTC']):
|
||||
src += ['drv_rtc.c']
|
||||
|
||||
if GetDepend(['BSP_USING_WDT']):
|
||||
if GetDepend(['RT_USING_WDT']):
|
||||
src += ['drv_wdt.c']
|
||||
|
||||
path = [cwd]
|
||||
|
|
|
@ -183,6 +183,6 @@ int rt_hw_adc_init(void)
|
|||
|
||||
INIT_DEVICE_EXPORT(rt_hw_adc_init);
|
||||
|
||||
#endif /* defined(BSP_USING_ADC1) || defined(BSP_USING_ADC2) || defined(BSP_USING_ADC3) || defined(BSP_USING_ADC4) */
|
||||
#endif /* defined(BSP_USING_ADC1) || defined(BSP_USING_ADC2) || defined(BSP_USING_ADC3) || defined(BSP_USING_ADC4) */
|
||||
#endif /* RT_USING_ADC */
|
||||
|
||||
|
|
|
@ -425,7 +425,7 @@ int rt_hw_i2c_init(void)
|
|||
{
|
||||
#ifdef RT_USING_I2C_BITOPS
|
||||
|
||||
rt_size_t obj_num = sizeof(i2c_obj) / sizeof(struct n32_i2c);
|
||||
rt_size_t obj_num = sizeof(i2c_obj) / sizeof(struct n32_i2c);
|
||||
rt_err_t result;
|
||||
|
||||
for(int i = 0; i < obj_num; i++)
|
||||
|
|
|
@ -42,7 +42,7 @@ uint32_t SynchPrediv, AsynchPrediv;
|
|||
|
||||
static rt_err_t n32_rtc_get_timeval(struct timeval *tv)
|
||||
{
|
||||
struct tm tm_new = {0};
|
||||
struct tm tm_new = {0};
|
||||
RTC_DateType RTC_DateStructure;
|
||||
RTC_TimeType RTC_TimeStructure;
|
||||
|
||||
|
@ -52,7 +52,7 @@ static rt_err_t n32_rtc_get_timeval(struct timeval *tv)
|
|||
tm_new.tm_sec = RTC_TimeStructure.Seconds;
|
||||
tm_new.tm_min = RTC_TimeStructure.Minutes;
|
||||
tm_new.tm_hour = RTC_TimeStructure.Hours;
|
||||
tm_new.tm_wday = RTC_DateStructure.WeekDay;
|
||||
tm_new.tm_wday = RTC_DateStructure.WeekDay;
|
||||
tm_new.tm_mday = RTC_DateStructure.Date;
|
||||
tm_new.tm_mon = RTC_DateStructure.Month - 1;
|
||||
tm_new.tm_year = RTC_DateStructure.Year + 100;
|
||||
|
@ -64,7 +64,7 @@ static rt_err_t n32_rtc_get_timeval(struct timeval *tv)
|
|||
|
||||
static rt_err_t set_rtc_time_stamp(time_t time_stamp)
|
||||
{
|
||||
struct tm time = {0};
|
||||
struct tm time = {0};
|
||||
RTC_DateType RTC_DateStructure={0};
|
||||
RTC_TimeType RTC_TimeStructure={0};
|
||||
|
||||
|
@ -94,7 +94,7 @@ static rt_err_t set_rtc_time_stamp(time_t time_stamp)
|
|||
|
||||
rt_kprintf("set rtc time.\n");
|
||||
|
||||
return RT_EOK;
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
static rt_err_t rt_rtc_config(void)
|
||||
|
|
|
@ -319,8 +319,8 @@ int rt_hw_spi_init(void)
|
|||
|
||||
result = rt_spi_bus_register(&spi_bus3, "spi3", &spi_ops);
|
||||
|
||||
/* Enable AFIO clock */
|
||||
RCC_EnableAPB2PeriphClk(RCC_APB2_PERIPH_AFIO, ENABLE);
|
||||
/* Enable AFIO clock */
|
||||
RCC_EnableAPB2PeriphClk(RCC_APB2_PERIPH_AFIO, ENABLE);
|
||||
|
||||
GPIO_ConfigPinRemap(GPIO_RMP_SW_JTAG_SW_ENABLE, ENABLE);
|
||||
RCC_EnableAPB1PeriphClk(RCC_APB1_PERIPH_SPI3, ENABLE);
|
||||
|
|
Loading…
Reference in New Issue