Hi,
I am planning to create an ultrasonic library (based on ch201) because I can't find any library for it. So I am porting code from ch201 development kit to nrf52 custom board.
So in my main code, I am defining a method for creating initialization just like the development kit does. Below is the header of my main code, as you can see there is
In my main loop, you can check at the part of sensor initialization, there is a method called ch201_init and has 2 arguments.
First argument for selecting sensor struct, and second argument is firmware method for initialization process.
Here is the source code for that method.
When I compile the code, it gives me error like that method is not defined yet before. But you can check at my header, I call that method from it's file (but the code is not defined at header, but I just make the code works on it is source file).
Below is the code when I compile it without defining it on header file.
********
So I was planning to define it on header library. But, when I define it on header library, it gives me more errors message than before.
So as you can check in the picture below, now I define it and looks like no errors on it.
But, when I compile, it gives me more errors (4 errors). It is said the ch201_device is not defined, but I define it at my main library code. Below is the error result.
So Is there any solution for this? Thank you for your appreciation.