Rename Irukagotchi to Dolphin. Add basic game state structures. (#268)
* Rename Irukagotchi to Dolphin. Add basic game state structures. * Dolphin: state, counters, api. BT: shared access to flash. Flash: write api. * add fake -1 deeds, example of changing icounter Co-authored-by: coreglitch <mail@s3f.ru>
This commit is contained in:
15
firmware/targets/f4/api-hal/api-hal-flash.c
Normal file
15
firmware/targets/f4/api-hal/api-hal-flash.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <api-hal-flash.h>
|
||||
#include <api-hal-bt.h>
|
||||
#include <stm32wbxx.h>
|
||||
|
||||
void api_hal_flash_write_dword(size_t address, uint64_t data) {
|
||||
api_hal_bt_lock_flash();
|
||||
HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, address, data);
|
||||
api_hal_bt_unlock_flash();
|
||||
}
|
||||
|
||||
void api_hal_flash_write_row(size_t address, size_t source_address) {
|
||||
api_hal_bt_lock_flash();
|
||||
HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, address, source_address);
|
||||
api_hal_bt_unlock_flash();
|
||||
}
|
Reference in New Issue
Block a user