Exemple #1
0
/* interrupt function for the Slave queue */
void IPC_Master2Slave_IRQHandler(void)
{		
	
	MASTER_TXEV_QUIT();

	cmdPending = PENDING;
}
Exemple #2
0
/* initialize the slave MBX ipc framework */
void IPC_initSlaveMbx(CbackItem cbackTable[], Mbx* masterMbxPtr, Mbx* slaveMbxPtr)
{
    mbxId_t i;
    Mbx* lPtr;

    // initialize the pointers
    mbxLocalTablePtr = slaveMbxPtr;
    mbxRemoteTablePtr = masterMbxPtr;

    // clear the mailbox and the flags
    for(i=(mbxId_t)0, lPtr = mbxLocalTablePtr; i<NUM_SLAVE_MBX; i++,lPtr++) {

        lPtr->mbxStatus = READY;
        lPtr->mbxHeader.msg = MBX_MSG_DEFAULT;
        lPtr->mbxHeader.msgId = MBX_MSGID_DEFAULT;
        lPtr->mbxParam = MBX_PARAM_DEFAULT;
        mbxFlags[i] = NO_MSG;
    }

    // plug the actual callbacks functions
    _plugCallbacks(&cbackTable[0], NUM_SLAVE_MBX);

    NVIC_DisableIRQ((IRQn_Type)MASTER_IRQn);

    MASTER_TXEV_QUIT();

    // clear the interrupt
    NVIC_ClearPendingIRQ((IRQn_Type)MASTER_IRQn);

    // set the default priority for the interrupts
    NVIC_SetPriority((IRQn_Type)MASTER_IRQn, SLAVE_MAILBOX_PRIORITY);

    // enable the interrupt
    NVIC_EnableIRQ((IRQn_Type)MASTER_IRQn);
}
/* interrupt function on the slave side (master -> slave interrupt) */
void IPC_Master2Slave_IRQHandler() {		

	/* quit the interrupt */
	MASTER_TXEV_QUIT();

	/* call the interrupt callback function */
	(*slaveIntCallback)();

	intFlag = MSG_PENDING;
}
Exemple #4
0
/* interrupt from Master on Slave side */
void M0_M4CORE_IRQHandler() {

    mbxId_t i;

    // quit the interrupt
    MASTER_TXEV_QUIT();

    for(i=(mbxId_t)0; i<NUM_SLAVE_MBX; i++) {

        if(PROCESS == IPC_queryLocalMbx(i)) {
            _mbxProcess(i);
            mbxFlags[i] = MSG_PENDING;
        }
    };
}
Exemple #5
0
/* initialize the Queue ipc framework */
void IPC_slaveInitQueue(void)
{	
	MASTER_TXEV_QUIT();

	NVIC_DisableIRQ((IRQn_Type)MASTER_IRQn);

	// clear the interrupt
	NVIC_ClearPendingIRQ((IRQn_Type)MASTER_IRQn);
			
	// set the default priority for the interrupts
	NVIC_SetPriority((IRQn_Type)MASTER_IRQn, SLAVE_QUEUE_PRIORITY);
					
	cmdPending = NO_TOKEN;
		
	// enable the interrupt
	NVIC_EnableIRQ((IRQn_Type)MASTER_IRQn);
}
/* initialize the slave interrupt ipc framework */
void IPC_slaveInitInterrupt(intCallback_t slaveCback) {	

	intFlag = NO_MSG;

	NVIC_DisableIRQ((IRQn_Type)MASTER_IRQn);

	MASTER_TXEV_QUIT();

	/* register the callback, executed within the interrupt context */
	slaveIntCallback = slaveCback;
	
	/* clear the interrupt */
	NVIC_ClearPendingIRQ((IRQn_Type)MASTER_IRQn);
			
	/* set the default priority for the interrupts */
	NVIC_SetPriority((IRQn_Type)MASTER_IRQn, SLAVE_INTERRUPT_PRIORITY);
				
	/* enable the interrupt */
	NVIC_EnableIRQ((IRQn_Type)MASTER_IRQn);
}
Exemple #7
0
void m4core_isr(void)
{
  MASTER_TXEV_QUIT();
}