提交 | 用户 | age
|
483170
|
1 |
#ifndef _W5500_PORT_HAL_ |
Q |
2 |
#define _W5500_PORT_HAL_ |
|
3 |
|
|
4 |
#include "../src/ethernet/wizchip_conf.h" |
|
5 |
#include <string.h> |
|
6 |
#include <stdio.h> |
|
7 |
|
|
8 |
#define W5500_SPI_HANDLE SPI1 |
|
9 |
#define W5500_CS_PORT GPIOA |
|
10 |
#define W5500_CS_PIN GPIO_PIN_15 |
|
11 |
#define W5500_RST_PORT GPIOB |
|
12 |
#define W5500_RST_PIN GPIO_PIN_6 |
|
13 |
|
|
14 |
#define DEFAULT_MAC_ADDR {0x00,0xf1,0xbe,0xc4,0xa1,0x05} |
|
15 |
#define DEFAULT_IP_ADDR {192,168,1,135} |
|
16 |
#define DEFAULT_SUB_MASK {255,255,255,0} |
|
17 |
#define DEFAULT_GW_ADDR {192,168,1,2} |
|
18 |
#define DEFAULT_DNS_ADDR {8,8,8,8} |
|
19 |
|
|
20 |
/* 100M*/ |
|
21 |
#define USE_AUTONEGO |
|
22 |
|
|
23 |
//#define SOFT_SPI |
|
24 |
|
|
25 |
/* DHCP */ |
|
26 |
//#define USE_DHCP |
|
27 |
|
|
28 |
void w5500_network_info_show(void); |
|
29 |
int w5500_init(void); |
|
30 |
|
|
31 |
void EnterCS(void); |
|
32 |
void ExitCS(void); |
|
33 |
void SPI1_CS_Select(void); |
|
34 |
void SPI1_CS_Deselect(void); |
|
35 |
void SPI_Write_Byte(uint8_t byte); |
|
36 |
uint8_t SPI_Read_Byte(void); |
|
37 |
|
|
38 |
#endif |