add tos_slist.h, rename tos.h to tos_k.h

This commit is contained in:
daishengdong
2020-01-03 17:25:38 +08:00
parent af07f199d9
commit c9556307df
268 changed files with 900 additions and 742 deletions

View File

@@ -8,7 +8,7 @@
#include "stm32f7xx_hal.h"
#include "usart.h"
#include "gpio.h"
#include "tos.h"
#include "tos_k.h"
void board_init(void);
void SystemClock_Config(void);

View File

@@ -34,7 +34,7 @@
#include "stm32f7xx_hal.h"
#include "stm32f7xx.h"
#include "stm32f7xx_it.h"
#include "tos.h"
#include "tos_k.h"
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
@@ -42,7 +42,7 @@
/* External variables --------------------------------------------------------*/
/******************************************************************************/
/* Cortex-M7 Processor Interruption and Exception Handlers */
/* Cortex-M7 Processor Interruption and Exception Handlers */
/******************************************************************************/
/**

View File

@@ -1,4 +1,4 @@
#include "tos.h"
#include "tos_k.h"
#include "mcu_init.h"
#if TOS_CFG_PWR_MGR_EN > 0u

View File

@@ -1,4 +1,4 @@
#include "tos.h"
#include "tos_k.h"
#include "tickless/bsp_pm_device.h"
#include "tickless/bsp_tickless_alarm.h"

View File

@@ -1,4 +1,4 @@
#include "tos.h"
#include "tos_k.h"
#include "stm32f7xx_hal.h"
#include "stm32f7xx_hal_tim.h"
@@ -159,7 +159,7 @@ static HAL_StatusTypeDef tickless_rtc_time_set(uint8_t hour, uint8_t minu, uint8
rtc_time.TimeFormat = format;
rtc_time.DayLightSaving = RTC_DAYLIGHTSAVING_NONE;
rtc_time.StoreOperation = RTC_STOREOPERATION_RESET;
return HAL_RTC_SetTime(&rtc_handler, &rtc_time, RTC_FORMAT_BIN);
return HAL_RTC_SetTime(&rtc_handler, &rtc_time, RTC_FORMAT_BIN);
}
static HAL_StatusTypeDef tickless_rtc_date_set(uint8_t year, uint8_t month, uint8_t date, uint8_t week)
@@ -256,7 +256,7 @@ void HAL_RTC_MspInit(RTC_HandleTypeDef *rtc_handler)
void RTC_WKUP_IRQHandler(void)
{
HAL_RTCEx_WakeUpTimerIRQHandler(&rtc_handler);
HAL_RTCEx_WakeUpTimerIRQHandler(&rtc_handler);
}
void HAL_RTCEx_WakeUpTimerEventCallback(RTC_HandleTypeDef *rtc_handler)
@@ -333,11 +333,11 @@ static int tickless_rtc_alarmirq_wkup_alarm_setup(k_time_t millisecond)
// __HAL_PWR_GET_FLAG(PWR_FLAG_WU)
__HAL_RCC_AHB1_FORCE_RESET(); //<2F><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>IO<49><4F>
__HAL_RCC_AHB1_FORCE_RESET(); //<2F><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>IO<49><4F>
__HAL_RCC_PWR_CLK_ENABLE(); //ʹ<><CAB9>PWRʱ<52><CAB1>
// __HAL_RCC_BACKUPRESET_FORCE(); //<2F><>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
HAL_PWR_EnableBkUpAccess(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>
HAL_PWR_EnableBkUpAccess(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB);
__HAL_RTC_WRITEPROTECTION_DISABLE(&rtc_handler);//<2F>ر<EFBFBD>RTCд<43><D0B4><EFBFBD><EFBFBD>
@@ -351,7 +351,7 @@ static int tickless_rtc_alarmirq_wkup_alarm_setup(k_time_t millisecond)
//<2F><><EFBFBD><EFBFBD>RTC<54><43><EFBFBD><EFBFBD><EFBFBD>жϱ<D0B6>־λ
__HAL_RTC_ALARM_CLEAR_FLAG(&rtc_handler,RTC_FLAG_ALRAF|RTC_FLAG_ALRBF);
__HAL_RTC_TIMESTAMP_CLEAR_FLAG(&rtc_handler,RTC_FLAG_TSF);
__HAL_RTC_TIMESTAMP_CLEAR_FLAG(&rtc_handler,RTC_FLAG_TSF);
__HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&rtc_handler,RTC_FLAG_WUTF);
// __HAL_RCC_BACKUPRESET_RELEASE(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>