Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion L2_Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ target_include_directories(l2_core PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/hal/inc
${CMAKE_CURRENT_SOURCE_DIR}/port/inc
${CMAKE_CURRENT_SOURCE_DIR}/third_party/letter_shell/inc
${CMAKE_CURRENT_SOURCE_DIR}/third_party/lwprintf/include
${CMAKE_CURRENT_SOURCE_DIR}/third_party/lwprintf/inc
${CMAKE_CURRENT_SOURCE_DIR}/third_party/tlsf
)

Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/inc/ek_hal_adc.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef EK_HAL_ADC_H
#define EK_HAL_ADC_H

#include "../../utils/inc/ek_def.h"
#include "../../utils/inc/ek_list.h"
#include "ek_def.h"
#include "ek_list.h"

#ifdef __cplusplus
extern "C"
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/inc/ek_hal_dac.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef EK_HAL_DAC_H
#define EK_HAL_DAC_H

#include "../../utils/inc/ek_def.h"
#include "../../utils/inc/ek_list.h"
#include "ek_def.h"
#include "ek_list.h"

#ifdef __cplusplus
extern "C"
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/inc/ek_hal_dma.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef EK_HAL_DMA_H
#define EK_HAL_DMA_H

#include "../../utils/inc/ek_def.h"
#include "../../utils/inc/ek_list.h"
#include "ek_def.h"
#include "ek_list.h"

#ifdef __cplusplus
extern "C"
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/inc/ek_hal_dma2d.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef EK_HAL_DMA2D_H
#define EK_HAL_DMA2D_H

#include "../../utils/inc/ek_def.h"
#include "../../utils/inc/ek_list.h"
#include "ek_def.h"
#include "ek_list.h"

#ifdef __cplusplus
extern "C"
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/inc/ek_hal_gpio.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef EK_HAL_GPIO_H
#define EK_HAL_GPIO_H

#include "../../utils/inc/ek_def.h"
#include "../../utils/inc/ek_list.h"
#include "ek_def.h"
#include "ek_list.h"

#ifdef __cplusplus
extern "C"
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/inc/ek_hal_i2c.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef EK_HAL_I2C_H
#define EK_HAL_I2C_H

#include "../../utils/inc/ek_def.h"
#include "../../utils/inc/ek_list.h"
#include "ek_def.h"
#include "ek_list.h"

#ifdef __cplusplus
extern "C"
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/inc/ek_hal_ltdc.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef EK_HAL_LTDC_H
#define EK_HAL_LTDC_H

#include "../../utils/inc/ek_def.h"
#include "../../utils/inc/ek_list.h"
#include "ek_def.h"
#include "ek_list.h"

#ifdef __cplusplus
extern "C"
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/inc/ek_hal_pwm.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef EK_HAL_PWM_H
#define EK_HAL_PWM_H

#include "../../utils/inc/ek_def.h"
#include "../../utils/inc/ek_list.h"
#include "ek_def.h"
#include "ek_list.h"

#ifdef __cplusplus
extern "C"
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/inc/ek_hal_spi.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef EK_HAL_SPI_H
#define EK_HAL_SPI_H

#include "../../utils/inc/ek_def.h"
#include "../../utils/inc/ek_list.h"
#include "ek_def.h"
#include "ek_list.h"

#ifdef __cplusplus
extern "C"
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/inc/ek_hal_tick.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef EK_HAL_TICK_H
#define EK_HAL_TICK_H

#include "../../utils/inc/ek_def.h"
#include "../../utils/inc/ek_list.h"
#include "ek_def.h"
#include "ek_list.h"

#ifdef __cplusplus
extern "C"
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/inc/ek_hal_tim.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef EK_HAL_TIMER_H
#define EK_HAL_TIMER_H

#include "../../utils/inc/ek_def.h"
#include "../../utils/inc/ek_list.h"
#include "ek_def.h"
#include "ek_list.h"

