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.
11 years, 10 months ago.
Compiler error
Followed the tutorial of MODSERIAL_dma and now get an error that "_uidx is undefined". Does anyone know what to do? MODDMA und MODSERIAL are included in the project. Source code below.
Thx.
Philipp
include the mbed library with this snippet
#include "mbed.h" #include "MODDMA.h" // Before MODSERIAL.h #include "MODSERIAL.h" // After MODDMA.h #define NUMBER_OF_FLOAT 16 union f2c{ float f[NUMBER_OF_FLOAT]; char c[4*NUMBER_OF_FLOAT]; }; MODSERIAL xbee(p9,p10); MODDMA dma; f2c send_buf = {0}; f2c recv_buf = {0}; void xbee_recv_callback() { } void xbee_send() { xbee.dmaSend(send_buf.c, sizeof(send_buf.c)); } int main() { xbee.baud(115200); xbee.format(8,Serial::None,1); xbee.MODDMA( &dma ); xbee_send(); }
Question relating to:
2 Answers
11 years, 10 months ago.
_uidx is an old identifier not used anymore by the mbed Serial library. So going back to an older mbed library fixes that. To fix it in MODSERIAL it should work if you replace _uidx by _serial.index
This was changed in the rest fo the MODSERIAL code, but the DMA section was missed. In my MODSERIAL fork it was also fixed for DMA later, but then I added KL25Z support and removed the whole DMA stuff since it wasn't functioning anymore.