How to use the library application.h?

Hello,

I used the library application.h before for my project. Now, it looks like it is not available on IDE. My old code can not be complied. Are there any way to fix that issue?

Thanks

Try its successor Particle.h
It’s not actually a library but the “main” header for the Particle framework which doesn’t need to be imported but just be included.

It does not work. The errors: missing the declare of RCC_PCLK2_Div6, RCC_ADCCLKConfig, RCC_AHBPeriph_DMA1, struct DMA_InitTypeDef, ...

My application is using ADC to capture the high frequency signal

Thanks

Have you double checked your selected target device?

I use Photon

Yes, but are you actually building for Photon too?
If you have the target set wrong, that would expain the error you are seeing.

Assuming you are using Web IDE, you can also post a snapshot link of your project via the SHARE THIS REVISION button.

https://go.particle.io/shared_apps/5afc03c7c95f4d9b0d000312

This code seems to be meant for Spark Core and not Particle Photon.
That’s also indicated by the fact the code still features Spark.disconnect() but we now use Particle.disconnect().

Since the Core used an STM32F1 but the Photon and Electron are based on the STM32F2 the hardware specific code needs to be adapted to fit the new hardware.

1 Like

Oh! I see the issue. Thank you very much for your help! I very appreciate.

By the way, do you know any example, or library to capture high-frequency signal by ADC?

Thanks

Yes, here

1 Like