#ifndef BOARDH
#define BOARDH

#define IDLESHUTDOWN   900000          // 15min* 60 sec * 1000ms
#define VBATTMIN  3200
#define VBATTMAX  4180
#define VBATTREF  3300

#ifndef UNIT_TEST

  #if HARDWAREVERSION==9  //proto board with nucleo32l031 board

    #define LED3        PB0     //D3
    #define LED2        PB7     //D4
    #define LED1        PB6     //D5

    #define DETECT3     PA6     //A5
    #define DETECT2     PA5     //A4
    #define DETECT1     PA4     //A3

    #define SWITCH3     PA7     //A6 TOGGLE1
    #define SWITCH32    PA2     //A7 MOMENTARY1
    #define SWITCH2     PA1     //A1 TOGGLE1
    #define SWITCH22    PA3     //A2 MOMENTARY1
    #define SWITCH1     PB5     //D11 TOGGLE1
    #define SWITCH12    PB4     //D12 MOMENTARY1

    #define LD3LED      PB3
    #define WAKEUPPIN   PA2

    #define REDLEDRES
    #define YELLOWLEDRES
    #define GREENLEDRES

  #elif HARDWAREVERSION==10 //v1.0 PCB
  
    #define LED3        PB2     
    #define LED2        PB8     
    #define LED1        PB7    

    #define DETECT3     PA6     
    #define DETECT2     PA5     
    #define DETECT1     PA4     

    #define SWITCH3     PA7     //A6 TOGGLE1
    #define SWITCH32    PA2     //A7 MOMENTARY1
    #define SWITCH2     PA1     //A1 TOGGLE1
    #define SWITCH22    PA3     //A2 MOMENTARY1
    #define SWITCH1     PB6     //D11 TOGGLE1
    #define SWITCH12    PB5     //D12 MOMENTARY1

    #define LD3LED      PB3
    #define WAKEUPPIN   PA2
    #define VBATTPIN    PA0     //A0 VBATT
    #define R12         3.3
    #define R13         10

    #define REDLEDRES
    #define YELLOWLEDRES
    #define GREENLEDRES

  #elif HARDWAREVERSION==11
  
    #define LED3        PB2     
    #define LED2        PB8     
    #define LED1        PB7    

    #define DETECT3     PA6     
    #define DETECT2     PA5     
    #define DETECT1     PA4     

    #define SWITCH3     PA7     //A6 TOGGLE1
    #define SWITCH32    PA2     //A7 MOMENTARY1
    #define SWITCH2     PA1     //A1 TOGGLE1
    #define SWITCH22    PA3     //A2 MOMENTARY1
    #define SWITCH1     PB6     //D11 TOGGLE1
    #define SWITCH12    PB5     //D12 MOMENTARY1

    #define LD3LED      PB3
    #define WAKEUPPIN   PA2
    #define VBATTPIN    PA0     //A0 VBATT
    #define R12         4.7
    #define R13         10
    #define MEASTRIGGER PA8

    #define REDLEDRES
    #define YELLOWLEDRES
    #define GREENLEDRES
  #else
    #error No hardware version defined!!

  #endif

#else //UNIT_TEST

  #define LED1        0     //D3
  #define LED2        1     //D4
  #define LED3        2     //D5

  #define DETECT1     3     //A5
  #define DETECT2     4     //A4
  #define DETECT3     5     //A3

  #define SWITCH1     6     //A6 TOGGLE1
  #define SWITCH12    7     //A7 MOMENTARY1
  #define SWITCH2     8     //A1 TOGGLE1
  #define SWITCH22    9     //A2 MOMENTARY1
  #define SWITCH3     10     //D11 TOGGLE1
  #define SWITCH32    11     //D12 MOMENTARY1

  #define LD3LED      12
  #define WAKEUPPIN   13

  #define REDLEDRES
  #define YELLOWLEDRES
  #define GREENLEDRES

#endif //unit_test


#endif //BOARDH