comparison src/cs/drivers/drv_core/inth/niq32.c @ 183:9029c222c426

sync with Magnetite: DTR handling and pcmdata.c +CGxx defaults
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 19 Jan 2020 22:04:28 +0000
parents b6a5e36de839
children
comparison
equal deleted inserted replaced
182:5e1436690fe3 183:9029c222c426
28 28
29 #include "chipset.cfg" 29 #include "chipset.cfg"
30 #include "board.cfg" 30 #include "board.cfg"
31 #include "rf.cfg" 31 #include "rf.cfg"
32 #include "swconfig.cfg" 32 #include "swconfig.cfg"
33 #include "fc-target.h"
33 34
34 #if(OP_L1_STANDALONE == 0) 35 #if(OP_L1_STANDALONE == 0)
35 #include "debug.cfg" 36 #include "debug.cfg"
36 #include "rv/rv_defined_swe.h" 37 #include "rv/rv_defined_swe.h"
37 #include "rtc/board/rtc_config.h" 38 #include "rtc/board/rtc_config.h"
161 SER_uart_handler, /* AIRQ 7 */ 162 SER_uart_handler, /* AIRQ 7 */
162 #elif ((CHIPSET == 4) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11)) 163 #elif ((CHIPSET == 4) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11))
163 SER_uart_modem_handler, /* AIRQ 7 */ 164 SER_uart_modem_handler, /* AIRQ 7 */
164 #endif 165 #endif
165 #if ((BOARD == 8) || (BOARD == 9) || (BOARD == 40) || (BOARD == 41)) 166 #if ((BOARD == 8) || (BOARD == 9) || (BOARD == 40) || (BOARD == 41))
166 // CC test 0316
167 IQ_KeypadGPIOHandler, /* AIRQ 8 */ 167 IQ_KeypadGPIOHandler, /* AIRQ 8 */
168 // end
169 #else 168 #else
170 IQ_KeypadHandler, /* AIRQ 8 */ 169 IQ_KeypadHandler, /* AIRQ 8 */
171 #endif 170 #endif
172 IQ_Rtc_Handler, /* AIRQ 9 RTC Timer*/ 171 IQ_Rtc_Handler, /* AIRQ 9 RTC Timer*/
173 #if ((CHIPSET == 2) || (CHIPSET == 3)) 172 #if ((CHIPSET == 2) || (CHIPSET == 3))
537 /*--------------------------------------------------------------*/ 536 /*--------------------------------------------------------------*/
538 /* Parameters : none */ 537 /* Parameters : none */
539 /* Return : none */ 538 /* Return : none */
540 /* Functionality : Handle keypad and GPIO interrupts */ 539 /* Functionality : Handle keypad and GPIO interrupts */
541 /*--------------------------------------------------------------*/ 540 /*--------------------------------------------------------------*/
542 // CC test 0316
543 //#include "rvm/rvm_use_id_list.h"
544 //#include "rvf/rvf_api.h"
545 //static char debug_buffer[50];
546 // end
547 541
548 void IQ_KeypadGPIOHandler(void) 542 void IQ_KeypadGPIOHandler(void)
549 { 543 {
550 544
551 #if (OP_L1_STANDALONE == 0) 545 #if (OP_L1_STANDALONE == 0)
552 /* 546 /*
553 * GPIO interrupt must be checked before the keypad interrupt. The GPIO 547 * GPIO interrupt must be checked before the keypad interrupt. The GPIO
554 * status bit is reset when the register is read. 548 * status bit is reset when the register is read.
555 */ 549 */
556 550
557 if (AI_CheckITSource (ARMIO_GPIO_INT)) 551 if (AI_CheckITSource (ARMIO_GPIO_INT)) {
558
559 // CC test 0315
560 {
561 AI_MaskIT (ARMIO_MASKIT_GPIO);
562 //sprintf(debug_buffer, "GPIO_Interrupt");
563 //rvf_send_trace(debug_buffer, 40, NULL_PARAM, RV_TRACE_LEVEL_ERROR, RVT_USE_ID);
564 AI_UnmaskIT(ARMIO_MASKIT_GPIO); //0x0002
565 // end
566 /*
567 #ifdef RVM_MPM_SWE 552 #ifdef RVM_MPM_SWE
568 // check if the SWE has been started 553 // check if the SWE has been started
569 MPM_InterruptHandler (); 554 MPM_InterruptHandler ();
570 #elif BT_CLK_REQ_INT 555 #elif BT_CLK_REQ_INT
571
572 BT_DRV_ClkReqInterruptHandler( ); 556 BT_DRV_ClkReqInterruptHandler( );
557 #elif UARTFAX_CLASSIC_DTR_DCD
558 UAF_DTRInterruptHandler ();
573 #else 559 #else
574 UAF_DTRInterruptHandler (); 560 AI_MaskIT(ARMIO_MASKIT_GPIO);
561 AI_UnmaskIT(ARMIO_MASKIT_GPIO);
575 #endif 562 #endif
576 */ 563 }
577 }
578 if (AI_CheckITSource (ARMIO_KEYPDAD_INT)) 564 if (AI_CheckITSource (ARMIO_KEYPDAD_INT))
579 { 565 {
580 // CC test 0316
581 //sprintf(debug_buffer, "Key_Interrupt");
582 //rvf_send_trace(debug_buffer, 40, NULL_PARAM, RV_TRACE_LEVEL_ERROR, RVT_USE_ID);
583 // end
584 kpd_key_handler (); 566 kpd_key_handler ();
585 } 567 }
586
587 #endif 568 #endif
588 } 569 }
589 570
590 #elif ((BOARD == 34) || (BOARD == 42) || (BOARD == 43) || (BOARD == 45)) 571 #elif ((BOARD == 34) || (BOARD == 42) || (BOARD == 43) || (BOARD == 45))
591 572