src/occ_405/wof/wof.c
/**
 * wof_vfrt_callback
 *
 * Description: Callback function for G_wof_vfrt_req GPE request to
 *              confirm the new VFRT is being used by the PGPE and
 *              record the switch on the 405. Also updates the
 *              initialization
 */
wof_vfrt_callback
Description: Callback function for G_wof_vfrt_req GPE request to
confirm the new VFRT is being used by the PGPE and
record the switch on the 405. Also updates the
initialization
wof_vfrt_callback Description : Callback function for G_wof_vfrt_req GPE request to confirm the new VFRT is being used by the PGPE and record the switch on the 405 . Also updates the initialization
void wof_vfrt_callback( void )
{
    g_wof->vfrt_state = STANDBY;
    if( G_wof_vfrt_parms.msg_cb.rc == PGPE_WOF_RC_VFRT_QUAD_MISMATCH )
    {
        read_req_active_quads();
    }
    else if( G_wof_vfrt_parms.msg_cb.rc == PGPE_RC_SUCCESS )
    {
       g_wof->curr_ping_pong_buf = g_wof->next_ping_pong_buf;
       g_wof->prev_req_active_quads = g_wof->req_active_quad_update;
       g_wof->curr_vfrt_main_mem_addr = g_wof->next_vfrt_main_mem_addr;
       if( g_wof->wof_init_state == INITIAL_VFRT_SENT_WAITING )
       {
            g_wof->wof_init_state = INITIAL_VFRT_SUCCESS;
       }
    }
    else
    {
        g_wof->vfrt_callback_error = 1;
        g_wof->wof_vfrt_req_rc = G_wof_vfrt_parms.msg_cb.rc;
    }
}
void wof_vfrt_callback ( void ) { g_wof -> vfrt_state = STANDBY ; if ( G_wof_vfrt_parms . msg_cb . rc == PGPE_WOF_RC_VFRT_QUAD_MISMATCH ) { read_req_active_quads ( ) ; } else if ( G_wof_vfrt_parms . msg_cb . rc == PGPE_RC_SUCCESS ) { g_wof -> curr_ping_pong_buf = g_wof -> next_ping_pong_buf ; g_wof -> prev_req_active_quads = g_wof -> req_active_quad_update ; g_wof -> curr_vfrt_main_mem_addr = g_wof -> next_vfrt_main_mem_addr ; if ( g_wof -> wof_init_state == INITIAL_VFRT_SENT_WAITING ) { g_wof -> wof_init_state = INITIAL_VFRT_SUCCESS ; } } else { g_wof -> vfrt_callback_error = 1 ; g_wof -> wof_vfrt_req_rc = G_wof_vfrt_parms . msg_cb . rc ; } }
wof_vfrt_callback
 Description: Callback function for G_wof_vfrt_req GPE request to
              confirm the new VFRT is being used by the PGPE and
              record the switch on the 405.
wof_vfrt_callback Description : Callback function for G_wof_vfrt_req GPE request to confirm the new VFRT is being used by the PGPE and record the switch on the 405 .
// Update the VFRT state to indicate a new IPC message can be // scheduled regardless of the RC of the previous one. // Confirm the WOF VFRT PGPE request has completed with no errors // Rereading OCC-SRAM to update requested active quads // GpeRequest went through successfully. update global ping pong buffer // Update previous active quads // Update current vfrt_main_mem_address // Update the wof_init_state based off the current state // Disable WOF