MCPcopy Create free account
hub / github.com/apache/nuttx / rpmsgmtd_ioctl_handler

Function rpmsgmtd_ioctl_handler

drivers/mtd/rpmsgmtd.c:950–966  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

948 ****************************************************************************/
949
950static int rpmsgmtd_ioctl_handler(FAR struct rpmsg_endpoint *ept,
951 FAR void *data, size_t len,
952 uint32_t src, FAR void *priv)
953{
954 FAR struct rpmsgmtd_header_s *header = data;
955 FAR struct rpmsgmtd_cookie_s *cookie =
956 (FAR struct rpmsgmtd_cookie_s *)(uintptr_t)header->cookie;
957 FAR struct rpmsgmtd_ioctl_s *rsp = data;
958
959 if (cookie->result >= 0 && rsp->arglen > 0)
960 {
961 memcpy(cookie->data, (FAR void *)(uintptr_t)rsp->buf, rsp->arglen);
962 }
963
964 rpmsg_post(ept, &cookie->sem);
965 return 0;
966}
967
968/****************************************************************************
969 * Name: rpmsgmtd_ns_bound

Callers

nothing calls this directly

Calls 2

rpmsg_postFunction · 0.85
memcpyFunction · 0.50

Tested by

no test coverage detected