void m_rdy_line_handle(void) { hal_aci_data_t *p_aci_data; if (true == a_pins_local_ptr->interface_is_interrupt) { detachInterrupt(a_pins_local_ptr->interrupt_number); } // Receive or transmit data p_aci_data = hal_aci_tl_poll_get(); // Check if we received data if (p_aci_data->buffer[0] > 0) { if (!m_aci_q_enqueue(&aci_rx_q, p_aci_data)) { /* Receive Buffer full. Should never happen. Spin in a while loop. */ while(1); } if (m_aci_q_is_full(&aci_rx_q)) { /* Disable RDY line interrupt. Will latch any pending RDY lines, so when enabled it again this routine should be taken again */ if (true == a_pins_local_ptr->interface_is_interrupt) { //EIMSK &= ~(0x2); //AVR Specific - PIC32,DUE,STM32 todo } } } }
void m_rdy_line_handle(void) { hal_aci_data_t *p_aci_data; sleep_disable(); detachInterrupt(1); // Receive or transmit data p_aci_data = hal_aci_tl_poll_get(); // Check if we received data if (p_aci_data->buffer[0] > 0) { if (!m_aci_q_enqueue(&aci_rx_q, p_aci_data)) { /* Receive Buffer full. Should never happen. Spin in a while loop. */ while(1); } if (m_aci_q_is_full(&aci_rx_q)) { /* Disable RDY line interrupt. Will latch any pending RDY lines, so when enabled it again this routine should be taken again */ toggle_eimsk(false); } } }