rsiot/drivers_i2c/pm_rq8/tasks/output.rs
1use crate::{executor::CmpInOut, message::MsgDataBound};
2
3use super::{I2cResponse, TaskInput};
4
5pub struct Output<TMsg>
6where
7 TMsg: MsgDataBound,
8{
9 pub input: TaskInput<I2cResponse>,
10 pub output: CmpInOut<TMsg>,
11}
12
13impl<TMsg> Output<TMsg>
14where
15 TMsg: MsgDataBound,
16{
17 pub async fn spawn(mut self) -> super::Result<()> {
18 while let Some(_response) = self.input.recv().await {}
19 Err(super::Error::TaskOutput)
20 }
21}