From 4aa9e484f6b674b1fa112a3dd68349f2eba74945 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Tue, 21 May 2019 21:46:02 +0000 Subject: [PATCH] stm32g0: flash: drop redundant docs Functions that are already documented in the top level common api.h file won't add any more documentation from later .c files. Keep docs for part specifics, in the .h files where they're accessible to IDEs and also the documentation generation, and drop all (including the redundant ones) from the .c file. --- include/libopencm3/stm32/g0/flash.h | 6 ++++++ lib/stm32/g0/flash.c | 8 -------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/include/libopencm3/stm32/g0/flash.h b/include/libopencm3/stm32/g0/flash.h index d79f891b..cc667d9c 100644 --- a/include/libopencm3/stm32/g0/flash.h +++ b/include/libopencm3/stm32/g0/flash.h @@ -178,13 +178,19 @@ BEGIN_DECLS +/** Enable instruction cache */ void flash_icache_enable(void); +/** Disable instruction cache */ void flash_icache_disable(void); +/** Reset instruction cache */ void flash_icache_reset(void); +/** Unlock program memory */ void flash_unlock_progmem(void); +/** lock program memory */ void flash_lock_progmem(void); +/** Lock Option Byte Access */ void flash_lock_option_bytes(void); END_DECLS diff --git a/lib/stm32/g0/flash.c b/lib/stm32/g0/flash.c index 78e4d7d8..3356fc9d 100644 --- a/lib/stm32/g0/flash.c +++ b/lib/stm32/g0/flash.c @@ -30,51 +30,43 @@ #include -/* @brief Enable instruction cache */ void flash_icache_enable(void) { FLASH_ACR |= FLASH_ACR_ICEN; } -/* @brief Disable instruction cache */ void flash_icache_disable(void) { FLASH_ACR &= ~FLASH_ACR_ICEN; } -/* @brief Reset instruction cache */ void flash_icache_reset(void) { FLASH_ACR |= FLASH_ACR_ICRST; } -/* @brief Unlock program memory */ void flash_unlock_progmem(void) { FLASH_KEYR = FLASH_KEYR_KEY1; FLASH_KEYR = FLASH_KEYR_KEY2; } -/* @brief lock program memory */ void flash_lock_progmem(void) { FLASH_CR |= FLASH_CR_LOCK; } -/* @brief Lock Option Byte Access */ void flash_lock_option_bytes(void) { FLASH_CR |= FLASH_CR_OPTLOCK; } -/* @brief Unlock all segments of flash */ void flash_unlock(void) { flash_unlock_progmem(); flash_unlock_option_bytes(); } -/* @brief Lock all segments of flash */ void flash_lock(void) { flash_lock_option_bytes();