Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 4 months ago.
dma_api.h not included properly in I2C.h and i2c_api.h?
I was trying to port mbed to a new target, and while compiling with DEVICE_I2C_ASYNC turned on, I got error saying type "DMAUsage" is not defined. This enum is defined in dma_api.h but this header is not included in i2c_api.h. So, now, this requires explicit inclusion of this header file in i2c_api.c, which is OK for me as this is a file I create for my target. But I get the same error in mbed header file I2C.h which includes i2c_api.h before including dma_api.h. For other targets, the authors include dma_api.h in their objects.h file to solve this problem. So, why this header is not included in i2c_api.h? Isn't that what is actually expected?
1 Answer
9 years, 4 months ago.
Hi,
it's included in I2C.h : https://github.com/mbedmicro/mbed/blob/master/libraries/mbed/api/I2C.h#L27. yes, it's a bug, it's missing in i2c_api.h, please send PR with a fix to our github repository, or I can fix that today.
Yes it is included in I2C.h, but only after including i2c_api.h [https://github.com/mbedmicro/mbed/blob/master/libraries/mbed/api/I2C.h#L23]. Thank you for answering me, and it would be great if you could fix it .
posted by 27 Jul 2015