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

Function sys_device_close

components/lwp/lwp_syscall.c:4984–4987  ·  view source on GitHub ↗

* @brief Closes an open device. * * This system call closes an open device, releasing any resources or locks associated with it * and making it unavailable for further interaction until it is opened again. The device must * have been previously opened using `sys_device_open`. After calling this function, any further * attempts to interact with the device will result in an error unless the dev

Source from the content-addressed store, hash-verified

4982 * on an uninitialized or already closed device may result in undefined behavior or errors.
4983 */
4984sysret_t sys_device_close(rt_device_t dev)
4985{
4986 return rt_device_close(dev);
4987}
4988
4989/**
4990 * @brief Reads data from an open device.

Callers

nothing calls this directly

Calls 1

rt_device_closeFunction · 0.85

Tested by

no test coverage detected