F
fl
Hi,
I read the code of a sample application. Below is the main function part:
////////
extern EDMA3_DRV_InstanceInitConfig sampleInstInitConfig[][EDMA3_MAX_REGIONS];
void main()
{
Task_create((Task_FuncPtr)echo, NULL, NULL);
BIOS_start();
}
---------------
In another .c file, it has:
//////////////
EDMA3_DRV_InstanceInitConfig sampleInstInitConfig[NUM_EDMA3_INSTANCES][EDMA3_MAX_REGIONS] =
{
/* EDMA3 INSTANCE# 0 */
{
.....
}
}
-----------
Of course, both NUM_EDMA3_INSTANCES and EDMA3_MAX_REGIONS are defined earlier. My question is about the declaration in main file. Why do they use [] in its first index:
extern EDMA3_DRV_InstanceInitConfig sampleInstInitConfig[][EDMA3_MAX_REGIONS];
Could you explain it to me?
Thanks,
I read the code of a sample application. Below is the main function part:
////////
extern EDMA3_DRV_InstanceInitConfig sampleInstInitConfig[][EDMA3_MAX_REGIONS];
void main()
{
Task_create((Task_FuncPtr)echo, NULL, NULL);
BIOS_start();
}
---------------
In another .c file, it has:
//////////////
EDMA3_DRV_InstanceInitConfig sampleInstInitConfig[NUM_EDMA3_INSTANCES][EDMA3_MAX_REGIONS] =
{
/* EDMA3 INSTANCE# 0 */
{
.....
}
}
-----------
Of course, both NUM_EDMA3_INSTANCES and EDMA3_MAX_REGIONS are defined earlier. My question is about the declaration in main file. Why do they use [] in its first index:
extern EDMA3_DRV_InstanceInitConfig sampleInstInitConfig[][EDMA3_MAX_REGIONS];
Could you explain it to me?
Thanks,