Skip to content

Commit

Permalink
cpu/stm32_common/periph: cleanup flashpage
Browse files Browse the repository at this point in the history
- improve debug messages
- fix missing space before comment
- use a comment instead of debug message (the same message is displayed by the function called after)
  • Loading branch information
aabadie committed May 16, 2018
1 parent af829e2 commit 9c09a21
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cpu/stm32_common/periph/flashpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static void _erase_page(void *page_addr)
stmclk_enable_hsi();
#endif

/* unlock the flash module */
/* unlock the flash module */
_unlock();

/* make sure no flash operation is ongoing */
Expand Down Expand Up @@ -152,10 +152,10 @@ void flashpage_write_raw(void *target_addr, const void *data, size_t len)
stmclk_enable_hsi();
#endif

DEBUG("[flashpage_raw] unlocking the flash module\n");
/* unlock the flash module */
_unlock();

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 @@ -168,9 +168,9 @@ 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");

DEBUG("flashpage_raw] now locking the flash module again\n");
/* lock the flash module again */
_lock();

#if !(defined(CPU_FAM_STM32L0) || defined(CPU_FAM_STM32L1))
Expand Down

0 comments on commit 9c09a21

Please sign in to comment.