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:
あく
2020-12-18 23:15:29 +03:00
committed by GitHub
parent 3ba1738acd
commit 73ecc7cde6
17 changed files with 383 additions and 81 deletions

View 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();
}