]> git.zerfleddert.de Git - proxmark3-svn/blame - client/flash.h
Added mifarePlus.lua script for communication with Mifare Plus. (#593)
[proxmark3-svn] / client / flash.h
CommitLineData
a553f267 1//-----------------------------------------------------------------------------
2// This code is licensed to you under the terms of the GNU GPL, version 2 or,
3// at your option, any later version. See the LICENSE.txt file for the text of
4// the license.
5//-----------------------------------------------------------------------------
6// Flashing utility functions
7//-----------------------------------------------------------------------------
8
b961ef03 9#ifndef __FLASH_H__
10#define __FLASH_H__
11
91c38cf7 12#include <stdint.h>
8fe1a992 13#include "elf.h"
f5ecd97b 14#include "uart.h"
91c38cf7 15
8fe1a992 16typedef struct {
17 void *data;
18 uint32_t start;
19 uint32_t length;
20} flash_seg_t;
6e4d4ee6 21
8fe1a992 22typedef struct {
23 const char *filename;
24 int can_write_bl;
25 int num_segs;
26 flash_seg_t *segments;
27} flash_file_t;
6e4d4ee6 28
8fe1a992 29int flash_load(flash_file_t *ctx, const char *name, int can_write_bl);
f5ecd97b 30int flash_start_flashing(int enable_bl_writes, char *serial_port_name);
8fe1a992 31int flash_write(flash_file_t *ctx);
32void flash_free(flash_file_t *ctx);
33int flash_stop_flashing(void);
f5ecd97b 34void CloseProxmark(const char *serial_port_name);
61aaee35 35bool OpenProxmark(size_t i, const char *serial_port_name);
b961ef03 36
f5ecd97b 37extern serial_port sp;
b961ef03 38#endif
39
Impressum, Datenschutz