forked from sergev/pic32prog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtarget.h
34 lines (30 loc) · 1.2 KB
/
target.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
* Generic debug interface to a target microcontroller.
*
* Copyright (C) 2011-2013 Serge Vakulenko
*
* This file is part of PIC32PROG project, which is distributed
* under the terms of the GNU General Public License (GPL).
* See the accompanying file "COPYING" for more details.
*/
typedef struct _target_t target_t;
target_t *target_open (const char *port, int baud_rate);
void target_close (target_t *t, int power_on);
void target_use_executive (target_t *t);
unsigned target_idcode (target_t *t);
const char *target_cpu_name (target_t *t);
unsigned target_flash_width (target_t *t);
unsigned target_flash_bytes (target_t *t);
unsigned target_boot_bytes (target_t *t);
unsigned target_block_size (target_t *t);
unsigned target_devcfg_offset (target_t *t);
void target_print_devcfg (target_t *t);
void target_read_block (target_t *t, unsigned addr,
unsigned nwords, unsigned *data);
void target_verify_block (target_t *t, unsigned addr,
unsigned nwords, unsigned *data);
int target_erase (target_t *t);
void target_program_block (target_t *t, unsigned addr,
unsigned nwords, unsigned *data);
void target_program_devcfg (target_t *t, unsigned devcfg0,
unsigned devcfg1, unsigned devcfg2, unsigned devcfg3);