modules: canopennode: Switch to FIXED_PARTITION_ macros
The commit switches flash area access from FLASH_AREA_ macros to FIXED_PARTITION_ macros and to usage of DTS node labels, to identify partitions, instead of label property. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit is contained in:
parent
25d47f876e
commit
f4398e1ad6
|
@ -189,7 +189,7 @@ static inline CO_SDO_abortCode_t canopen_program_cmd_clear(void)
|
|||
if (!IS_ENABLED(CONFIG_IMG_ERASE_PROGRESSIVELY)) {
|
||||
LOG_DBG("erasing flash area");
|
||||
|
||||
err = boot_erase_img_bank(FLASH_AREA_ID(image_1));
|
||||
err = boot_erase_img_bank(FIXED_PARTITION_ID(slot1_partition));
|
||||
if (err) {
|
||||
LOG_ERR("failed to erase image bank (err %d)", err);
|
||||
CO_errorReport(ctx.em, CO_EM_NON_VOLATILE_MEMORY,
|
||||
|
@ -344,9 +344,9 @@ static CO_SDO_abortCode_t canopen_odf_1f56(CO_ODF_arg_t *odf_arg)
|
|||
* started upon receiveing the next 'start' command.
|
||||
*/
|
||||
if (ctx.flash_written) {
|
||||
fa_id = FLASH_AREA_ID(image_1);
|
||||
fa_id = FIXED_PARTITION_ID(slot1_partition);
|
||||
} else {
|
||||
fa_id = FLASH_AREA_ID(image_0);
|
||||
fa_id = FIXED_PARTITION_ID(slot0_partition);
|
||||
}
|
||||
|
||||
err = boot_read_bank_header(fa_id, &header, sizeof(header));
|
||||
|
|
Loading…
Reference in New Issue