aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/microblaze/usrp2p/bootloader/init_bootloader.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/microblaze/usrp2p/bootloader/init_bootloader.c')
-rw-r--r--firmware/microblaze/usrp2p/bootloader/init_bootloader.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/firmware/microblaze/usrp2p/bootloader/init_bootloader.c b/firmware/microblaze/usrp2p/bootloader/init_bootloader.c
index e6c808f37..2bbbd405e 100644
--- a/firmware/microblaze/usrp2p/bootloader/init_bootloader.c
+++ b/firmware/microblaze/usrp2p/bootloader/init_bootloader.c
@@ -18,8 +18,6 @@
#include <i2c.h>
#include "usrp2/fw_common.h"
-#define SAFE_FLAG_LOCATION 247
-
bool find_safe_booted_flag(void);
void set_safe_booted_flag(bool flag);
@@ -32,13 +30,13 @@ void pic_interrupt_handler()
bool find_safe_booted_flag(void) {
unsigned char flag_byte;
- eeprom_read(USRP2_I2C_ADDR_MBOARD, SAFE_FLAG_LOCATION, &flag_byte, 1);
+ eeprom_read(USRP2_I2C_ADDR_MBOARD, USRP2_EE_MBOARD_BOOTLOADER_FLAGS, &flag_byte, 1);
return (flag_byte == 0x5E);
}
void set_safe_booted_flag(bool flag) {
unsigned char flag_byte = flag ? 0x5E : 0xDC;
- eeprom_write(USRP2_I2C_ADDR_MBOARD, SAFE_FLAG_LOCATION, &flag_byte, 1);
+ eeprom_write(USRP2_I2C_ADDR_MBOARD, USRP2_EE_MBOARD_BOOTLOADER_FLAGS, &flag_byte, 1);
}