Files
@ faf3d701dcf0
Branch filter:
Location: HydroBot/hydrobot-sharedlibs/inc/flash.h - annotation
faf3d701dcf0
608 B
text/plain
Added LightSense module
a10142102188 a10142102188 a10142102188 a10142102188 a10142102188 a10142102188 a10142102188 a10142102188 a10142102188 a10142102188 57f7cc1705c1 a10142102188 a10142102188 a10142102188 a10142102188 a10142102188 a10142102188 57f7cc1705c1 a10142102188 a10142102188 a10142102188 a10142102188 a10142102188 a10142102188 a10142102188 a10142102188 a10142102188 a10142102188 a10142102188 | #ifndef _FLASH_H_
#define _FLASH_H_
#include "stm32f0xx_hal.h"
#include "stm32f0xx_hal_flash.h"
#include "config.h"
#define PAGE_SIZE ((uint16_t)0x400)
#define END_ADDR 0x08007FFF
typedef union
{
struct {
uint32_t can_id;
uint16_t data_rate;
uint8_t led_brightness;
flash_user_vars_t user;
} val;
uint16_t data[128];
} flash_settings_t;
void flash_save(flash_settings_t* tosave);
void flash_restore(flash_settings_t* tosave);
void flash_load_defaults(flash_settings_t* torestore);
void flash_erase(void);
#endif /* _FLASH_H_ */
|