cargo fmt

This commit is contained in:
Joshua Salzedo
2021-09-28 19:35:07 -07:00
committed by Dario Nieuwenhuis
parent 3411039cb9
commit 93e047ede2
2 changed files with 8 additions and 11 deletions

View File

@ -134,7 +134,7 @@ unsafe fn _stop(dma: &pac::dma::Dma, ch: u8) {
}
/// Gets the running status of the channel
unsafe fn _is_stopped(dma: &pac::dma::Dma, ch: u8) -> bool{
unsafe fn _is_stopped(dma: &pac::dma::Dma, ch: u8) -> bool {
// get a handle on the channel itself
let ch = dma.st(ch as _);
@ -144,7 +144,7 @@ unsafe fn _is_stopped(dma: &pac::dma::Dma, ch: u8) -> bool{
/// Gets the total remaining transfers for the channel
/// Note: this will be zero for transfers that completed without cancellation.
unsafe fn _get_remaining_transfers(dma: &pac::dma::Dma, ch: u8) -> u16{
unsafe fn _get_remaining_transfers(dma: &pac::dma::Dma, ch: u8) -> u16 {
// get a handle on the channel itself
let ch = dma.st(ch as _);
// read the remaining transfer count. If this is zero, the transfer completed fully.
@ -152,13 +152,11 @@ unsafe fn _get_remaining_transfers(dma: &pac::dma::Dma, ch: u8) -> u16{
}
/// Sets the waker for the specified DMA channel
unsafe fn _set_waker(dma: &pac::dma::Dma, state_number: u8, waker: &Waker){
unsafe fn _set_waker(dma: &pac::dma::Dma, state_number: u8, waker: &Waker) {
let n = state_number as usize;
STATE.ch_wakers[n].register(waker);
}
macro_rules! dma_num {
(DMA1) => {
0