mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-06 21:21:17 -07:00
* change variable 'offline' from global to static * change variable 'FlushAfterWrite' from global to static * remove unused global variable 'current_command' * WaitForResponseTimeoutW(CMD_UNKNOWN, ...) waits for any command * #include "printf.h" or <stdio.h> in iso15693tools.c to define sprintf() * and some minor changes/comments
39 lines
1.1 KiB
C
39 lines
1.1 KiB
C
//-----------------------------------------------------------------------------
|
|
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
|
|
// at your option, any later version. See the LICENSE.txt file for the text of
|
|
// the license.
|
|
//-----------------------------------------------------------------------------
|
|
// Flashing utility functions
|
|
//-----------------------------------------------------------------------------
|
|
|
|
#ifndef __FLASH_H__
|
|
#define __FLASH_H__
|
|
|
|
#include <stdint.h>
|
|
#include "elf.h"
|
|
#include "uart.h"
|
|
|
|
typedef struct {
|
|
void *data;
|
|
uint32_t start;
|
|
uint32_t length;
|
|
} flash_seg_t;
|
|
|
|
typedef struct {
|
|
const char *filename;
|
|
int can_write_bl;
|
|
int num_segs;
|
|
flash_seg_t *segments;
|
|
} flash_file_t;
|
|
|
|
int flash_load(flash_file_t *ctx, const char *name, int can_write_bl);
|
|
int flash_start_flashing(int enable_bl_writes, char *serial_port_name);
|
|
int flash_write(flash_file_t *ctx);
|
|
void flash_free(flash_file_t *ctx);
|
|
int flash_stop_flashing(void);
|
|
void CloseProxmark(const char *serial_port_name);
|
|
bool OpenProxmark(size_t i, const char *serial_port_name);
|
|
|
|
extern serial_port sp;
|
|
#endif
|
|
|