Skip to content

Commit

Permalink
Merge pull request #18106 from benpicco/backport/2022.04/cpu/esp32/fi…
Browse files Browse the repository at this point in the history
…x_for_gcc_8.4.0

cpu/esp32: fixes for gcc 8.4.0 [backport 2022.04]
  • Loading branch information
benpicco authored May 17, 2022
2 parents 398e846 + 51cca2d commit 657adb1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cpu/esp32/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ifneq (,$(filter newlib,$(USEMODULE)))
DEFAULT_MODULE += newlib_nano
endif

ifneq (,$(filter libstdcpp,$(USEMODULE)))
ifneq (,$(filter cpp,$(USEMODULE)))
USEMODULE += pthread
endif

Expand Down
20 changes: 10 additions & 10 deletions cpu/esp32/vendor/esp-idf/ethernet/emac_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,54 +54,54 @@ void emac_enable_flowctrl(void);
void emac_disable_flowctrl(void);
void emac_mac_enable_txrx(void);

inline uint32_t emac_read_tx_cur_reg(void)
static inline uint32_t emac_read_tx_cur_reg(void)
{
return REG_READ(EMAC_DMATXCURRDESC_REG);
}

inline uint32_t emac_read_rx_cur_reg(void)
static inline uint32_t emac_read_rx_cur_reg(void)
{
return REG_READ(EMAC_DMARXCURRDESC_REG);
}

inline void emac_poll_tx_cmd(void)
static inline void emac_poll_tx_cmd(void)
{
//write any to wake up dma
REG_WRITE(EMAC_DMATXPOLLDEMAND_REG, 1);
}

inline void emac_poll_rx_cmd(void)
static inline void emac_poll_rx_cmd(void)
{
//write any to wake up dma
REG_WRITE(EMAC_DMARXPOLLDEMAND_REG, 1);
}

inline void emac_disable_rx_intr(void)
static inline void emac_disable_rx_intr(void)
{
REG_CLR_BIT(EMAC_DMAIN_EN_REG, EMAC_DMAIN_RIE);
}

inline void emac_enable_rx_intr(void)
static inline void emac_enable_rx_intr(void)
{
REG_SET_BIT(EMAC_DMAIN_EN_REG, EMAC_DMAIN_RIE);
}

inline void emac_disable_rx_unavail_intr(void)
static inline void emac_disable_rx_unavail_intr(void)
{
REG_CLR_BIT(EMAC_DMAIN_EN_REG, EMAC_DMAIN_RBUE);
}

inline void emac_enable_rx_unavail_intr(void)
static inline void emac_enable_rx_unavail_intr(void)
{
REG_SET_BIT(EMAC_DMAIN_EN_REG, EMAC_DMAIN_RBUE);
}

inline void IRAM_ATTR emac_send_pause_frame_enable(void)
static inline void IRAM_ATTR emac_send_pause_frame_enable(void)
{
REG_SET_BIT(EMAC_EX_PHYINF_CONF_REG, EMAC_EX_SBD_FLOWCTRL);
}

inline void emac_send_pause_zero_frame_enable(void)
static inline void emac_send_pause_zero_frame_enable(void)
{
REG_CLR_BIT(EMAC_EX_PHYINF_CONF_REG, EMAC_EX_SBD_FLOWCTRL);
}
Expand Down

0 comments on commit 657adb1

Please sign in to comment.