EDMA3 Driver Porting
I-A-97
/* Below is the sample code which show how to define the OS dependent critical section handling
routines. These functions should be mandatorily defined by the user. */
#include <ecm.h>
#include <bcache.h>
#include <hwi.h>
#include <tsk.h>
#include <clk.h>
#include <sem.h>
#include <ti/sdo/edma3/drv/sample/bios_edma3_drv_sample.h>
#define EDMA3_CACHE_WAIT (1u)
/** Entry to critical section */
void edma3OsProtectEntry (int level, unsigned int *intState)
{
if (((level == EDMA3_OS_PROTECT_INTERRUPT) || (level == EDMA3_OS_PROTECT_INTERRUPT_TC_ERROR))
&& (intState == NULL)) {
return;
} else {
switch (level)
{
case EDMA3_OS_PROTECT_INTERRUPT :
*intState = HWI_disable();
break;
case EDMA3_OS_PROTECT_SCHEDULER :
TSK_disable();
break;
case EDMA3_OS_PROTECT_INTERRUPT_XFER_COMPLETION :
ECM_disableEvent (ccXferCompInt);
break;
case EDMA3_OS_PROTECT_INTERRUPT_CC_ERROR :
ECM_disableEvent (ccErrorInt);
break;
case EDMA3_OS_PROTECT_INTERRUPT_TC_ERROR :
switch (*intState)
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
ECM_disableEvent (tcErrorInt[*intState]);
break;
default:
break;
}
break;
default:
break;
}
}
}
Summary of Contents for EDMA3
Page 12: ......
Page 17: ...EDMA3 Driver Introduction I 1 5 ...
Page 20: ......
Page 40: ...Run Time Interfaces Integration Guide A 12 EDMA3_DRV_IOCTL_MAX_IOCTL Max IOCTL ...
Page 75: ...Run Time Interfaces Integration Guide I A 47 Errors EDMA3_DRV_E_INVALID_PARAM ...
Page 107: ...Run Time Interfaces Integration Guide I A 79 ...