diff options
Diffstat (limited to 'lib/chibios-contrib/testhal/STM32/STM32F4xx/onewire/boarddef.h')
-rw-r--r-- | lib/chibios-contrib/testhal/STM32/STM32F4xx/onewire/boarddef.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/chibios-contrib/testhal/STM32/STM32F4xx/onewire/boarddef.h b/lib/chibios-contrib/testhal/STM32/STM32F4xx/onewire/boarddef.h new file mode 100644 index 000000000..a048dcb86 --- /dev/null +++ b/lib/chibios-contrib/testhal/STM32/STM32F4xx/onewire/boarddef.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | ChibiOS/RT - Copyright (C) 2016 Uladzimir Pylinsky aka barthess | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | #ifndef BOARDDEF_H_ | ||
18 | #define BOARDDEF_H_ | ||
19 | |||
20 | #define ONEWIRE_PORT GPIOB | ||
21 | #define ONEWIRE_PIN GPIOB_PIN0 | ||
22 | #define ONEWIRE_PAD_MODE_ACTIVE (PAL_MODE_ALTERNATE(2) | PAL_STM32_OTYPE_OPENDRAIN) | ||
23 | #define search_led_off() (palClearPad(GPIOD, GPIOD_LED4)) | ||
24 | #define search_led_on() (palSetPad(GPIOD, GPIOD_LED4)) | ||
25 | #define ONEWIRE_MASTER_CHANNEL 2 | ||
26 | #define ONEWIRE_SAMPLE_CHANNEL 3 | ||
27 | |||
28 | #endif /* BOARDDEF_H_ */ | ||