/alps/pcitool

To get this branch, use:
bzr branch http://darksoft.org/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcitool/cli.c

  • Committer: Suren A. Chilingaryan
  • Date: 2015-04-24 03:35:48 UTC
  • Revision ID: csa@suren.me-20150424033548-7xhacqq2s8s1t2fp
More structural changes to get ready for stand-alone event engines

Show diffs side-by-side

added added

removed removed

Lines of Context:
362
362
    const pcilib_event_data_type_description_t *types;
363
363
 
364
364
    const pcilib_board_info_t *board_info = pcilib_get_board_info(handle);
365
 
    const pcilib_dma_description_t *dma_info = pcilib_get_dma_info(handle);
 
365
    const pcilib_dma_description_t *dma_info = pcilib_get_dma_description(handle);
366
366
    
367
367
    for (i = 0; i < PCILIB_MAX_BARS; i++) {
368
368
        if (board_info->bar_length[i] > 0) {
922
922
        }
923
923
    } else {
924
924
            // Adding DMA registers
925
 
        pcilib_get_dma_info(handle);    
 
925
        pcilib_get_dma_description(handle);     
926
926
    
927
927
        if (model_info->registers) {
928
928
            if (bank) {
1762
1762
    pcilib_dma_engine_t dmaid;
1763
1763
    
1764
1764
    if (dma == PCILIB_DMA_ENGINE_ADDR_INVALID) {
1765
 
        const pcilib_dma_description_t *dma_info = pcilib_get_dma_info(handle);
 
1765
        const pcilib_dma_description_t *dma_info = pcilib_get_dma_description(handle);
1766
1766
 
1767
1767
        if (start) Error("DMA engine should be specified");
1768
1768
 
2370
2370
    
2371
2371
    const char *model = NULL;
2372
2372
    const pcilib_model_description_t *model_info;
 
2373
    const pcilib_dma_description_t *dma_info;
2373
2374
    MODE mode = MODE_INVALID;
2374
2375
    GRAB_MODE grab_mode = 0;
2375
2376
    size_t trigger_time = 0;
2847
2848
    if (handle < 0) Error("Failed to open FPGA device: %s", fpga_device);
2848
2849
 
2849
2850
    model_info = pcilib_get_model_description(handle);
 
2851
    dma_info = pcilib_get_dma_description(handle);
2850
2852
 
2851
2853
    switch (mode) {
2852
2854
     case MODE_WRITE:
2873
2875
        else Usage(argc, argv, "The %i data values is specified, but %i required", argc - optind, size);
2874
2876
     case MODE_READ:
2875
2877
        if (!addr) {
2876
 
            if (((!model_info->dma)||(!model_info->dma->api))&&(!model_info->api)) {
 
2878
            if (((!dma_info)||(!dma_info->api))&&(!model_info->api)) {
2877
2879
//          if (model == PCILIB_MODEL_PCI) {
2878
2880
                if ((amode != ACCESS_DMA)&&(amode != ACCESS_CONFIG)) 
2879
2881
                    Usage(argc, argv, "The address is not specified");