   TRACE(sizeof(Pin));
   TRACE(sizeof(InputPin));
   TRACE(sizeof(InterruptPin));
+  TRACE(sizeof(CounterInterruptPin));
   TRACE(sizeof(AnalogPin));
   TRACE(sizeof(OutputPin));
   TRACE(sizeof(PWMPin));

  }

  // Print the interrupt counter
  TRACE(counter);
}

#include "Cosa/Trace.hh"
#include "Cosa/Memory.h"

// Input interrupt pin with counter
class CounterInterruptPin : public InterruptPin {
private:
  volatile uint16_t m_counter;
  virtual void on_interrupt() { m_counter++; }
public:
  CounterInterruptPin(uint8_t pin) :
    InterruptPin(pin, InterruptPin::ON_RISING_MODE),
    m_counter(0)
  {}
  uint16_t get_counter() { return (m_counter); }
};

// Input and output pins
CounterInterruptPin intPin(2);
PWMPin ledPin(5);
InputPin onoffPin(7);
AnalogPin tempVCC(8, AnalogPin::A1V1_REFERENCE);
