Comms refactor (prerequisite of libproxmark work) (#371)

* Refactor the comms code only from PR#346, without comms_globals.h.
* OSX: Add note for example serial port
This commit is contained in:
Michael Farrell 2017-10-27 06:54:27 +11:00 committed by pwpiwi
parent e17660d5f7
commit afdcb8c159
19 changed files with 540 additions and 334 deletions

View file

@ -11,6 +11,7 @@
#include <stdint.h>
#include "elf.h"
#include "comms.h"
typedef struct {
void *data;
@ -26,10 +27,12 @@ typedef struct {
} 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_start_flashing(receiver_arg* conn, 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(receiver_arg* conn, char* serial_port_name);
bool OpenProxmark(char* serial_port_name);
#endif