bernard d7087fdd3b [DeviceDrivers] change cmd type.
1. Change 'rt_uint8_t' type of cmd to 'int';
2. Add waitqueue;
3. Split device ipc header files;
2017-10-15 22:56:46 +08:00

24 lines
444 B
C

#ifndef COMPLETION_H_
#define COMPLETION_H_
#include <rtthread.h>
/**
* Completion
*/
struct rt_completion
{
rt_uint32_t flag;
/* suspended list */
rt_list_t suspended_list;
};
void rt_completion_init(struct rt_completion *completion);
rt_err_t rt_completion_wait(struct rt_completion *completion,
rt_int32_t timeout);
void rt_completion_done(struct rt_completion *completion);
#endif