Skip to content

Firmware Atmega88 #11

Open
Open
@JucaTec

Description

@JucaTec

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions