Skip to content

Commit ad19787

Browse files
committed
main.c增加空行,将debug输出移动到board.h
1 parent b81dc4a commit ad19787

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

bsp/Vango_V85xx/applications/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ void assert_errhandler(uint8_t* file, uint32_t line)
5050
{
5151
}
5252
}
53-
#endif
53+
#endif

bsp/Vango_V85xx/drivers/board.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ extern int __bss_end;
3232
#define HEAP_BEGIN ((void *)&__bss_end)
3333
#endif
3434

35-
3635
#define HEAP_END V85XX_SRAM_END
3736

37+
/* #define DEBUG */
38+
#ifdef DEBUG
39+
#define DEBUG_PRINTF(...) rt_kprintf(__VA_ARGS__)
40+
#else
41+
#define DEBUG_PRINTF(...)
42+
#endif
43+
3844
#endif

bsp/Vango_V85xx/drivers/drv_spi.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@
2222
#error "Please define at least one SPIx"
2323
#endif
2424

25-
/* #define DEBUG */
26-
#ifdef DEBUG
27-
#define DEBUG_PRINTF(...) rt_kprintf(__VA_ARGS__)
28-
#else
29-
#define DEBUG_PRINTF(...)
30-
#endif
31-
3225
/* private rt-thread spi ops function */
3326
static rt_err_t configure(struct rt_spi_device* device, struct rt_spi_configuration* configuration);
3427
static rt_uint32_t xfer(struct rt_spi_device* device, struct rt_spi_message* message);
@@ -199,7 +192,7 @@ int v85xx_hw_spi_init(void)
199192

200193
result = rt_spi_bus_register(&spi_bus0, "spi1", &v85xx_spi_ops);
201194

202-
#endif
195+
#endif
203196

204197
#ifdef RT_USING_SPI2
205198
static struct rt_spi_bus spi_bus1;

0 commit comments

Comments
 (0)