mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Update WINC1500 FatFS code
This commit is contained in:
parent
e43bd3223b
commit
113806e51b
@ -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_EN = &(WINC_PIN_EN);
|
||||||
static const pin_obj_t *PIN_RST = &(WINC_PIN_RST);
|
static const pin_obj_t *PIN_RST = &(WINC_PIN_RST);
|
||||||
static const pin_obj_t *PIN_IRQ = &(WINC_PIN_IRQ);
|
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
|
* @fn nm_bsp_init
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include <ff.h>
|
#include <ff_wrapper.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "fb_alloc.h"
|
#include "fb_alloc.h"
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ int burn_firmware()
|
|||||||
int ret = M2M_ERR_FAIL;
|
int ret = M2M_ERR_FAIL;
|
||||||
uint8_t *buf = fb_alloc(FLASH_SECTOR_SZ);
|
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;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ int verify_firmware()
|
|||||||
uint8_t *file_buf = fb_alloc(FLASH_SECTOR_SZ);
|
uint8_t *file_buf = fb_alloc(FLASH_SECTOR_SZ);
|
||||||
uint8_t *flash_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;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ int dump_firmware()
|
|||||||
int ret = M2M_ERR_FAIL;
|
int ret = M2M_ERR_FAIL;
|
||||||
uint8_t *flash_buf = fb_alloc(FLASH_SECTOR_SZ);
|
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;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user