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

Function sys_device_control

components/lwp/lwp_syscall.c:4904–4907  ·  view source on GitHub ↗

* @brief Controls a device by sending a command. * * This system call sends a control command to the specified device, allowing the system or other * components to modify the device's behavior or state. The command is specified by the `cmd` * parameter, and the arguments for the command are passed via the `arg` parameter. * * @param[in] dev A pointer to the device structure representing th

Source from the content-addressed store, hash-verified

4902 * Providing an invalid device or incorrect command may result in undefined behavior.
4903 */
4904sysret_t sys_device_control(rt_device_t dev, int cmd, void *arg)
4905{
4906 return rt_device_control(dev, cmd, arg);
4907}
4908
4909/**
4910 * @brief Finds a device by its name.

Callers

nothing calls this directly

Calls 1

rt_device_controlFunction · 0.85

Tested by

no test coverage detected