This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

digital_power lib bug [f2802x]

Hi Folks

In the DPLib.h file of the digital_power lib for f2802x (may apply to other device's code also) the C function DLOG_BuffInit() [ln# 73] uses the 'int16'  type. all other basic types used in the file are primitives. The file does not include any headers, thus 'int16' is undefined.

This causes an error on compilation in projects which don't include the device type definitions themselves (e.g. I use stdint.h instead) and so the library user needs to alter this library code.

To fix, the line in question [ln#73] should read:

void DLOG_BuffInit(volatile int *buf, unsigned int buflen)

Can this be added for the next release? Ta :)

  • Toby,

    I agree we should use stdint defines for all the libraries we provide,

    I will file this as a bug for all our libraries.

    The rational of not defining the type was that we do define the types in the device.h file and we did not want to redefine things everywhere, but the right thing is to use stdint i agree.