1 /* 2 * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development 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 ETHERNET_H_ 17 #define ETHERNET_H_ 18 #include <string.h> 19 #include "gd32f4xx_enet.h" 20 #include "cmsis_os2.h" 21 22 /* ENET RxDMA/TxDMA descriptor */ 23 extern enet_descriptors_struct rxdesc_tab[ENET_RXBUF_NUM], txdesc_tab[ENET_TXBUF_NUM]; 24 25 /* ENET receive buffer */ 26 extern uint8_t rx_buff[ENET_RXBUF_NUM][ENET_RXBUF_SIZE]; 27 28 /* ENET transmit buffer */ 29 extern uint8_t tx_buff[ENET_TXBUF_NUM][ENET_TXBUF_SIZE]; 30 31 /* global transmit and receive descriptors pointers */ 32 extern enet_descriptors_struct *dma_current_txdesc; 33 extern enet_descriptors_struct *dma_current_rxdesc; 34 extern void ENET_IRQHandler_CB(void); 35 #endif