aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32F4xx/onewire
diff options
context:
space:
mode:
authorbarthess <barthess@yandex.ru>2014-12-08 22:39:55 +0300
committerbarthess <barthess@yandex.ru>2014-12-08 22:39:55 +0300
commit6030b0a06a4ae83772b89753c41fe961772eefd4 (patch)
treee2498d22d26340c020ffb41fa0327b5eb0d27919 /testhal/STM32/STM32F4xx/onewire
parent911e7ef827dd1dc09f769af44eddf78a85afd663 (diff)
downloadChibiOS-Contrib-6030b0a06a4ae83772b89753c41fe961772eefd4.tar.gz
ChibiOS-Contrib-6030b0a06a4ae83772b89753c41fe961772eefd4.tar.bz2
ChibiOS-Contrib-6030b0a06a4ae83772b89753c41fe961772eefd4.zip
1-wire. Added testhal for STM32F1xx. Not tested in hardware
Diffstat (limited to 'testhal/STM32/STM32F4xx/onewire')
-rw-r--r--testhal/STM32/STM32F4xx/onewire/onewire_test.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/testhal/STM32/STM32F4xx/onewire/onewire_test.c b/testhal/STM32/STM32F4xx/onewire/onewire_test.c
index 0f8e84b..139732d 100644
--- a/testhal/STM32/STM32F4xx/onewire/onewire_test.c
+++ b/testhal/STM32/STM32F4xx/onewire/onewire_test.c
@@ -30,18 +30,25 @@
#endif
#endif
-#define ONEWIRE_MASTER_CHANNEL 2 /* this PWM channel drives bus */
-#define ONEWIRE_SAMPLE_CHANNEL 3 /* this one generates interrupts when sampling needed */
-
#if defined(BOARD_ST_STM32F4_DISCOVERY)
#define GPIOB_ONEWIRE GPIOB_PIN8
#define search_led_off() (palClearPad(GPIOD, GPIOD_LED4))
#define search_led_on() (palSetPad(GPIOD, GPIOD_LED4))
+#define ONEWIRE_MASTER_CHANNEL 2
+#define ONEWIRE_SAMPLE_CHANNEL 3
+#elif defined(BOARD_OLIMEX_STM32_103STK)
+#define GPIOB_ONEWIRE 8
+#define search_led_off() (palClearPad(GPIOC, GPIOC_LED))
+#define search_led_on() (palSetPad(GPIOC, GPIOC_LED))
+#define ONEWIRE_MASTER_CHANNEL 3
+#define ONEWIRE_SAMPLE_CHANNEL 2
#else
#define GPIOB_ONEWIRE GPIOB_TACHOMETER
#include "pads.h"
#define search_led_on red_led_on
#define search_led_off red_led_off
+#define ONEWIRE_MASTER_CHANNEL 2
+#define ONEWIRE_SAMPLE_CHANNEL 3
#endif
/*