circuitdojo / pcf85063a

Zephyr driver for PCF85063A
Apache License 2.0
7 stars 7 forks source link

Header not found #1

Closed felixbaral closed 1 year ago

felixbaral commented 1 year ago

Sorry, noob question. I am trying to use this driver, i did add it to west.yml and i called west update, it also is in my devicetree. That all worked nicely.

But when i try to include it like this: `

include <drivers/rtc/pcf85063a.h>

` it doesnt build anymore and throws this error:

fatal error: drivers/rtc/pcf85063a.h: No such file or directory 11 | #include <drivers/rtc/pcf85063a.h>

This is the first time i am including a third party driver, so maybe i am missing something very basic.

I tried to include several paths in my CmakeLists, but so far without luck, what do i need to do, or should it just work?

maustin-redant commented 1 year ago

Not sure if you've got this working, but that header is now in a different folder.

Change it to:

include <drivers/counter/pcf85063a.h>

jaredwolff commented 1 year ago

Yea depending on what version of Zephyr/NCS you're using this will be different. This repo has a v1.9.x and v1.7.x branch for older versions with this path. Like @maustin-redant said, it now uses the counter path. Thanks @maustin-redant !

felixbaral commented 1 year ago

actually I had it imported wrong. my bad

I was using cpp but forgot to wrap the import like this:

extern "C" {
    #include <drivers/counter/pcf85063a.h>
}