[bsp][pico] remove meaningless dependencies of board.h

This commit is contained in:
Meco Man 2024-01-21 17:39:50 +08:00
parent b87b4cbde5
commit fa64b08064
5 changed files with 13 additions and 20 deletions

View File

@ -11,12 +11,13 @@
#include <rthw.h> #include <rthw.h>
#include <rtthread.h> #include <rtthread.h>
#include <stdio.h> #include <stdio.h>
#include "board.h" #include "board.h"
#include "hardware/structs/systick.h" #include <pico/bootrom.h>
#include "pico/bootrom.h" #include <pico/stdlib.h>
#include <hardware/clocks.h>
#include <hardware/structs/systick.h>
#include <drv_uart.h>
#define PLL_SYS_KHZ (133 * 1000) #define PLL_SYS_KHZ (133 * 1000)

View File

@ -11,12 +11,6 @@
#ifndef __BOARD_H__ #ifndef __BOARD_H__
#define __BOARD_H__ #define __BOARD_H__
#include "pico/stdlib.h"
#include "hardware/pll.h"
#include "hardware/clocks.h"
#include "hardware/structs/pll.h"
#include "hardware/structs/clocks.h"
#define PICO_SRAM_SIZE 256 #define PICO_SRAM_SIZE 256
#define PICO_SRAM_END (0x20000000 + PICO_SRAM_SIZE * 1024) #define PICO_SRAM_END (0x20000000 + PICO_SRAM_SIZE * 1024)
@ -24,6 +18,4 @@ extern int __bss_end__;
#define HEAP_BEGIN (&__bss_end__) #define HEAP_BEGIN (&__bss_end__)
#define HEAP_END ((void *)PICO_SRAM_END) #define HEAP_END ((void *)PICO_SRAM_END)
int rt_hw_uart_init(void);
#endif #endif

View File

@ -9,6 +9,8 @@
*/ */
#include "drv_gpio.h" #include "drv_gpio.h"
#include <hardware/gpio.h>
#include <hardware/platform_defs.h>
static void pico_pin_mode(struct rt_device *dev, rt_base_t pin, rt_uint8_t mode) static void pico_pin_mode(struct rt_device *dev, rt_base_t pin, rt_uint8_t mode)
{ {

View File

@ -8,11 +8,9 @@
* 2023-09-26 1ridic Integrate with RT-Thread driver framework. * 2023-09-26 1ridic Integrate with RT-Thread driver framework.
*/ */
#include <rthw.h>
#include <rtthread.h>
#include <rtdevice.h> #include <rtdevice.h>
#include "board.h" #include <drv_uart.h>
#include "drv_uart.h" #include <hardware/gpio.h>
#ifdef RT_USING_SERIAL #ifdef RT_USING_SERIAL

View File

@ -9,14 +9,14 @@
* 2023-09-26 1ridic Integrate with RT-Thread driver framework. * 2023-09-26 1ridic Integrate with RT-Thread driver framework.
*/ */
#ifndef __USART_H__ #ifndef __DRV_UART_H__
#define __USART_H__ #define __DRV_UART_H__
#include <rthw.h> #include <rthw.h>
#include <rtthread.h> #include <rtthread.h>
#ifdef RT_USING_SERIAL #ifdef RT_USING_SERIAL
int rt_hw_uart_init(void); int rt_hw_uart_init(void);
#endif #endif /* RT_USING_SERIAL */
#endif #endif /* __DRV_UART_H__ */