From c75c167c250e3b6b11bff3bec3d14ff03464fc66 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Sun, 10 Jan 2016 10:11:16 -0800 Subject: [PATCH] Rename GPDMA channel disable_force() to disable(). There was nothing particularly forceful about the disable_force() code. Whether it's a "forced" operation depends on what happens before and after (HALT and ACTIVE flags are involved in a smooth disabling of the channel). --- firmware/baseband/audio_dma.cpp | 4 ++-- firmware/baseband/baseband_dma.cpp | 2 +- firmware/baseband/rssi_dma.cpp | 2 +- firmware/baseband/touch_dma.cpp | 2 +- firmware/common/gpdma.cpp | 2 +- firmware/common/gpdma.hpp | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/firmware/baseband/audio_dma.cpp b/firmware/baseband/audio_dma.cpp index 6fa6439bc..60e85096e 100644 --- a/firmware/baseband/audio_dma.cpp +++ b/firmware/baseband/audio_dma.cpp @@ -208,8 +208,8 @@ void enable() { } void disable() { - gpdma_channel_i2s0_tx.disable_force(); - gpdma_channel_i2s0_rx.disable_force(); + gpdma_channel_i2s0_tx.disable(); + gpdma_channel_i2s0_rx.disable(); } buffer_t tx_empty_buffer() { diff --git a/firmware/baseband/baseband_dma.cpp b/firmware/baseband/baseband_dma.cpp index f3002b282..7467f5510 100644 --- a/firmware/baseband/baseband_dma.cpp +++ b/firmware/baseband/baseband_dma.cpp @@ -149,7 +149,7 @@ bool is_enabled() { } void disable() { - gpdma_channel_sgpio.disable_force(); + gpdma_channel_sgpio.disable(); } baseband::buffer_t wait_for_rx_buffer() { diff --git a/firmware/baseband/rssi_dma.cpp b/firmware/baseband/rssi_dma.cpp index 5b060604a..91f3b4965 100644 --- a/firmware/baseband/rssi_dma.cpp +++ b/firmware/baseband/rssi_dma.cpp @@ -157,7 +157,7 @@ bool is_enabled() { } void disable() { - gpdma_channel.disable_force(); + gpdma_channel.disable(); } rf::rssi::buffer_t wait_for_buffer() { diff --git a/firmware/baseband/touch_dma.cpp b/firmware/baseband/touch_dma.cpp index aa120ff30..ce66617a1 100644 --- a/firmware/baseband/touch_dma.cpp +++ b/firmware/baseband/touch_dma.cpp @@ -122,7 +122,7 @@ bool is_enabled() { } void disable() { - gpdma_channel.disable_force(); + gpdma_channel.disable(); } } /* namespace dma */ diff --git a/firmware/common/gpdma.cpp b/firmware/common/gpdma.cpp index cdd7a9a36..034a62481 100644 --- a/firmware/common/gpdma.cpp +++ b/firmware/common/gpdma.cpp @@ -54,7 +54,7 @@ void Channel::configure( const LLI& first_lli, const uint32_t config ) const { - disable_force(); + disable(); clear_interrupts(); LPC_GPDMA_Channel_Type* const channel = &LPC_GPDMA->CH[number]; diff --git a/firmware/common/gpdma.hpp b/firmware/common/gpdma.hpp index b97dde14a..c403569bd 100644 --- a/firmware/common/gpdma.hpp +++ b/firmware/common/gpdma.hpp @@ -313,7 +313,7 @@ public: return LPC_GPDMA->CH[number].CONFIG & (1U << 0); } - void disable_force() const { + void disable() const { LPC_GPDMA->CH[number].CONFIG &= ~(1U << 0); } @@ -349,7 +349,7 @@ public: void disable() const { for(const auto& channel : channels) { - channel.disable_force(); + channel.disable(); } LPC_GPDMA->CONFIG &= ~(1U << 0); }