Changeset 2094

Show
Ignore:
Timestamp:
03/29/12 13:28:55 (11 years ago)
Author:
adi
Message:

DICE-EAP Add (possibly) printing the full peak space with test-dice-eap

By Philippe Carriere:

Further information (peak space) for test purposes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/dice/dice_eap.cpp

    r2093 r2094  
    723723{ 
    724724    printMessage("--- Full router content ---\n"); 
    725     fb_quadlet_t* tmp = (fb_quadlet_t *) calloc(m_router_nb_entries, sizeof(fb_quadlet_t)); 
    726725 
    727726    printMessage(" %d entries to read\n", m_router_nb_entries); 
     
    748747        printMessage("    %d: 0x%02x <- 0x%02x;\n", i, tmp_entries[i]&0xff, (tmp_entries[i]>>8)&0xff); 
    749748    } 
     749 
    750750    // New config 
    751751    printMessage("  New Configuration:\n"); 
     
    768768    } 
    769769 
     770    return; 
     771} 
     772 
     773void 
     774EAP::showFullPeakSpace() 
     775{ 
     776    printMessage("--- Full Peak space content ---\n"); 
     777 
     778    // read the peak/route info 
     779    uint32_t tmp_entries[m_router_nb_entries]; 
     780    if(!readRegBlock(eRT_Peak, 0, tmp_entries, m_router_nb_entries*4)) { 
     781        debugError("Failed to read peak block information\n"); 
     782        return; 
     783    } 
     784    // decode and print 
     785    for (unsigned int i=0; i<m_router_nb_entries; ++i) { 
     786        printMessage("  %d: 0x%02x: %d;\n", i, tmp_entries[i]&0xff, (tmp_entries[i]&0xfff0000)>>16); 
     787        unsigned char dest = tmp_entries[i]&0xff; 
     788    } 
    770789    return; 
    771790} 
  • trunk/libffado/src/dice/dice_eap.h

    r2093 r2094  
    475475    /// Dump the first parts of the application space 
    476476    void showApplication(); 
    477  
    478477    /// Show the full router content 
    479478    void showFullRouter(); 
     479    /// Show the full peak space content 
     480    void showFullPeakSpace(); 
    480481 
    481482    /// Restore from flash 
  • trunk/libffado/tests/test-dice-eap.cpp

    r2093 r2094  
    254254        eap.showApplication(); 
    255255        eap.showFullRouter(); 
     256        eap.showFullPeakSpace(); 
    256257    } 
    257258    else