8 years, 3 months ago.

mbed.h missing

Since yesterday the library mbed is missing some folders like "Structs", ... It is only showing "Groups".

When I try to compile an I2C command like:

#include "mbed.h"

Serial pc(SERIAL_TX, SERIAL_RX);
I2C i2c(I2C_SDA, I2C_SCL);
 
int main() {
  int temp;
  int addr[2];
  
  addr[1] = 0x40;
  addr[0] = 0x00;

  while(1) {
      i2c.read(addr, temp, 2, 0); 
      wait(0.5);
      pc.printf("TEMP= %d\r", temp);
  }
}

Error: No instance of overloaded function "mbed::I2C::read" matches the argument list in "main.cpp", Info: Unable to download. Fix the reported errors...

Any suggestions?

I tried to update, deleted and downloaded again... Seems for all programs to be the case

Robbie,

Thanks for your message, we are aware of this issue and getting it fixed ASAP!

Can you let me know what target you are using?

I'll let you know as soon as i have more information.

Best Regards,

Andrea, team mbed

posted by Andrea Corrado 23 Aug 2016

Hi Robbie, which platform are you using? Is the program published somewhere?

posted by Jan Jongboom 23 Aug 2016

Hello,

First of all I found a small error in my code which solved the issue. int addr[2]; i2c.read(addr, temp, 2, 0);

The definition of addr is wrong. It cannot be an array. After solving this, I was able to compile.

Anyway, I dont see the Structs, etc.... in the mbed dropdown menu.

So issue is partially solved.

posted by Robbie Vandeweerdt 23 Aug 2016
Be the first to answer this question.