2 years, 6 months ago.

How to use target driver code?

I'd like to use target driver code that is fsl_sleep code. My target is freescale mk64.


I want to make deep sleep mode in my own project.

Can I use method in fsl_smc.h?

1 Answer

2 years, 6 months ago.

Hi there,

You can use any driver code for the board by simply including the header file in your main.cpp file or anywhere you want to utilize the driver functions. Just add #include "fsl_smc.h" to the top of your file and Mbed OS will know you want to use those functions.

NXP also has examples written for the fsl_smc.h driver, you can download these examples for the GCC Arm Embedded toolchain here: https://mcuxpresso.nxp.com/en/example-projects?uvid=84718 (under the "demo apps" dropdown) - you will just have to modify the code in order for it to work with Mbed OS.

- Jenny, team Mbed