From a66354ed9b6628bb4cba044077b1546230001963 Mon Sep 17 00:00:00 2001 From: xushenghao Date: Mon, 20 Jan 2025 20:27:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9OS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/bsp.h | 4 ++-- freertos/inc/FreeRTOSConfig.h | 4 ++-- lib/inc/storage.h | 4 ++-- sys.h | 9 +++++++++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/bsp/bsp.h b/bsp/bsp.h index 4eebdfb..bbc7929 100644 --- a/bsp/bsp.h +++ b/bsp/bsp.h @@ -13,12 +13,12 @@ #define __BSP_H__ #include "gpios.h" -#include "dmas.h" +// #include "dmas.h" // #include "adcs.h" // #include "dacs.h" // #include "tims.h" // #include "pwms.h" -#include "uarts.h" +// #include "uarts.h" // #include "eeprom.h" // #include "spis.h" // #include "i2cs.h" diff --git a/freertos/inc/FreeRTOSConfig.h b/freertos/inc/FreeRTOSConfig.h index 4ea7a91..a6aaf66 100644 --- a/freertos/inc/FreeRTOSConfig.h +++ b/freertos/inc/FreeRTOSConfig.h @@ -26,7 +26,7 @@ #ifndef FREERTOS_CONFIG_H #define FREERTOS_CONFIG_H - +#include "main.h" /*----------------------------------------------------------- * Application specific definitions. * @@ -42,7 +42,7 @@ #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 -#define configCPU_CLOCK_HZ ((unsigned long)72000000) +#define configCPU_CLOCK_HZ ((unsigned long)SystemCoreClock) #define configTICK_RATE_HZ ((TickType_t)1000) #define configMAX_PRIORITIES (5) #define configMINIMAL_STACK_SIZE ((unsigned short)128) diff --git a/lib/inc/storage.h b/lib/inc/storage.h index ca50d28..1d53951 100644 --- a/lib/inc/storage.h +++ b/lib/inc/storage.h @@ -7,7 +7,7 @@ */ #ifndef __STORAGE_H__ #define __STORAGE_H__ - +#include "sys.h" #include "lib.h" typedef struct @@ -34,7 +34,7 @@ typedef struct BOOL(*read) (uint32_t addr, uint8_t *buf, uint16_t size); BOOL(*write) - (uint32_t addr, uint8_t * buf, uint16_t size); + (uint32_t addr, uint8_t *buf, uint16_t size); BOOL(*erase_page) (uint32_t page); } ops; diff --git a/sys.h b/sys.h index 2517e5b..a081f9f 100644 --- a/sys.h +++ b/sys.h @@ -18,6 +18,15 @@ #define LOCK() __disable_irq() ///< 系统关全局中断 #define UNLOCK() __enable_irq() ///< 系统开全局中断 +#ifndef __NOP + +/** + \brief No Operation + \details No Operation does nothing. This instruction can be used for code alignment purposes. + */ +#define __NOP() __ASM volatile("nop") +#endif + typedef struct { uint32_t pll_source;