From 0771a8d2466fb418b566846cfd165480760fd9ce Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Thu, 1 Aug 2019 21:18:36 -0400 Subject: Minor reorg. --- usbh/src/pipe.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'usbh/src/pipe.rs') diff --git a/usbh/src/pipe.rs b/usbh/src/pipe.rs index 537eba0..abdba2a 100644 --- a/usbh/src/pipe.rs +++ b/usbh/src/pipe.rs @@ -308,19 +308,6 @@ impl Pipe<'_, '_> { Ok(bytes_sent) } - pub(crate) fn dtgl_set(&mut self) { - self.regs.statusset.write(|w| w.dtgl().set_bit()); - } - - pub(crate) fn dtgl_clear(&mut self) { - self.regs.statusclr.write(|w| unsafe { - // No function for this. FIXME: need to patch the SVD for - // PSTATUSCLR.DTGL at bit0. No? This is in the SVD, but - // not the rust output. - w.bits(1) - }); - } - pub(crate) fn dtgl(&mut self, ep: &mut Endpoint, token: PToken) { // TODO: this makes no sense to me, and docs are unclear. If // the status bit is set, set it again? if it's clear then @@ -345,6 +332,19 @@ impl Pipe<'_, '_> { } } + pub(crate) fn dtgl_set(&mut self) { + self.regs.statusset.write(|w| w.dtgl().set_bit()); + } + + pub(crate) fn dtgl_clear(&mut self) { + self.regs.statusclr.write(|w| unsafe { + // No function for this. FIXME: need to patch the SVD for + // PSTATUSCLR.DTGL at bit0. No? This is in the SVD, but + // not the rust output. + w.bits(1) + }); + } + // This is the only function that calls `millis`. If we can make // this just take the current timestamp, we can make this // non-blocking. -- cgit v1.2.3