OpenCores
URL https://opencores.org/ocsvn/usb_fpga_1_2/usb_fpga_1_2/trunk

Subversion Repositories usb_fpga_1_2

[/] [usb_fpga_1_2/] [trunk/] [include/] [ztex-fpga-flash.h] - Diff between revs 8 and 9

Show entire file | Details | Blame | View Log

Rev 8 Rev 9
Line 73... Line 73...
    flash_read_finish(flash_sector_size - 12);          // dummy-read the rest of the sector + finish read opration
    flash_read_finish(flash_sector_size - 12);          // dummy-read the rest of the sector + finish read opration
    if ( i==0 )
    if ( i==0 )
        return 3;
        return 3;
 
 
    // read the bitstream
    // read the bitstream
    if ( flash_read_init( 1 ) )                 // prepare reading sector k
    if ( flash_read_init( 1 ) )                 // prepare reading sector 1
        return 2;
        return 2;
    for ( k=1; k<i; k++ ) {
    for ( k=1; k<i; k++ ) {
        fpga_send_bitstream_from_flash( flash_sector_size );
        fpga_send_bitstream_from_flash( flash_sector_size );
        if ( flash_read_next() )                // prepare reading next sector
        if ( flash_read_next() )                // prepare reading next sector
            return 2;
            return 2;
Line 124... Line 124...
/* *********************************************************************
/* *********************************************************************
   ***** fpga_configure_from_flash_init ********************************
   ***** fpga_configure_from_flash_init ********************************
   ********************************************************************* */
   ********************************************************************* */
// this function is colled by init_USB;
// this function is colled by init_USB;
void fpga_configure_from_flash_init() {
void fpga_configure_from_flash_init() {
 
    if ( ! flash_enabled ) {
 
        fpga_flash_result = 2;
 
        return;
 
    }
 
 
    fpga_flash_result = fpga_configure_from_flash(0);
    fpga_flash_result = fpga_configure_from_flash(0);
    if ( fpga_flash_result == 1 ) {
    if ( fpga_flash_result == 1 ) {
        post_fpga_config();
        post_fpga_config();
    }
    }
    else if ( fpga_flash_result == 4 ) {
    else if ( fpga_flash_result == 4 ) {

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.