#ifdef __cplusplus
extern "C"
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/inc/ek_hal_uart.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef EK_HAL_UART_H
#define EK_HAL_UART_H

#include "../../utils/inc/ek_def.h"
#include "../../utils/inc/ek_list.h"
#include "ek_def.h"
#include "ek_list.h"

#ifdef __cplusplus
extern "C"
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/src/ek_hal_adc.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../inc/ek_hal_adc.h"
#include "../../utils/inc/ek_assert.h"
#include "ek_hal_adc.h"
#include "ek_assert.h"

ek_list_node_t ek_hal_adc_head;
static bool _ek_init_flag = false;
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/src/ek_hal_dac.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../inc/ek_hal_dac.h"
#include "../../utils/inc/ek_assert.h"
#include "ek_hal_dac.h"
#include "ek_assert.h"

ek_list_node_t ek_hal_dac_head;
static bool _ek_init_flag = false;
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/src/ek_hal_dma.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../inc/ek_hal_dma.h"
#include "../../utils/inc/ek_assert.h"
#include "ek_hal_dma.h"
#include "ek_assert.h"

ek_list_node_t ek_hal_dma_head;
static bool _ek_init_flag = false;
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/src/ek_hal_dma2d.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../inc/ek_hal_dma2d.h"
#include "../../utils/inc/ek_assert.h"
#include "ek_hal_dma2d.h"
#include "ek_assert.h"

ek_list_node_t ek_hal_dma2d_head;
static bool _ek_init_flag = false;
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/src/ek_hal_gpio.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../inc/ek_hal_gpio.h"
#include "../../utils/inc/ek_assert.h"
#include "ek_hal_gpio.h"
#include "ek_assert.h"

ek_list_node_t ek_hal_gpio_head;
static bool _ek_init_flag = false;
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/src/ek_hal_i2c.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../inc/ek_hal_i2c.h"
#include "../../utils/inc/ek_assert.h"
#include "ek_hal_i2c.h"
#include "ek_assert.h"

ek_list_node_t ek_hal_i2c_head;
static bool _ek_init_flag = false;
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/src/ek_hal_ltdc.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../inc/ek_hal_ltdc.h"
#include "../../utils/inc/ek_assert.h"
#include "ek_hal_ltdc.h"
#include "ek_assert.h"

ek_list_node_t ek_hal_ltdc_head;
static bool _ek_init_flag = false;
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/src/ek_hal_pwm.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../inc/ek_hal_pwm.h"
#include "../../utils/inc/ek_assert.h"
#include "ek_hal_pwm.h"
#include "ek_assert.h"

ek_list_node_t ek_hal_pwm_head;
static bool _ek_init_flag = false;
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/src/ek_hal_spi.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../inc/ek_hal_spi.h"
#include "../../utils/inc/ek_assert.h"
#include "ek_hal_spi.h"
#include "ek_assert.h"

ek_list_node_t ek_hal_spi_head;
static bool _ek_init_flag = false;
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/src/ek_hal_tick.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../inc/ek_hal_tick.h"
#include "../../utils/inc/ek_assert.h"
#include "ek_hal_tick.h"
#include "ek_assert.h"

ek_list_node_t ek_hal_tick_head;
static bool _ek_init_flag = false;
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/src/ek_hal_tim.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../inc/ek_hal_tim.h"
#include "../../utils/inc/ek_assert.h"
#include "ek_hal_tim.h"
#include "ek_assert.h"

ek_list_node_t ek_hal_tim_head;
static bool _ek_init_flag = false;
Expand Down
4 changes: 2 additions & 2 deletions L2_Core/hal/src/ek_hal_uart.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../inc/ek_hal_uart.h"
#include "../../utils/inc/ek_assert.h"
#include "ek_hal_uart.h"
#include "ek_assert.h"

