src/occ_405/wof/wof.c
/**
 * copy_vfrt_to_sram_callback
 *
 * Description: Call back function to BCE request to copy VFRT into SRAM
 *              ping/pong buffer. This call will also tell the PGPE
 *              that a new VFRT is available
 *
 * Param[in]: i_parms - pointer to a struct that will hold data necessary to
 *                      the calculation.
 *                      -Pointer to vfrt table temp buffer
 */
copy_vfrt_to_sram_callback
Description: Call back function to BCE request to copy VFRT into SRAM
ping/pong buffer. This call will also tell the PGPE
that a new VFRT is available

Param[in]: i_parms - pointer to a struct that will hold data necessary to
the calculation.
-Pointer to vfrt table temp buffer
copy_vfrt_to_sram_callback Description : Call back function to BCE request to copy VFRT into SRAM ping / pong buffer . This call will also tell the PGPE that a new VFRT is available Param [ in ] : i_parms - pointer to a struct that will hold data necessary to the calculation . - Pointer to vfrt table temp buffer
void copy_vfrt_to_sram_callback( void )
{
    uint8_t * l_buffer_address = G_sram_vfrt_ping_buffer;
    if(g_wof->curr_ping_pong_buf == (uint32_t)G_sram_vfrt_ping_buffer)
    {
        l_buffer_address = G_sram_vfrt_pong_buffer;
    }
    else
    {
        l_buffer_address = G_sram_vfrt_ping_buffer;
    }
    g_wof->next_ping_pong_buf = (uint32_t)l_buffer_address;
    memcpy( l_buffer_address,
            &G_vfrt_temp_buff,
            g_wof->vfrt_block_size );
    G_wof_vfrt_parms.homer_vfrt_ptr = (HomerVFRTLayout_t*)l_buffer_address;
    G_wof_vfrt_parms.active_quads = g_wof->req_active_quad_update;
    if( g_wof->vfrt_state != STANDBY )
    {
        g_wof->vfrt_state = NEED_TO_SCHEDULE;
    }
}
void copy_vfrt_to_sram_callback ( void ) { uint8_t * l_buffer_address = G_sram_vfrt_ping_buffer ; if ( g_wof -> curr_ping_pong_buf == ( uint32_t ) G_sram_vfrt_ping_buffer ) { l_buffer_address = G_sram_vfrt_pong_buffer ; } else { l_buffer_address = G_sram_vfrt_ping_buffer ; } g_wof -> next_ping_pong_buf = ( uint32_t ) l_buffer_address ; memcpy ( l_buffer_address , & G_vfrt_temp_buff , g_wof -> vfrt_block_size ) ; G_wof_vfrt_parms . homer_vfrt_ptr = ( HomerVFRTLayout_t * ) l_buffer_address ; G_wof_vfrt_parms . active_quads = g_wof -> req_active_quad_update ; if ( g_wof -> vfrt_state != STANDBY ) { g_wof -> vfrt_state = NEED_TO_SCHEDULE ; } }
copy_vfrt_to_sram_callback
 Description: Call back function to BCE request to copy VFRT into SRAM
              ping/pong buffer.
copy_vfrt_to_sram_callback Description : Call back function to BCE request to copy VFRT into SRAM ping / pong buffer .
/*
 *
 * find out which ping pong buffer to use
 * copy the vfrt to said ping pong buffer
 * save current vfrt address to global
 * send IPC command to pgpe to notify of new ping/pong vfrt address
 */ // Static variable to trac which buffer is open for use // 0 = PING; 1 = PONG; // Switch to pong buffer // Switch to ping buffer // Update global "next" ping pong buffer for callback function // Copy the vfrt data into the buffer // Set the parameters for the GpeRequest // Set vfrt state to let OCC know it needs to schedule the IPC command