I want to create a compile-time array of DMA TCBs and I'm getting the "cc0028: error: expression must have a constant value" when I try to create the DMA chain with PCI and CPDR bits. In it's simplest form, here's what I'm trying to do:
int tcb =
(int)&tcb | CPDR,
(int)&tcb | PCI,
where CPDR corresponds to BIT_20 of the CPEP0 register and PCI is BIT_19 of CPEP0.
When I compile the above code, I get the CC0028 compile error which doesn't make sense since CPDR and PCI are constants. If I recompile without the "| CPDR" etc, it compiles with no errors.
The example given in your pdf document located at:
doesn't give me much help.
Is there a way I can initialize the array without having to write a routine to do the 'OR' operation?