diff options
author | Michael Hope <michael.hope@linaro.org> | 2010-09-29 20:45:57 +1300 |
---|---|---|
committer | Michael Hope <michael.hope@linaro.org> | 2010-09-29 20:45:57 +1300 |
commit | 6fcd4cd306dbecf56f5b0b506a3c23762d1219fa (patch) | |
tree | 467125eca5a2e6706001cad8e09bc475e58a12d9 /libmaple/flash.c | |
parent | 368e4fc1662c2594b2a0908900713a2555a3ed8e (diff) | |
parent | adde11b099ff5dad176e410279d21feac39d2c7e (diff) | |
download | librambutan-6fcd4cd306dbecf56f5b0b506a3c23762d1219fa.tar.gz librambutan-6fcd4cd306dbecf56f5b0b506a3c23762d1219fa.zip |
Merge remote branch 'upstream/master'
Diffstat (limited to 'libmaple/flash.c')
-rw-r--r-- | libmaple/flash.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/libmaple/flash.c b/libmaple/flash.c index 828f938..1d7bfa6 100644 --- a/libmaple/flash.c +++ b/libmaple/flash.c @@ -1,4 +1,4 @@ -/* ***************************************************************************** +/****************************************************************************** * The MIT License * * Copyright (c) 2010 Perry Hung. @@ -20,13 +20,12 @@ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. - * ****************************************************************************/ + *****************************************************************************/ /** - * @brief flash peripheral management functions + * @brief flash peripheral management functions */ - #include "libmaple.h" #include "flash.h" @@ -48,23 +47,22 @@ * @brief turn on the hardware prefetcher */ void flash_enable_prefetch(void) { - uint32 val = FLASH_READ_ACR(); + uint32 val = FLASH_READ_ACR(); - val |= ACR_PRFTBE_ENABLE; + val |= ACR_PRFTBE_ENABLE; - FLASH_WRITE_ACR(val); + FLASH_WRITE_ACR(val); } - /** * @brief set flash wait states * @param number of wait states */ void flash_set_latency(uint32 wait_states) { - uint32 val = FLASH_READ_ACR(); + uint32 val = FLASH_READ_ACR(); - val &= ~ACR_LATENCY; - val |= wait_states; + val &= ~ACR_LATENCY; + val |= wait_states; - FLASH_WRITE_ACR(val); + FLASH_WRITE_ACR(val); } |