/* Callback for notifying upper layer of a HW error that occured.  */
static __INLINE void callback_hw_error(uint32_t error_src)
/* Callback for notifying upper layer of a HW error that occured.  */
static __INLINE void callback_hw_error(uint32_t error_src)
{
    mp_rx_stream                = NULL;
    m_rx_stream_length          = 0;
    m_rx_stream_index           = 0;
    m_ser_phy_rx_event.evt_type = SER_PHY_EVT_HW_ERROR;
    m_ser_phy_rx_event.evt_params.hw_error.error_code = error_src;
    callback_ser_phy_event(m_ser_phy_rx_event);
}