text: /**
   * @author Raoul Rubien 20.07.2016
   *
   * Tx/rx related configuration.
   */
  
  #pragma once
  
  #include "TimerCounter1.h"
  
  #if  defined(__AVR_ATtiny1634__) || defined(__AVR_ATmega16__)
  
  #  define __TIMER_TX_RX_COUNTER_PRESCALER_ENABLE __TIMER1_INTERRUPT_PRESCALER_ENABLE(__PRESCALER_1)
  #  define __TIMER_TX_RX_COUNTER_PRESCALER_DISABLE __TIMER1_INTERRUPT_PRESCALER_DISABLE
  
  #  define __TIMER_1_TX_RX_SETUP __TIMER1_INTERRUPT_CLEAR_PENDING; \
      TCNT1 = 0; \
      __TIMER1_INTERRUPT_OUTPUT_MODE_DISCONNECTED_SETUP; \
      __TIMER1_INTERRUPT_WAVE_GENERATION_MODE_NORMAL_SETUP; \
      __TIMER1_INTERRUPT_PRESCALER_DISABLE; \
      __TIMER1_COMPARE_A_INTERRUPT_DISABLE; \
      __TIMER1_OVERFLOW_INTERRUPT_DISABLE
  
  #  define TIMER_TX_RX_COUNTER_VALUE (TCNT1)
  
  #  define TIMER_TX_RX_COMPARE_VALUE (OCR1A)
  
  #  define TIMER_TX_RX_COUNTER_CLEAR_PENDING_INTERRUPTS \
      __TIMER1_INTERRUPT_CLEAR_PENDING
  
  #  define TIMER_TX_RX_COUNTER_SETUP \
      __TIMER_1_TX_RX_SETUP; \
      __TIMER_TX_RX_COUNTER_PRESCALER_DISABLE
  
  #  define TIMER_TX_RX_COUNTER_PAUSE __TIMER1_INTERRUPT_PRESCALER_DISABLE
  #  define TIMER_TX_RX_COUNTER_DISABLE __TIMER1_INTERRUPT_PRESCALER_DISABLE
  #  define TIMER_TX_RX_COUNTER_ENABLE __TIMER1_INTERRUPT_PRESCALER_ENABLE(__TIMER_COUNTER_PRESCALER_1);
  #  define TIMER_TX_RX_COUNTER_RESUME __TIMER1_INTERRUPT_PRESCALER_ENABLE(__TIMER_COUNTER_PRESCALER_1);
  
  #  define TIMER_TX_RX_DISABLE_COMPARE_INTERRUPT \
      __TIMER1_COMPARE_A_INTERRUPT_DISABLE
  
  #  define TIMER_TX_RX_ENABLE_COMPARE_INTERRUPT \
      TIMER_TX_RX_COUNTER_CLEAR_PENDING_INTERRUPTS; \
      __TIMER1_COMPARE_A_INTERRUPT_ENABLE
  
  #  define TIMER_RX_RX_DISABLE_OVERFLOW_INTERRUPT \
      __TIMER1_OVERFLOW_INTERRUPT_DISABLE
  
  #  define TIMER_RX_RX_ENABLE_OVERFLOW_INTERRUPT \
      __TIMER1_OVERFLOW_INTERRUPT_ENABLE
  
  #  else
  #    error
  #  endif
  