MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_mbox_request_by_name

Function rt_mbox_request_by_name

components/drivers/mailbox/mailbox.c:319–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317}
318
319struct rt_mbox_chan *rt_mbox_request_by_name(struct rt_mbox_client *client, char *name)
320{
321 int index;
322 struct rt_ofw_node *np;
323
324 if (!client || !name)
325 {
326 return rt_err_ptr(-RT_EINVAL);
327 }
328
329 np = client->dev->ofw_node;
330 index = rt_ofw_prop_index_of_string(np, "mbox-names", name);
331
332 if (index < 0)
333 {
334 return RT_NULL;
335 }
336
337 return rt_mbox_request_by_index(client, index);
338}
339
340rt_err_t rt_mbox_release(struct rt_mbox_chan *chan)
341{

Callers

nothing calls this directly

Calls 2

rt_mbox_request_by_indexFunction · 0.85

Tested by

no test coverage detected