From 113806e51bbfdeb4ed4540e9d82974fc3108209c Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Thu, 21 Sep 2017 16:17:39 +0200 Subject: [PATCH] Update WINC1500 FatFS code --- src/winc1500/src/nm_bsp.c | 2 +- src/winc1500/src/programmer.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/winc1500/src/nm_bsp.c b/src/winc1500/src/nm_bsp.c index 5f29283d8..100cf3bc1 100644 --- a/src/winc1500/src/nm_bsp.c +++ b/src/winc1500/src/nm_bsp.c @@ -14,7 +14,7 @@ static const pin_obj_t *PIN_CS = &(WINC_PIN_CS); static const pin_obj_t *PIN_EN = &(WINC_PIN_EN); static const pin_obj_t *PIN_RST = &(WINC_PIN_RST); static const pin_obj_t *PIN_IRQ = &(WINC_PIN_IRQ); -static const mp_obj_fun_builtin_t irq_callback_obj; +static const mp_obj_fun_builtin_fixed_t irq_callback_obj; /* * @fn nm_bsp_init diff --git a/src/winc1500/src/programmer.c b/src/winc1500/src/programmer.c index 5b3b73a79..0beffe7a8 100644 --- a/src/winc1500/src/programmer.c +++ b/src/winc1500/src/programmer.c @@ -1,4 +1,4 @@ -#include +#include #include #include "fb_alloc.h" @@ -28,7 +28,7 @@ int burn_firmware() int ret = M2M_ERR_FAIL; uint8_t *buf = fb_alloc(FLASH_SECTOR_SZ); - if (f_open(&fp, FW_PATH, FA_READ|FA_OPEN_EXISTING) != FR_OK) { + if (f_open_helper(&fp, FW_PATH, FA_READ|FA_OPEN_EXISTING) != FR_OK) { goto error; } @@ -75,7 +75,7 @@ int verify_firmware() uint8_t *file_buf = fb_alloc(FLASH_SECTOR_SZ); uint8_t *flash_buf = fb_alloc(FLASH_SECTOR_SZ); - if (f_open(&fp, FW_PATH, FA_READ|FA_OPEN_EXISTING) != FR_OK) { + if (f_open_helper(&fp, FW_PATH, FA_READ|FA_OPEN_EXISTING) != FR_OK) { goto error; } @@ -129,7 +129,7 @@ int dump_firmware() int ret = M2M_ERR_FAIL; uint8_t *flash_buf = fb_alloc(FLASH_SECTOR_SZ); - if (f_open(&fp, FW_DUMP_PATH, FA_WRITE | FA_CREATE_ALWAYS) != FR_OK) { + if (f_open_helper(&fp, FW_DUMP_PATH, FA_WRITE | FA_CREATE_ALWAYS) != FR_OK) { goto error; }