Introduce liftoff_plane_get_id

This allow users calling liftoff_device_register_all_planes to
easily figure out what a liftoff_plane represents.
This commit is contained in:
Simon Ser 2021-07-01 11:39:45 +02:00
parent 562f8b0af6
commit 8260fa67d7
2 changed files with 10 additions and 0 deletions

View file

@ -47,6 +47,11 @@ struct liftoff_plane *liftoff_plane_create(struct liftoff_device *device,
*/
void liftoff_plane_destroy(struct liftoff_plane *plane);
/**
* Obtain the object ID of the plane.
*/
uint32_t liftoff_plane_get_id(struct liftoff_plane *plane);
/**
* Build a layer to plane mapping and append the plane configuration to `req`.
*

View file

@ -147,6 +147,11 @@ void liftoff_plane_destroy(struct liftoff_plane *plane)
free(plane);
}
uint32_t liftoff_plane_get_id(struct liftoff_plane *plane)
{
return plane->id;
}
struct liftoff_plane_property *plane_get_property(struct liftoff_plane *plane,
const char *name)
{