]> jspc29.x-matter.uni-frankfurt.de Git - avr.git/commitdiff
pt100: fix regression introduced in f925d2c
authorPhilipp Klaus <klaus@physik.uni-frankfurt.de>
Fri, 30 Nov 2018 10:09:47 +0000 (11:09 +0100)
committerPhilipp Klaus <klaus@physik.uni-frankfurt.de>
Fri, 30 Nov 2018 10:09:47 +0000 (11:09 +0100)
pt100/uart.c

index caa0077b2ab1b501f8ed845c0634b95c5315c652..08f682363a0f8057384fb991129499cb532adadd 100644 (file)
@@ -27,7 +27,6 @@
 
 uint8_t rxcnt = 0, txpoint = 0;
 volatile uint8_t txcnt = 0;
-volatile uint8_t busy = 0;
 uint8_t rxbuf[15];
 uint8_t txbuf[15];
 
@@ -55,8 +54,6 @@ void forward_msg(uint8_t i) {
   else                rxbuf[2]--;
   sei();
   while (TX_BUSY()) {};
-  while (busy == 1) {};
-  busy = 1;
   memcpy ((uint8_t*)txbuf,(uint8_t*)rxbuf,i);
   STARTTX(i);
   }  
@@ -74,8 +71,6 @@ uint8_t is_my_address(uint8_t s) {
 
 void send_answer_hex(uint8_t type, uint8_t chan, uint32_t v) {
   sei();
-  while (busy == 1) {};
-  busy = 1;
   while(TX_BUSY());
   txbuf[0]='A';
   txbuf[1]=type;
@@ -160,6 +155,5 @@ ISR(USART0_UDRE_vect) {
     txpoint = 0;
     txcnt = 0;
     UCSR0B &= ~(1<< UDRIE0);
-    busy = 0;
     }
   }
\ No newline at end of file