aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/bkp.c
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-03-07 13:11:54 -0500
committerMarti Bolivar <mbolivar@leaflabs.com>2011-03-11 16:24:44 -0500
commitc8da1c3b7b6eb450138a00af9bbbee607f596837 (patch)
tree207777355d41dc8947d94665ef9a8bae8982805a /libmaple/bkp.c
parent5b07707cdaa6268e1a984727bb907a7b10e8ada7 (diff)
downloadlibrambutan-c8da1c3b7b6eb450138a00af9bbbee607f596837.tar.gz
librambutan-c8da1c3b7b6eb450138a00af9bbbee607f596837.zip
[WIP] GPIO refactor: seems ok, ready for review
Diffstat (limited to 'libmaple/bkp.c')
-rw-r--r--libmaple/bkp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libmaple/bkp.c b/libmaple/bkp.c
index ed107d8..b152069 100644
--- a/libmaple/bkp.c
+++ b/libmaple/bkp.c
@@ -27,7 +27,7 @@
#include "bkp.h"
#include "pwr.h"
#include "rcc.h"
-#include "util.h"
+#include "bitband.h"
static inline __io uint32* data_register(uint8 reg);
@@ -57,14 +57,14 @@ void bkp_init(void) {
* @see bkp_init()
*/
void bkp_enable_writes(void) {
- __write(BITBAND_PERI(&(PWR_BASE->CR), PWR_CR_DBP), 1);
+ *bb_peripv(&PWR_BASE->CR, PWR_CR_DBP) = 1;
}
/**
* Disable write access to the backup registers.
*/
void bkp_disable_writes(void) {
- __write(BITBAND_PERI(&(PWR_BASE->CR), PWR_CR_DBP), 0);
+ *bb_peripv(&PWR_BASE->CR, PWR_CR_DBP) = 0;
}
/**