diff options
author | Brian Cully <bjc@kublai.com> | 2019-08-01 21:18:36 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2019-08-01 21:18:36 -0400 |
commit | 0771a8d2466fb418b566846cfd165480760fd9ce (patch) | |
tree | 01bf9f7e4e1e389c536f03a4fdbecaf24c9bb0e8 /usbh | |
parent | f8c64737d196f79364f2eb64145d40adabc30aff (diff) | |
download | samd21-demo-0771a8d2466fb418b566846cfd165480760fd9ce.tar.gz samd21-demo-0771a8d2466fb418b566846cfd165480760fd9ce.zip |
Minor reorg.
Diffstat (limited to 'usbh')
-rw-r--r-- | usbh/src/pipe.rs | 26 |
1 files changed, 13 insertions, 13 deletions
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. |