mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/stm32/periph_eth: adapt to GPIO LL API change
This commit is contained in:
parent
84a4399135
commit
4a092862f8
@ -108,14 +108,14 @@ static ztimer_t _link_status_timer;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef STM32_ETH_TRACING_TX_PORT_NUM
|
||||
# if defined(LED1_PORT_NUM) || defined(DOXYGEN)
|
||||
#ifndef STM32_ETH_TRACING_TX_PORT
|
||||
# if defined(LED1_PORT) || defined(DOXYGEN)
|
||||
/**
|
||||
* @brief port to trace TX events
|
||||
*/
|
||||
# define STM32_ETH_TRACING_TX_PORT_NUM LED1_PORT_NUM
|
||||
# define STM32_ETH_TRACING_TX_PORT LED1_PORT
|
||||
# else
|
||||
# define STM32_ETH_TRACING_TX_PORT_NUM 0
|
||||
# define STM32_ETH_TRACING_TX_PORT GPIO_PORT_0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@ -130,14 +130,14 @@ static ztimer_t _link_status_timer;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef STM32_ETH_TRACING_RX_PORT_NUM
|
||||
# if defined(LED2_PORT_NUM) || defined(DOXYGEN)
|
||||
#ifndef STM32_ETH_TRACING_RX_PORT
|
||||
# if defined(LED2_PORT) || defined(DOXYGEN)
|
||||
/**
|
||||
* @brief port to trace RX events
|
||||
*/
|
||||
# define STM32_ETH_TRACING_RX_PORT_NUM LED2_PORT_NUM
|
||||
# define STM32_ETH_TRACING_RX_PORT LED2_PORT
|
||||
# else
|
||||
# define STM32_ETH_TRACING_RX_PORT_NUM 0
|
||||
# define STM32_ETH_TRACING_RX_PORT GPIO_PORT_0
|
||||
# endif
|
||||
#endif
|
||||
/** @} */
|
||||
@ -480,10 +480,10 @@ static int stm32_eth_init(netdev_t *netdev)
|
||||
{
|
||||
(void)netdev;
|
||||
if (IS_USED(MODULE_STM32_ETH_TRACING)) {
|
||||
gpio_ll_init(GPIO_PORT(STM32_ETH_TRACING_TX_PORT_NUM),
|
||||
gpio_ll_init(STM32_ETH_TRACING_TX_PORT,
|
||||
STM32_ETH_TRACING_TX_PIN_NUM,
|
||||
gpio_ll_out);
|
||||
gpio_ll_init(GPIO_PORT(STM32_ETH_TRACING_RX_PORT_NUM),
|
||||
gpio_ll_init(STM32_ETH_TRACING_RX_PORT,
|
||||
STM32_ETH_TRACING_RX_PIN_NUM,
|
||||
gpio_ll_out);
|
||||
}
|
||||
@ -578,7 +578,7 @@ static int stm32_eth_send(netdev_t *netdev, const struct iolist *iolist)
|
||||
}
|
||||
|
||||
if (IS_USED(MODULE_STM32_ETH_TRACING)) {
|
||||
gpio_ll_set(GPIO_PORT(STM32_ETH_TRACING_TX_PORT_NUM),
|
||||
gpio_ll_set(STM32_ETH_TRACING_TX_PORT,
|
||||
(1U << STM32_ETH_TRACING_TX_PIN_NUM));
|
||||
}
|
||||
/* start TX */
|
||||
@ -595,7 +595,7 @@ static int stm32_eth_confirm_send(netdev_t *netdev, void *info)
|
||||
(void)info;
|
||||
(void)netdev;
|
||||
if (IS_USED(MODULE_STM32_ETH_TRACING)) {
|
||||
gpio_ll_clear(GPIO_PORT(STM32_ETH_TRACING_TX_PORT_NUM),
|
||||
gpio_ll_clear(STM32_ETH_TRACING_TX_PORT,
|
||||
(1U << STM32_ETH_TRACING_TX_PIN_NUM));
|
||||
}
|
||||
DEBUG("[stm32_eth] TX completed\n");
|
||||
@ -768,7 +768,7 @@ static int stm32_eth_recv(netdev_t *netdev, void *_buf, size_t max_len,
|
||||
}
|
||||
|
||||
if (IS_USED(MODULE_STM32_ETH_TRACING)) {
|
||||
gpio_ll_clear(GPIO_PORT(STM32_ETH_TRACING_RX_PORT_NUM),
|
||||
gpio_ll_clear(STM32_ETH_TRACING_RX_PORT,
|
||||
(1U << STM32_ETH_TRACING_RX_PIN_NUM));
|
||||
}
|
||||
|
||||
@ -806,7 +806,7 @@ static void stm32_eth_isr(netdev_t *netdev)
|
||||
}
|
||||
|
||||
if (IS_USED(MODULE_STM32_ETH_TRACING)) {
|
||||
gpio_ll_set(GPIO_PORT(STM32_ETH_TRACING_RX_PORT_NUM),
|
||||
gpio_ll_set(STM32_ETH_TRACING_RX_PORT,
|
||||
(1U << STM32_ETH_TRACING_RX_PIN_NUM));
|
||||
}
|
||||
netdev->event_callback(netdev, NETDEV_EVENT_RX_COMPLETE);
|
||||
|
@ -52,14 +52,14 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef STM32_ETH_TRACING_IRQ_PORT_NUM
|
||||
#ifndef STM32_ETH_TRACING_IRQ_PORT
|
||||
# if defined(LED0_PORT_NUM) || defined(DOXYGEN)
|
||||
/**
|
||||
* @brief port to trace IRQs
|
||||
*/
|
||||
# define STM32_ETH_TRACING_IRQ_PORT_NUM LED0_PORT_NUM
|
||||
# define STM32_ETH_TRACING_IRQ_PORT LED0_PORT
|
||||
# else
|
||||
# define STM32_ETH_TRACING_IRQ_PORT_NUM 0
|
||||
# define STM32_ETH_TRACING_IRQ_PORT GPIO_PORT_0
|
||||
# endif
|
||||
#endif
|
||||
/** @} */
|
||||
@ -93,7 +93,7 @@ void stm32_eth_common_init(void)
|
||||
while (ETH->DMABMR & ETH_DMABMR_SR) {}
|
||||
|
||||
if (IS_USED(MODULE_STM32_ETH_TRACING)) {
|
||||
gpio_ll_init(GPIO_PORT(STM32_ETH_TRACING_IRQ_PORT_NUM),
|
||||
gpio_ll_init(STM32_ETH_TRACING_IRQ_PORT,
|
||||
STM32_ETH_TRACING_IRQ_PIN_NUM,
|
||||
gpio_ll_out);
|
||||
}
|
||||
@ -108,7 +108,7 @@ void isr_eth(void)
|
||||
{
|
||||
DEBUG("[periph_eth_common] isr_eth()\n");
|
||||
if (IS_USED(MODULE_STM32_ETH_TRACING)) {
|
||||
gpio_ll_toggle(GPIO_PORT(STM32_ETH_TRACING_IRQ_PORT_NUM),
|
||||
gpio_ll_toggle(STM32_ETH_TRACING_IRQ_PORT,
|
||||
(1U << STM32_ETH_TRACING_IRQ_PIN_NUM));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user