aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
authorbarthess <barthess@yandex.ru>2014-12-06 21:10:14 +0300
committerbarthess <barthess@yandex.ru>2014-12-06 21:10:14 +0300
commit61263b2e91298f8b2236c6aac21dae2f7186e576 (patch)
tree6fae9fcaab66617bde08fbbbb7b802033cac30a1 /testhal
parente16807c68755e4bbcfbdc4e002c375347da88d1a (diff)
downloadChibiOS-Contrib-61263b2e91298f8b2236c6aac21dae2f7186e576.tar.gz
ChibiOS-Contrib-61263b2e91298f8b2236c6aac21dae2f7186e576.tar.bz2
ChibiOS-Contrib-61263b2e91298f8b2236c6aac21dae2f7186e576.zip
1-wire. Improved comments
Diffstat (limited to 'testhal')
-rw-r--r--testhal/STM32/STM32F4xx/onewire/onewire_test.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/testhal/STM32/STM32F4xx/onewire/onewire_test.c b/testhal/STM32/STM32F4xx/onewire/onewire_test.c
index 2f0d047..0f8e84b 100644
--- a/testhal/STM32/STM32F4xx/onewire/onewire_test.c
+++ b/testhal/STM32/STM32F4xx/onewire/onewire_test.c
@@ -16,13 +16,20 @@
#include <string.h>
-#include "onewire.h"
+#include "hal.h"
/*
******************************************************************************
* DEFINES
******************************************************************************
*/
+
+#if defined(BOARD_ST_STM32F4_DISCOVERY)
+#if ONEWIRE_USE_STRONG_PULLUP
+#error "F4 Discovery board has not enough voltage for this feature"
+#endif
+#endif
+
#define ONEWIRE_MASTER_CHANNEL 2 /* this PWM channel drives bus */
#define ONEWIRE_SAMPLE_CHANNEL 3 /* this one generates interrupts when sampling needed */
@@ -33,8 +40,8 @@
#else
#define GPIOB_ONEWIRE GPIOB_TACHOMETER
#include "pads.h"
-#define search_led_on red_led_on
-#define search_led_off red_led_off
+#define search_led_on red_led_on
+#define search_led_off red_led_off
#endif
/*
@@ -48,9 +55,10 @@
* PROTOTYPES
******************************************************************************
*/
-
+/*
+ * Forward declarations
+ */
static uint_fast8_t onewire_read_bit_X(void);
-
#if ONEWIRE_USE_STRONG_PULLUP
static void strong_pullup_assert(void);
static void strong_pullup_release(void);