Skip to content

Commit

Permalink
Remove bmequ() macro
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanrueger committed Aug 23, 2024
1 parent a6e927a commit 5c16bee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/avr.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,6 @@ int avr_write_byte_default(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM
}

int bm = avr_mem_bitmask(p, mem, addr);
#define bmequ(a, b) (((a) & bm) == ((b) & bm))

if(!mem->paged && (p->flags & AVRPART_IS_AT90S1200) == 0) {
/*
Expand All @@ -752,7 +751,7 @@ int avr_write_byte_default(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM
// Read operation is not support on this memory
} else {
readok = 1;
if(bmequ(b, data))
if((b & bm) == (data & bm))
goto success;
}
}
Expand Down Expand Up @@ -827,7 +826,7 @@ int avr_write_byte_default(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM

// At this point we either have a valid readback or the max_write_delay is expired

if(bmequ(r, data)) {
if((r & bm) == (data & bm)) {
ready = 1;
} else if(mem->pwroff_after_write) {
/*
Expand Down

0 comments on commit 5c16bee

Please sign in to comment.