Skip to content

Commit a7babad

Browse files
authored
Merge pull request #2241 from Bluebear233/nuvoton_m487
[bsp][nuvoton_m487]Add EMAC drive
2 parents 0889baf + 6802bb1 commit a7babad

File tree

8 files changed

+878
-34
lines changed

8 files changed

+878
-34
lines changed

bsp/nuvoton_m487/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
| 驱动 | 支持情况 | 备注 |
4343
| ------ | ---- | :------: |
4444
| UART | 支持 | UART0|
45+
| EMAC | 支持 | EH0|
4546

4647
### 4.1 IO在板级支持包中的映射情况
4748

bsp/nuvoton_m487/driver/SConscript

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
# RT-Thread building script for component
1+
# RT-Thread building script for component
22

33
from building import *
44

55
cwd = GetCurrentDir()
66
src = Split('''
77
board.c
88
drv_uart.c
9+
drv_emac.c
910
''')
1011
CPPPATH = [cwd]
1112

bsp/nuvoton_m487/driver/board.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
* 2018-11-16 bluebear233 first version
99
*/
1010

11-
#include <rtconfig.h>
1211
#include <rtthread.h>
13-
#include <rthw.h>
1412
#include "NuMicro.h"
1513
#include "drv_uart.h"
1614
#include "board.h"

bsp/nuvoton_m487/driver/board.h

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,7 @@
1515
#define SRAM_SIZE (160)
1616
#define SRAM_END (0x20000000 + SRAM_SIZE * 1024)
1717

18-
#define RT_UART_485_MODE 1
19-
#define RT_UART_FLOW_CTS_CTRL 2
20-
#define RT_UART_FLOW_RTS_CTRL 3
21-
#define RT_UART_CLEAR_BUF 4
22-
23-
void rt_hw_pdma_init(void);
24-
void rt_hw_uart_handle(void);
25-
void rt_hw_sc_init(void);
26-
void rt_hw_usart_init(void);
27-
void rt_hw_uusart_init(void);
28-
void rt_hw_io_init(void);
29-
void phy_error_led(void);
30-
31-
unsigned char *eth_get_default_mac(void);
32-
void eth_set_mac(const unsigned char * mac);
33-
void wdt_reload(void);
34-
unsigned int get_uid(void);
18+
void rt_hw_board_init(void);
19+
void rt_hw_cpu_reset(void);
3520

3621
#endif /* BOARD_H_ */

0 commit comments

Comments
 (0)