#ifndef _SRF05_CFG_H_
#define _SRF05_CFG_H_

// Pin, the trigger signal is connected to
#define SRF_TRIGGER_PORT     PORTD
#define SRF_TRIGGER_DDR      DDRD
#define SRF_TRIGGER_PIN      4

// Pin, the echo/result signal is connected to
#define SRF_RESULT_PORT      PORTD
#define SRF_RESULT_DDR       DDRD
#define SRF_RESULT_INPUT     PIND
#define SRF_RESULT_PIN       3

// Interrupt configuration for echo pin
#define SRF_RESULT_INT_ISC_REG  (MCUCR)
#define SRF_RESULT_INT_ISC_BIT  (ISC10)

// Interrupt mask register and bit for echo pin
#define SRF_RESULT_INT_MSK_REG  (GICR)
#define SRF_RESULT_INT_MSK_BIT  (INT1)

// Interrupt flag register and bit for echo pin
#define SRF_RESULT_INT_FLAG_REG (GIFR)
#define SRF_RESULT_INT_FLAG_BIT (INTF1)

// Name of the interrupt, the echo pin is connected to
#define SRF_RESULT_ISR           SIG_INTERRUPT1
#endif