- spi_sending = false;
-}
-
-
-/*
-
-#pragma vector = UART_TXC_vect
-__interrupt void UART_TXC_interrupt(void)
-{
- UCSRB &= ~TXCIE;
- ReceiveMode();
- UCSRB = RXCIE | RXEN | TXEN; //Abilito l'Interrupt in ricezione e RX e TX
-}
-*/
-
-
-static const struct SerialHardwareVT UART0_VT =
-{
- .init = uart0_init,
- .cleanup = uart0_cleanup,
- .setbaudrate = uart0_setbaudrate,
- .setparity = uart0_setparity,
- .enabletxirq = uart0_enabletxirq,
-};
-
-static const struct SerialHardwareVT UART1_VT =
-{
- .init = uart1_init,
- .cleanup = uart1_cleanup,
- .setbaudrate = uart1_setbaudrate,
- .setparity = uart1_setparity,
- .enabletxirq = uart1_enabletxirq,
-};
-
-static const struct SerialHardwareVT SPI_VT =
-{
- .init = spi_init,
- .cleanup = spi_cleanup,
- .setbaudrate = spi_setbaudrate,
- .setparity = spi_setparity,
- .enabletxirq = spi_starttx,
-};
-
-static struct AvrSerial UARTDescs[SER_CNT] =
-{
- {
- .hw = { .table = &UART0_VT },
- },
-
- {
- .hw = { .table = &UART1_VT },
- },
-
- {
- .hw = { .table = &SPI_VT },
- },
-};
-
-struct SerialHardware* ser_hw_getdesc(int unit)
-{
- ASSERT(unit < SER_CNT);
- return &UARTDescs[unit].hw;