ek_list_node_t ek_hal_uart_head;
static bool _ek_init_flag = false;
Expand Down
6 changes: 3 additions & 3 deletions L2_Core/port/gd32f470zgt6/gd_adc_port.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "../../hal/inc/ek_hal_adc.h"
#include "../../utils/inc/ek_assert.h"
#include "../../utils/inc/ek_export.h"
#include "ek_hal_adc.h"
#include "ek_assert.h"
#include "ek_export.h"
#include "hal_adc.h"
#include "gd32f4xx_adc.h"

Expand Down
6 changes: 3 additions & 3 deletions L2_Core/port/gd32f470zgt6/gd_dac_port.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "../../hal/inc/ek_hal_dac.h"
#include "../../utils/inc/ek_assert.h"
#include "../../utils/inc/ek_export.h"
#include "ek_hal_dac.h"
#include "ek_assert.h"
#include "ek_export.h"
#include "gd32f4xx_dac.h"
#include "hal_dac.h"

Expand Down
6 changes: 3 additions & 3 deletions L2_Core/port/gd32f470zgt6/gd_dma_port.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "../../hal/inc/ek_hal_dma.h"
#include "../../utils/inc/ek_assert.h"
#include "../../utils/inc/ek_export.h"
#include "ek_hal_dma.h"
#include "ek_assert.h"
#include "ek_export.h"
#include "hal_dma.h"
#include "gd32f4xx_dma.h"

Expand Down
6 changes: 3 additions & 3 deletions L2_Core/port/gd32f470zgt6/gd_gpio_port.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "../../hal/inc/ek_hal_gpio.h"
#include "../../utils/inc/ek_assert.h"
#include "../../utils/inc/ek_export.h"
#include "ek_hal_gpio.h"
#include "ek_assert.h"
#include "ek_export.h"
#include "gd32f4xx_gpio.h"

// 具体设备的硬件信息
Expand Down
8 changes: 4 additions & 4 deletions L2_Core/port/gd32f470zgt6/gd_i2c_port.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "../../hal/inc/ek_hal_i2c.h"
#include "../../utils/inc/ek_assert.h"
#include "../../utils/inc/ek_export.h"
#include "ek_hal_i2c.h"
#include "ek_assert.h"
#include "ek_export.h"
#include "gd32f4xx_i2c.h"
#include "../../../L1_MCU/GD32F470ZGT6/Hal/Inc/hal_iic.h"
#include "hal_iic.h"

#define EK_HAL_LOCK_ON(x) ((x)->lock = true)
#define EK_HAL_LOCK_OFF(x) ((x)->lock = false)
Expand Down
6 changes: 3 additions & 3 deletions L2_Core/port/gd32f470zgt6/gd_ipa_port.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "../../hal/inc/ek_hal_dma2d.h"
#include "../../utils/inc/ek_assert.h"
#include "../../utils/inc/ek_export.h"
#include "ek_hal_dma2d.h"
#include "ek_assert.h"
#include "ek_export.h"
#include "hal_ipa.h"

// 硬件信息结构体
Expand Down
6 changes: 3 additions & 3 deletions L2_Core/port/gd32f470zgt6/gd_pwm_port.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "../../hal/inc/ek_hal_pwm.h"
#include "../../utils/inc/ek_assert.h"
#include "../../utils/inc/ek_export.h"
#include "ek_hal_pwm.h"
#include "ek_assert.h"
#include "ek_export.h"
#include "hal_pwm.h"
#include "gd32f4xx_timer.h"

Expand Down
6 changes: 3 additions & 3 deletions L2_Core/port/gd32f470zgt6/gd_spi_port.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "../../hal/inc/ek_hal_spi.h"
#include "../../utils/inc/ek_assert.h"
#include "../../utils/inc/ek_export.h"
#include "ek_hal_spi.h"
#include "ek_assert.h"
#include "ek_export.h"
#include "gd32f4xx_spi.h"

