Changeset 7b93d857 in rtems
- Timestamp:
- 09/12/18 08:08:50 (6 years ago)
- Branches:
- 5, master
- Children:
- 53fb03fe
- Parents:
- 94ea8a8
- git-author:
- Sebastian Huber <sebastian.huber@…> (09/12/18 08:08:50)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (09/17/18 06:56:32)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
bsps/powerpc/tqm8xx/console/console.c
r94ea8a8 r7b93d857 58 58 #include <rtems/bspIo.h> 59 59 #include <rtems/error.h> 60 #include <rtems/irq.h>61 60 62 61 #include <bsp.h> … … 121 120 volatile m8xxSMCRegisters_t *smcr; 122 121 } regs; 123 intivec_src;122 rtems_vector_number ivec_src; 124 123 int cr_chan_code; 125 124 int brg_used; … … 498 497 499 498 static void 500 mpc8xx_console_irq_on(const rtems_irq_connect_data *irq) 501 { 502 CHN_MASK_SET(irq->name - BSP_CPM_IRQ_LOWEST_OFFSET, 503 3); /* Enable TX and RX interrupts */ 504 } 505 506 static void 507 mpc8xx_console_irq_off(const rtems_irq_connect_data *irq) 508 { 509 CHN_MASK_SET(irq->name - BSP_CPM_IRQ_LOWEST_OFFSET, 510 0); /* Disable TX and RX interrupts */ 511 } 512 513 static int 514 mpc8xx_console_irq_isOn(const rtems_irq_connect_data *irq) 515 { 516 return (0 != CHN_MASK_GET(irq->name - BSP_CPM_IRQ_LOWEST_OFFSET)); /* Check TX and RX interrupts */ 499 mpc8xx_console_irq_on(int chan) 500 { 501 CHN_MASK_SET(chan, 3); /* Enable TX and RX interrupts */ 517 502 } 518 503 … … 710 695 711 696 if (m8xx_scc_mode[chan] != TERMIOS_POLLED) { 712 713 rtems_irq_connect_data irq_conn_data = { 697 rtems_status_code sc; 698 699 sc = rtems_interrupt_handler_install( 714 700 m8xx_console_chan_desc[chan].ivec_src, 715 sccInterruptHandler, /* rtems_irq_hdl */ 716 (rtems_irq_hdl_param)chan, /* (rtems_irq_hdl_param) */ 717 mpc8xx_console_irq_on, /* (rtems_irq_enable) */ 718 mpc8xx_console_irq_off, /* (rtems_irq_disable) */ 719 mpc8xx_console_irq_isOn /* (rtems_irq_is_enabled) */ 720 }; 721 if (!BSP_install_rtems_irq_handler (&irq_conn_data)) { 701 "SCC", 702 RTEMS_INTERRUPT_UNIQUE, 703 sccInterruptHandler, 704 (void *)chan 705 ); 706 if (sc != RTEMS_SUCCESSFUL) { 722 707 rtems_panic("console: cannot install IRQ handler"); 723 708 } 709 mpc8xx_console_irq_on(chan); 724 710 } 725 711 }
Note: See TracChangeset
for help on using the changeset viewer.