Skip to content

Commit

Permalink
fixup! cpu/stm32-common: refactor flashpage driver
Browse files Browse the repository at this point in the history
  • Loading branch information
aabadie committed May 4, 2018
1 parent 897bb36 commit 90c0963
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cpu/stm32_common/periph/flashpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void flashpage_write_raw(void *target_addr, const void *data, size_t len)
stmclk_enable_hsi();
#endif

DEBUG("[flashpage] write: now writing the data\n");
DEBUG("[flashpage_raw] write: now writing the data\n");
#if !(defined(CPU_FAM_STM32L0) || defined(CPU_FAM_STM32L1))
/* set PG bit and program page to flash */
CNTRL_REG |= FLASH_CR_PG;
Expand All @@ -166,7 +166,7 @@ void flashpage_write_raw(void *target_addr, const void *data, size_t len)

/* clear program bit again */
CNTRL_REG &= ~(FLASH_CR_PG);
DEBUG("[flashpage] write: done writing data\n");
DEBUG("[flashpage_raw] write: done writing data\n");

#if !(defined(CPU_FAM_STM32L0) || defined(CPU_FAM_STM32L1))
/* restore the HSI state */
Expand All @@ -193,7 +193,7 @@ void flashpage_write(int page, const void *data)
uint16_t *page_addr = flashpage_addr(page);
#endif

DEBUG("[flashpage_raw] unlocking the flash module\n");
DEBUG("[flashpage] unlocking the flash module\n");
_unlock();

/* ERASE sequence */
Expand All @@ -204,6 +204,6 @@ void flashpage_write(int page, const void *data)
flashpage_write_raw(page_addr, data, FLASHPAGE_SIZE);
}

DEBUG("flashpage_raw] now locking the flash module again\n");
DEBUG("flashpage] now locking the flash module again\n");
_lock();
}

0 comments on commit 90c0963

Please sign in to comment.