#define EK_HAL_LOCK_ON(x) ((x)->lock = true)
Expand Down
6 changes: 3 additions & 3 deletions L2_Core/port/gd32f470zgt6/gd_tick_port.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "../../hal/inc/ek_hal_tick.h"
#include "../../utils/inc/ek_assert.h"
#include "../../utils/inc/ek_export.h"
#include "ek_hal_tick.h"
#include "ek_assert.h"
#include "ek_export.h"
#include "bsp_timer.h"

// 外部 SysTick 变量(需要在 BSP 层定义)
Expand Down
6 changes: 3 additions & 3 deletions L2_Core/port/gd32f470zgt6/gd_tim_port.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "../../hal/inc/ek_hal_tim.h"
#include "../../utils/inc/ek_assert.h"
#include "../../utils/inc/ek_export.h"
#include "ek_hal_tim.h"
#include "ek_assert.h"
#include "ek_export.h"
#include "hal_tim.h"
#include "gd32f4xx_timer.h"

Expand Down
6 changes: 3 additions & 3 deletions L2_Core/port/gd32f470zgt6/gd_uart_port.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "../../hal/inc/ek_hal_uart.h"
#include "../../utils/inc/ek_assert.h"
#include "../../utils/inc/ek_export.h"
#include "ek_hal_uart.h"
#include "ek_assert.h"
#include "ek_export.h"
#include "hal_usart.h"

#define EK_HAL_LOCK_ON(x) ((x)->lock = true)
Expand Down
8 changes: 4 additions & 4 deletions L2_Core/port/stm32f429zi/st_dma2d_port.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "../../hal/inc/ek_hal_dma2d.h"
#include "../../utils/inc/ek_assert.h"
#include "../../utils/inc/ek_export.h"
#include "ek_hal_dma2d.h"
#include "ek_assert.h"
#include "ek_export.h"
#include "dma2d.h"

/* CubeMX 生成的 DMA2D 句柄 */
Expand Down Expand Up @@ -68,7 +68,7 @@ static ek_hal_dma2d_t drv_dma2d1;

__WEAK void ek_dma2d_transfer_cplt_callback(DMA2D_HandleTypeDef *hdma2d)
{
__UNUSED(hdma2d);
__EK_UNUSED(hdma2d);
Comment on lines 69 to +71

Copilot AI Mar 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This callback is still declared with __WEAK, but ek_def.h has migrated to __EK_WEAK and no longer defines __WEAK. Please switch this to __EK_WEAK (or include the header that defines __WEAK if you intend to depend on CMSIS) to avoid toolchain-dependent builds.

Copilot uses AI. Check for mistakes.
}

// 注册到 HAL
Expand Down
6 changes: 3 additions & 3 deletions L2_Core/port/stm32f429zi/st_gpio_port.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "../../hal/inc/ek_hal_gpio.h"
#include "../../utils/inc/ek_assert.h"
#include "../../utils/inc/ek_export.h"
#include "ek_hal_gpio.h"
#include "ek_assert.h"
#include "ek_export.h"
#include "gpio.h"

// 具体设备的硬件信息
Expand Down
6 changes: 3 additions & 3 deletions L2_Core/port/stm32f429zi/st_i2c_port.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "../../hal/inc/ek_hal_i2c.h"
#include "../../utils/inc/ek_assert.h"
#include "../../utils/inc/ek_export.h"
#include "ek_hal_i2c.h"
#include "ek_assert.h"
#include "ek_export.h"
#include "i2c.h"

#define EK_HAL_LOCK_ON(x) ((x)->lock = true)
Expand Down
6 changes: 3 additions & 3 deletions L2_Core/port/stm32f429zi/st_ltdc_port.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "../../hal/inc/ek_hal_ltdc.h"
#include "../../utils/inc/ek_assert.h"
#include "../../utils/inc/ek_export.h"
#include "ek_hal_ltdc.h"
#include "ek_assert.h"
#include "ek_export.h"
#include "ltdc.h"

// ops 实现
Expand Down
Loading
Loading