Other Parts Discussed in Thread: C2000WARE
Hi all,
Checking MISRA C:2012 in test code.
I'm having a problem with the library function DELAY_US, asking for help.
// DO NOT MODIFY THIS LINE.
#define DELAY_US(A) DSP28x_usDelay(((((long double) A * 1000.0L) / (long double)CPU_RATE) - 9.0L) / 5.0L)
extern void DSP28x_usDelay(Uint32 Count);
A long double type variable is calculated and becomes a Uint32 Count.
Violating MISRA_C:2012 10.3 with this issue.
Any solution for this?
Add to,
Should I put an unsigned int variable or a long double variable at position A?