Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed consistency of pin inversion symbols #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conf/akafuino32a4.conf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ UART_REMAP = no
# UART RS485 Enable Output
UART_EN_PORT_NAME = C
UART_EN_PIN = 4
UART_EN_PIN_INV = 0
UART_EN_INV = 0

# FIFO
FIFO_DATA_PORT_NAME = C
Expand Down
2 changes: 1 addition & 1 deletion conf/arduino328p.conf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ UART_REMAP = no
# UART RS485 Enable Output
UART_EN_PORT_NAME = C
UART_EN_PIN = 4
UART_EN_PIN_INV = 0
UART_EN_INV = 0

# FIFO
FIFO_DATA_PORT_NAME = C
Expand Down
2 changes: 1 addition & 1 deletion conf/mongoose.conf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ UART_REMAP = no
# UART RS485 Enable Output
UART_EN_PORT_NAME = C
UART_EN_PIN = 4
UART_EN_PIN_INV = 0
UART_EN_INV = 0

# FIFO
FIFO_DATA_PORT_NAME = C
Expand Down
2 changes: 1 addition & 1 deletion conf/x32a4.conf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ UART_REMAP = no
# UART RS485 Enable Output
UART_EN_PORT_NAME = C
UART_EN_PIN = 4
UART_EN_PIN_INV = 0
UART_EN_INV = 0

# FIFO
FIFO_DATA_PORT_NAME = C
Expand Down
2 changes: 1 addition & 1 deletion conf/x32a4u.conf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ UART_REMAP = no
# UART RS485 Enable Output
UART_EN_PORT_NAME = C
UART_EN_PIN = 4
UART_EN_PIN_INV = 0
UART_EN_INV = 0

# FIFO
FIFO_DATA_PORT_NAME = C
Expand Down
2 changes: 1 addition & 1 deletion conf/x32e5.conf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ UART_REMAP = yes
# UART RS485 Enable Output
UART_EN_PORT_NAME = C
UART_EN_PIN = 4
UART_EN_PIN_INV = 0
UART_EN_INV = 0

# FIFO
FIFO_DATA_PORT_NAME = C
Expand Down
2 changes: 1 addition & 1 deletion conf/x64a3.conf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ UART_REMAP = no
# UART RS485 Enable Output
UART_EN_PORT_NAME = C
UART_EN_PIN = 4
UART_EN_PIN_INV = 0
UART_EN_INV = 0

# FIFO
FIFO_DATA_PORT_NAME = C
Expand Down
32 changes: 16 additions & 16 deletions xboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,23 +148,23 @@ int main(void)
#ifdef USE_LED
// Initialize LED pin
LED_PORT.DIRSET = (1 << LED_PIN);
#if LED_PIN_INV
#if LED_INV
LED_PORT.OUTCLR = (1 << LED_PIN);
#else
LED_PORT.OUTSET = (1 << LED_PIN);
#endif // LED_PIN_INV
#endif // LED_INV
#endif // USE_LED

#else // __AVR_XMEGA__

#ifdef USE_LED
// Initialize LED pin
LED_PORT_DDR |= (1 << LED_PIN);
#if LED_PIN_INV
#if LED_INV
LED_PORT &= ~(1 << LED_PIN);
#else
LED_PORT |= (1 << LED_PIN);
#endif // LED_PIN_INV
#endif // LED_INV
#endif // USE_LED

#endif // __AVR_XMEGA__
Expand Down Expand Up @@ -260,9 +260,9 @@ int main(void)
UART_EN_PORT.DIRSET = (1 << UART_EN_PIN);
#if UART_EN_INV
UART_EN_PORT.OUTSET = (1 << UART_EN_PIN);
#else // UART_PIN_INV
#else // UART_EN_INV
UART_EN_PORT.OUTCLR = (1 << UART_EN_PIN);
#endif // UART_PIN_INV
#endif // UART_EN_INV
#endif // USE_UART_EN_PIN

#else // __AVR_XMEGA__
Expand All @@ -271,9 +271,9 @@ int main(void)
UART_EN_PORT_DDR |= (1 << UART_EN_PIN);
#if UART_EN_INV
UART_EN_PORT |= (1 << UART_EN_PIN);
#else // UART_PIN_INV
#else // UART_EN_INV
UART_EN_PORT &= ~(1 << UART_EN_PIN);
#endif // UART_PIN_INV
#endif // UART_EN_INV
#endif // USE_UART_EN_PIN

#endif // __AVR_XMEGA__
Expand Down Expand Up @@ -1241,35 +1241,35 @@ void __attribute__ ((noinline)) send_char(unsigned char c)
#ifdef USE_UART_EN_PIN
#if UART_EN_INV
UART_EN_PORT.OUTCLR = (1 << UART_EN_PIN);
#else // UART_PIN_INV
#else // UART_EN_INV
UART_EN_PORT.OUTSET = (1 << UART_EN_PIN);
#endif // UART_PIN_INV
#endif // UART_EN_INV
#endif // USE_UART_EN_PIN
#else // __AVR_XMEGA__
#ifdef USE_UART_EN_PIN
#if UART_EN_INV
UART_EN_PORT &= ~(1 << UART_EN_PIN);
#else // UART_PIN_INV
#else // UART_EN_INV
UART_EN_PORT |= (1 << UART_EN_PIN);
#endif // UART_PIN_INV
#endif // UART_EN_INV
#endif // USE_UART_EN_PIN
#endif // __AVR_XMEGA__
uart_send_char_blocking(c);
#ifdef __AVR_XMEGA__
#ifdef USE_UART_EN_PIN
#if UART_EN_INV
UART_EN_PORT.OUTSET = (1 << UART_EN_PIN);
#else // UART_PIN_INV
#else // UART_EN_INV
UART_EN_PORT.OUTCLR = (1 << UART_EN_PIN);
#endif // UART_PIN_INV
#endif // UART_EN_INV
#endif // USE_UART_EN_PIN
#else // __AVR_XMEGA__
#ifdef USE_UART_EN_PIN
#if UART_EN_INV
UART_EN_PORT |= (1 << UART_EN_PIN);
#else // UART_PIN_INV
#else // UART_EN_INV
UART_EN_PORT &= ~(1 << UART_EN_PIN);
#endif // UART_PIN_INV
#endif // UART_EN_INV
#endif // USE_UART_EN_PIN
#endif // __AVR_XMEGA__

Expand Down
2 changes: 1 addition & 1 deletion xboot.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
// UART RS485 Enable Output
#define UART_EN_PORT_NAME C
#define UART_EN_PIN 4
#define UART_EN_PIN_INV 0
#define UART_EN_INV 0

// FIFO
#define FIFO_DATA_PORT_NAME C
Expand Down