driver, ethernet: fix non-static inline functions

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81734
This commit is contained in:
Ivan Grokhotkov 2018-08-29 11:26:44 +08:00
parent fc0c110efd
commit 9ba5896d86
2 changed files with 11 additions and 11 deletions

View file

@ -88,7 +88,7 @@ static void fill_item_end(rmt_item32_t* item)
/**
* @brief Check whether duration is around target_us
*/
inline bool check_in_range(int duration_ticks, int target_us, int margin_us)
static inline bool check_in_range(int duration_ticks, int target_us, int margin_us)
{
if(( ITEM_DURATION(duration_ticks) < (target_us + margin_us))
&& ( ITEM_DURATION(duration_ticks) > (target_us - margin_us))) {

View file

@ -54,54 +54,54 @@ void emac_enable_flowctrl(void);
void emac_disable_flowctrl(void);
void emac_mac_enable_txrx(void);
uint32_t inline emac_read_tx_cur_reg(void)
static inline uint32_t emac_read_tx_cur_reg(void)
{
return REG_READ(EMAC_DMATXCURRDESC_REG);
}
uint32_t inline emac_read_rx_cur_reg(void)
static inline uint32_t emac_read_rx_cur_reg(void)
{
return REG_READ(EMAC_DMARXCURRDESC_REG);
}
void inline 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);
}
void inline 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);
}
void inline emac_disable_rx_intr(void)
static inline void emac_disable_rx_intr(void)
{
REG_CLR_BIT(EMAC_DMAIN_EN_REG, EMAC_DMAIN_RIE);
}
void inline emac_enable_rx_intr(void)
static inline void emac_enable_rx_intr(void)
{
REG_SET_BIT(EMAC_DMAIN_EN_REG, EMAC_DMAIN_RIE);
}
void inline 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);
}
void inline 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);
}
void IRAM_ATTR inline 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);
}
void inline 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);
}