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.
This commit is contained in:
parent
709d98e0a8
commit
4aa9e484f6
@ -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
|
||||
|
@ -30,51 +30,43 @@
|
||||
|
||||
#include <libopencm3/stm32/flash.h>
|
||||
|
||||
/* @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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user