others/fw-verif/demo-system/fwsrc/slv.c
/* handleCmd: handle interrupt based on MB local copy
 */
handle interrupt based on MB local copy
handle interrupt based on MB local copy
void handleCmd () {
    switch (gMbCtx[MB_SPACE_OFF_R_CMD]) {
        case CMD_STATUS_REQUEST: 
            gMbCtx[MB_SPACE_OFF_S_CMD]  = CMD_STATUS_REPLY;
            gMbCtx[MB_SPACE_OFF_S_DAT0] = 4;
            gMbCtx[MB_SPACE_OFF_S_SIZE] = 1;
            sendMsgSlv2Mst ();
            break; 
        case CMD_IMAGE_READY:
            gSlvFlag[SLV_FLAG_IMG_SIZE] = gMbCtx[MB_SPACE_OFF_R_DAT0];
            gSlvFlag[SLV_FLAG_IMG_RDY] = 1;
            break;
        default:
            assert (0);
            break;
    };
    return;
}
void handleCmd ( ) { switch ( gMbCtx [ MB_SPACE_OFF_R_CMD ] ) { case CMD_STATUS_REQUEST : gMbCtx [ MB_SPACE_OFF_S_CMD ] = CMD_STATUS_REPLY ; gMbCtx [ MB_SPACE_OFF_S_DAT0 ] = 4 ; gMbCtx [ MB_SPACE_OFF_S_SIZE ] = 1 ; sendMsgSlv2Mst ( ) ; break ; case CMD_IMAGE_READY : gSlvFlag [ SLV_FLAG_IMG_SIZE ] = gMbCtx [ MB_SPACE_OFF_R_DAT0 ] ; gSlvFlag [ SLV_FLAG_IMG_RDY ] = 1 ; break ; default : assert ( 0 ) ; break ; } ; return ; }
handleCmd: handle interrupt based on MB local copy
handleCmd : handle interrupt based on MB local copy
//assert (gMbCtx[MB_SPACE_OFF_R_SIZE] == 1); // XXX potential false positive in interrupt handling