85 lines
3.0 KiB
C
85 lines
3.0 KiB
C
/**
|
|
******************************************************************************
|
|
* @file stm32f4x7_eth_bsp.h
|
|
* @author MCD Application Team
|
|
* @version V1.1.0
|
|
* @date 31-July-2013
|
|
* @brief Header for stm32f4x7_eth_bsp.c file.
|
|
******************************************************************************
|
|
* @attention
|
|
*
|
|
* <h2><center>© COPYRIGHT 2013 STMicroelectronics</center></h2>
|
|
*
|
|
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
|
|
* You may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at:
|
|
*
|
|
* http://www.st.com/software_license_agreement_liberty_v2
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*
|
|
******************************************************************************
|
|
*/
|
|
|
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
|
#ifndef __STM32F4x7_ETH_BSP_H
|
|
#define __STM32F4x7_ETH_BSP_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* Includes ------------------------------------------------------------------*/
|
|
#if defined (USE_STM324xG_EVAL)
|
|
#include "stm324xg_eval.h"
|
|
#include "stm324xg_eval_lcd.h"
|
|
|
|
#elif defined (USE_STM324x7I_EVAL)
|
|
#include "stm324x7i_eval.h"
|
|
// #include "stm324x7i_eval_lcd.h"
|
|
|
|
#else
|
|
#define error "Please select first the Evaluation board used in your application (in Project Options)"
|
|
#endif
|
|
|
|
#include "lwip/netif.h"
|
|
|
|
/* Exported types ------------------------------------------------------------*/
|
|
/* Exported constants --------------------------------------------------------*/
|
|
#define DP83848_PHY_ADDRESS ((uint16_t) 0x01) /* Relative to STM324xG-EVAL Board */
|
|
|
|
/* Specific defines for EXTI line, used to manage Ethernet link status */
|
|
#define ETH_LINK_EXTI_LINE EXTI_Line14
|
|
#define ETH_LINK_EXTI_PORT_SOURCE EXTI_PortSourceGPIOB
|
|
#define ETH_LINK_EXTI_PIN_SOURCE EXTI_PinSource14
|
|
#define ETH_LINK_EXTI_IRQn EXTI15_10_IRQn
|
|
/* PB14 */
|
|
#define ETH_LINK_PIN GPIO_Pin_14
|
|
#define ETH_LINK_GPIO_PORT GPIOB
|
|
#define ETH_LINK_GPIO_CLK RCC_AHB1Periph_GPIOB
|
|
|
|
/* Ethernet Flags for EthStatus variable */
|
|
#define ETH_INIT_FLAG 0x01 /* Ethernet Init Flag */
|
|
#define ETH_LINK_FLAG 0x10 /* Ethernet Link Flag */
|
|
|
|
/* Exported macro ------------------------------------------------------------*/
|
|
/* Exported functions ------------------------------------------------------- */
|
|
void ETH_BSP_Config(void);
|
|
uint32_t Eth_Link_PHYITConfig(uint16_t PHYAddress);
|
|
void Eth_Link_EXTIConfig(void);
|
|
void Eth_Link_ITHandler(uint16_t PHYAddress);
|
|
void ETH_link_callback(struct netif *netif);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __STM32F4x7_ETH_BSP_H */
|
|
|
|
|
|
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|