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

Firmware Atmega88 #11

Open
JucaTec opened this issue Jul 27, 2020 · 0 comments
Open

Firmware Atmega88 #11

JucaTec opened this issue Jul 27, 2020 · 0 comments

Comments

@JucaTec
Copy link

JucaTec commented Jul 27, 2020

Hi.

I made the change of the pins but I get error when compiling.

uart.c

ISR(USART_RX_vect, ISR_NAKED){
// Disable this interrupt by clearing its Interrupt Enable flag.
asm volatile("cbi %0, %1"::
"I"(_SFR_IO_ADDR(UCSR0B)),"I"(RXCIE0));
asm volatile("sei"::);
asm volatile("rjmp __vector_usart_rx_wrapped"::);

ISR(USART_UDRE_vect, ISR_NAKED){
// Disable this interrupt by clearing its Interrupt Enable flag.
asm volatile("cbi %0, %1"::
"I"(_SFR_IO_ADDR(UCSR0B)),"I"(UDRIE0));
// Now we can enable interrupts without infinite recursion.
asm volatile("sei"::);
// Finally, we jump into the actual handler.
asm volatile("rjmp __vector_usart_udre_wrapped"::);

CC: out/atmega88/uart.o
uart.c: In function '__vector_18':
uart.c:161: warning: asm operand 0 probably doesn't match constraints
uart.c:161: error: impossible constraint in 'asm'
uart.c: In function '__vector_19':
uart.c:181: warning: asm operand 0 probably doesn't match constraints
make: *** [out/atmega88/uart.o] Error 1

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant