Skip to content

Commit

Permalink
[boards] lisa_m/lia: error if trying to use LED and ADC on same pin
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Sep 2, 2014
1 parent fb09d3c commit 274dd7e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sw/airborne/boards/lia_1.1.h
Expand Up @@ -46,6 +46,10 @@
#define LED_3_GPIO_OFF gpio_set
#define LED_3_AFIO_REMAP ((void)0)

#if USE_LED_3 && USE_ADC_6
#error "You can't use LED_3 and ADC_6 at the same time"
#endif

/* red, shared with ADC15 (ADC_4 on connector ANALOG2) */
#ifndef USE_LED_4
#define USE_LED_4 1
Expand All @@ -56,6 +60,10 @@
#define LED_4_GPIO_OFF gpio_set
#define LED_4_AFIO_REMAP ((void)0)

#if USE_LED_4 && USE_ADC_4
#error "You can't use LED_4 and ADC_4 at the same time"
#endif

/* green, on PC15 */
#ifndef USE_LED_5
#define USE_LED_5 1
Expand Down
8 changes: 8 additions & 0 deletions sw/airborne/boards/lisa_m_2.0.h
Expand Up @@ -46,6 +46,10 @@
#define LED_3_GPIO_OFF gpio_set
#define LED_3_AFIO_REMAP ((void)0)

#if USE_LED_3 && USE_ADC_6
#error "You can't use LED_3 and ADC_6 at the same time"
#endif

/* red, shared with ADC15 (ADC_4 on connector ANALOG2) */
#ifndef USE_LED_4
#define USE_LED_4 1
Expand All @@ -56,6 +60,10 @@
#define LED_4_GPIO_OFF gpio_set
#define LED_4_AFIO_REMAP ((void)0)

#if USE_LED_4 && USE_ADC_4
#error "You can't use LED_4 and ADC_4 at the same time"
#endif

/* green, on PC15 */
#ifndef USE_LED_5
#define USE_LED_5 1
Expand Down

0 comments on commit 274dd7e

Please sign in to comment.