stm32: Update HAL macro and constant names to use newer versions.

Newer versions of the HAL use names which are cleaner and more
self-consistent amongst the HAL itself.  This patch switches to use those
names in most places so it is easier to update the HAL in the future.
This commit is contained in:
Damien George
2018-02-13 15:37:35 +11:00
parent 8e1cb58a23
commit 3eb0694b97
18 changed files with 140 additions and 140 deletions

View File

@@ -373,7 +373,7 @@ static void dma_enable_clock(dma_id_t dma_id) {
if (dma_id < NSTREAMS_PER_CONTROLLER) {
if (((old_enable_mask & DMA1_ENABLE_MASK) == 0) && !DMA1_IS_CLK_ENABLED()) {
__DMA1_CLK_ENABLE();
__HAL_RCC_DMA1_CLK_ENABLE();
// We just turned on the clock. This means that anything stored
// in dma_last_channel (for DMA1) needs to be invalidated.
@@ -384,7 +384,7 @@ static void dma_enable_clock(dma_id_t dma_id) {
}
} else {
if (((old_enable_mask & DMA2_ENABLE_MASK) == 0) && !DMA2_IS_CLK_ENABLED()) {
__DMA2_CLK_ENABLE();
__HAL_RCC_DMA2_CLK_ENABLE();
// We just turned on the clock. This means that anything stored
// in dma_last_channel (for DMA1) needs to be invalidated.
@@ -494,9 +494,9 @@ void dma_idle_handler(int tick) {
// Now we'll really disable the clock.
dma_idle.counter[controller] = 0;
if (controller == 0) {
__DMA1_CLK_DISABLE();
__HAL_RCC_DMA1_CLK_DISABLE();
} else {
__DMA2_CLK_DISABLE();
__HAL_RCC_DMA2_CLK_DISABLE();
}
} else {
// Something is still active, but the counter never got