Skip to content

Commit 37ac78a

Browse files
committed
InternalStorageRenesas - smaller flash usage
1 parent f296201 commit 37ac78a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/InternalStorageRenesas.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ extern "C" {
2626
#include "utility/r_flash_lp_cf.h"
2727
}
2828

29-
const flash_api_t& flash = g_flash_on_flash_lp;
3029
static flash_lp_instance_ctrl_t flashCtrl;
3130
static flash_cfg_t flashCfg;
3231

@@ -97,7 +96,7 @@ int InternalStorageRenesasClass::open(int length) {
9796
flashWriteAddress = storageStartAddress;
9897
writeIndex = 0;
9998

100-
fsp_err_t rv = flash.open(&flashCtrl, &flashCfg);
99+
fsp_err_t rv = R_FLASH_LP_Open(&flashCtrl, &flashCfg);
101100
if (rv != FSP_SUCCESS)
102101
return 0;
103102

@@ -130,11 +129,11 @@ void InternalStorageRenesasClass::close() {
130129
while (writeIndex) {
131130
write(0xff);
132131
}
133-
flash.close(&flashCtrl);
132+
R_FLASH_LP_Close(&flashCtrl);
134133
}
135134

136135
void InternalStorageRenesasClass::apply() {
137-
fsp_err_t rv = flash.open(&flashCtrl, &flashCfg);
136+
fsp_err_t rv = R_FLASH_LP_Open(&flashCtrl, &flashCfg);
138137
if (rv != FSP_SUCCESS)
139138
return;
140139
__disable_irq();

0 commit comments

Comments
 (0)