This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How do I make device_get_binding("NRF9160_GPS") work, like the Asset Tracker does?

Hi,

I'm trying to get the gps driver to work, but the initialization requires getting a device binding.

The Asset Tracker project does it like this:

device_get_binding(CONFIG_GPS_DEV_NAME);


CONFIG_GPS_DEV_NAME is defined as "NRF9160_GPS".

I have no idea how to set up that device for my own project.
Using the same name just gives me NULL.

I can't find any overlay files in the Asset Tracker project, or any reference to a GPS device in the finished device tree file.

Parents
  • Sorry, I got ahead of myself and assumed you were making this custom project for a custom board. Either way, the guide is great for using a DK as well, as the device binding should be just as relevant no matter what device you're using.

    I suggest checking out the Kconfig and nrf9160_gps.c file. Seeing as the driver is still in an experimental state, the documentation is still not where we'd like it to be.

    Best regards,

    Simon

Reply
  • Sorry, I got ahead of myself and assumed you were making this custom project for a custom board. Either way, the guide is great for using a DK as well, as the device binding should be just as relevant no matter what device you're using.

    I suggest checking out the Kconfig and nrf9160_gps.c file. Seeing as the driver is still in an experimental state, the documentation is still not where we'd like it to be.

    Best regards,

    Simon

Children
No Data
Related