Remove tabs and reformat
This commit is contained in:
parent
c3413ff0f4
commit
2b3534ea8a
12
src/avr.c
12
src/avr.c
|
@ -145,8 +145,8 @@ int avr_tpi_program_enable(const PROGRAMMER *pgm, const AVRPART *p, unsigned cha
|
||||||
|
|
||||||
/* TPI: setup NVMCMD register and pointer register (PR) for read/write/erase */
|
/* TPI: setup NVMCMD register and pointer register (PR) for read/write/erase */
|
||||||
static int avr_tpi_setup_rw(const PROGRAMMER *pgm, const AVRMEM *mem,
|
static int avr_tpi_setup_rw(const PROGRAMMER *pgm, const AVRMEM *mem,
|
||||||
unsigned long addr, unsigned char nvmcmd)
|
unsigned long addr, unsigned char nvmcmd) {
|
||||||
{
|
|
||||||
unsigned char cmd[4];
|
unsigned char cmd[4];
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
@ -444,9 +444,7 @@ int avr_read_mem(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *mem, con
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i=0; i < mem->size; i++) {
|
for (i=0; i < mem->size; i++) {
|
||||||
if (vmem == NULL ||
|
if (vmem == NULL || (vmem->tags[i] & TAG_ALLOCATED) != 0) {
|
||||||
(vmem->tags[i] & TAG_ALLOCATED) != 0)
|
|
||||||
{
|
|
||||||
rc = pgm->read_byte(pgm, p, mem, i, mem->buf + i);
|
rc = pgm->read_byte(pgm, p, mem, i, mem->buf + i);
|
||||||
if (rc != LIBAVRDUDE_SUCCESS) {
|
if (rc != LIBAVRDUDE_SUCCESS) {
|
||||||
pmsg_error("unable to read byte at address 0x%04lx\n", i);
|
pmsg_error("unable to read byte at address 0x%04lx\n", i);
|
||||||
|
@ -707,9 +705,7 @@ int avr_write_byte_default(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM
|
||||||
gettimeofday (&tv, NULL);
|
gettimeofday (&tv, NULL);
|
||||||
start_time = (tv.tv_sec * 1000000) + tv.tv_usec;
|
start_time = (tv.tv_sec * 1000000) + tv.tv_usec;
|
||||||
do {
|
do {
|
||||||
/*
|
// Do polling, but timeout after max_write_delay
|
||||||
* Do polling, but timeout after max_write_delay.
|
|
||||||
*/
|
|
||||||
rc = pgm->read_byte(pgm, p, mem, addr, &r);
|
rc = pgm->read_byte(pgm, p, mem, addr, &r);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
pgm->pgm_led(pgm, OFF);
|
pgm->pgm_led(pgm, OFF);
|
||||||
|
|
Loading…
Reference in New Issue