Andriy Makukha
/
football_project_wo_output
football_project_wo_output
Fork of football_project by
Diff: configs.h
- Revision:
- 87:a9870d513fcf
- Parent:
- 84:705de339f554
- Child:
- 89:425369a595c4
--- a/configs.h Sat Jun 04 06:26:13 2016 +0000 +++ b/configs.h Tue Jun 07 08:33:15 2016 +0000 @@ -5,13 +5,14 @@ // Board select, if none selected - LPC1768 assumed #define NORDIC // nRF51822 (highest priority) #define NUCLEO // Nucleo-F411RE (lesser priority) +#define HARD_V2 // version 2 hardware for nRF51822 // Frequency select //#define FREQUENCY RF69_433MHZ //#define FREQUENCY RF69_868MHZ #define FREQUENCY RF69_915MHZ -#define _HIGH_POWER // High power radio +#define HIGH_POWER // High power radio // Output select #define NO_DISP // No display? @@ -40,6 +41,28 @@ const uint8_t SPACE[] = {1, 50, 60, 100}; // 5, 10, 15, 20 meters +// P-MOSFET +#define LOW_ON 0 +#define LOW_OFF 1 + +#ifdef HARD_V2 + +// N-MOSFETS +#define MED_ON 1 +#define MED_OFF 0 +#define HIGH_ON 1 +#define HIGH_OFF 0 + +#else // HARD_V2 + +// P-MOSFETS +#define MED_ON 0 +#define MED_OFF 1 +#define HIGH_ON 0 +#define HIGH_OFF 1 + +#endif // HARD_V2 + /////////////////////////////////// LOGIC /////////////////////////////////// #ifdef NORDIC @@ -61,6 +84,27 @@ /////////////////////// PINS /////////////////////// #ifdef NORDIC +#ifdef HARD_V2 + +#define LED_SPACE5 P0_21 +#define LED_SPACE10 P0_22 +#define LED_SPACE15 P0_0 +#define LED_SPACE20 P0_29 +#define LED_TEAM_A P0_11 +#define LED_TEAM_B P0_9 +#define LED_BUZZER_ON P0_8 + +#define BUZZER P0_5 +#define BUZZ_HIGH P0_4 +#define BUZZ_MED P0_1 + +#define BUT_VOL_MORE P0_28 +#define BUT_VOL_LESS P0_10 +#define BUT_SPACE P0_15 +#define BUT_TEAM P0_13 + +#else // HARD_V2 + #define LED_SPACE5 P0_7 #define LED_SPACE10 P0_8 #define LED_SPACE15 P0_9 @@ -79,6 +123,8 @@ #define BUT_SPACE P0_21 #define BUT_TEAM P0_15 +#endif // HARD_V2 + #define RFM_MOSI P0_19 #define RFM_MISO P0_18 #define RFM_SCK P0_17