• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 Talkweb Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *    http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef __ETHERNETIF_H__
17 #define __ETHERNETIF_H__
18 
19 #include <string.h>
20 #include "cmsis_os2.h"
21 #include "lwip/err.h"
22 #include "lwip/netif.h"
23 #include "lwip/timeouts.h"
24 #include "netif/etharp.h"
25 #include "stm32f407xx.h"
26 #include "stm32f4xx_hal.h"
27 #include "stm32f4xx_hal_eth.h"
28 
29 #define ETH_DEBUG(format, ...) printf("[%s] "format"", __FUNCTION__, ##__VA_ARGS__)
30 
31 extern struct netif gNetif;
32 extern ETH_HandleTypeDef gEthHandle;
33 
34 err_t ethernetif_init(struct netif *netif);
35 void ethernetif_input(void const *argument);
36 struct pbuf *low_level_input(struct netif *netif);
37 void USER_IRQHandler(void);
38 void getmac(uint8_t *pMacBuf);
39 
40 #endif
41