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.

Related