Ignore:
Timestamp:
Jul 12, 2017, 8:12:41 PM (5 years ago)
Author:
alain
Message:

Redefine the PIC device API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_dma.c

    r23 r188  
    4040extern chdev_directory_t  chdev_dir;         // allocated in kernel_init.c
    4141
    42 extern chdev_icu_input_t  chdev_icu_input;   // allocated in kernel_init.c
    43 
    4442////////////////////////////////////
    4543void dev_dma_init( chdev_t * chdev )
     
    6462    }
    6563
    66     // get DMA HWI IRQ index
    67     uint32_t hwi_id = chdev_icu_input.dma[channel];
     64    // bind IRQ to the core defined by the DMA channel
     65    dev_pic_bind_irq( channel , chdev );
    6866
    69     // enable HWI IRQ in local ICU, and update  interrupt vector
    70     // the selected core is defined by the DMA channel index
    71     dev_icu_enable_irq( channel , HWI_TYPE , hwi_id , chdev );
     67    // enable IRQ
     68    dev_pic_enable_irq( channel, chdev );
    7269
    7370    // create server thread
     
    9087    // start server thread
    9188    thread_unblock( XPTR( local_cxy , new_thread ) , THREAD_BLOCKED_GLOBAL );
    92    
     89
    9390} // dev_dma_init()
    9491
Note: See TracChangeset for help on using the changeset viewer.