Arm Mbed OS support forum

Moving a library to AVR


I have found a library here ( ) that I would like to use in AVR project but it has an mbed.h included

The library is for the DS2480B, could someone please explain how I could deseminate the mbed ‘stuff’ or what the mbed bit does so that I can reproduce it if necessary and include the core functionality it in my project.


Hi @docara2,

I don’t know what a library you exactly mean but I found this one. I hope it works, it looks very simple.
From my point of view the “mbed.h” is here mainly because of the Serial object in the .cpp file on line 17. So if you want to use this, you need to rework the Serial object according to a AVR API/style.

I hope it help to start.

BR, Jan

Thank you for the reply JohnnyK

Yes that was the library I was looking at

To give you some background I (have to) use a high level language which can incorporate C code macros.

Sorry I’m not very fluent with C so as far as you can tell, other than the MCU sending serial commands, this a pretty much a stand alone library which I could use adapt to my requirements. - so other than the serial call line 17, there’s nothing here which is STM32/ARM specific?



you also need take care about methods of the Serial object.

  • getc()
  • putc()
  • send_break()

I am not sure about send_break() but others are standart.

BR, Jan