MCPcopy Create free account
hub / github.com/ARMmbed/DAPLink / flash_decoder_close

Function flash_decoder_close

source/daplink/drag-n-drop/flash_decoder.c:356–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354}
355
356error_t flash_decoder_close(void)
357{
358 error_t status = ERROR_SUCCESS;
359 decoder_state_t prev_state = state;
360 flash_decoder_printf("flash_decoder_close()\r\n");
361
362 if (DECODER_STATE_CLOSED == state) {
363 util_assert(0);
364 return ERROR_INTERNAL;
365 }
366
367 state = DECODER_STATE_CLOSED;
368
369 if (flash_initialized) {
370 status = flash_manager_uninit();
371 flash_decoder_printf(" flash_manager_uninit ret %i\r\n", status);
372 }
373
374 if ((DECODER_STATE_DONE != prev_state) &&
375 (flash_type != FLASH_DECODER_TYPE_TARGET) &&
376 (status == ERROR_SUCCESS)) {
377 status = ERROR_IAP_UPDT_INCOMPLETE;
378 }
379
380 return status;
381}
382
383static bool flash_decoder_is_at_end(uint32_t addr, const uint8_t *data, uint32_t size)
384{

Callers 2

close_binFunction · 0.85
close_hexFunction · 0.85

Calls 1

flash_manager_uninitFunction · 0.85

Tested by

no test coverage detected