mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-12 18:25:07 +08:00
chg: OR in registry changes when setting LOW or HIGH instead of assigning. A nicer behavior not messing with previous set bits.
This commit is contained in:
parent
e5e990fd4f
commit
f4ef31c4be
1 changed files with 5 additions and 2 deletions
|
@ -53,8 +53,11 @@
|
|||
#define UDP_CSR_BYTES_RECEIVED(x) (((x) >> 16) & 0x7ff)
|
||||
//**************************************************************
|
||||
|
||||
#define LOW(x) AT91C_BASE_PIOA->PIO_CODR = (x)
|
||||
#define HIGH(x) AT91C_BASE_PIOA->PIO_SODR = (x)
|
||||
|
||||
|
||||
#define LOW(x) AT91C_BASE_PIOA->PIO_CODR |= (x)
|
||||
#define HIGH(x) AT91C_BASE_PIOA->PIO_SODR |= (x)
|
||||
|
||||
#define GETBIT(x) (AT91C_BASE_PIOA->PIO_ODSR & (x)) ? 1:0
|
||||
#define SETBIT(x, y) (y) ? (HIGH(x)):(LOW(x))
|
||||
#define INVBIT(x) SETBIT((x), !(GETBIT(x)))
|
||||
|
|
Loading…
Reference in a new issue