diff options
Diffstat (limited to 'lib/chibios-contrib/testhal/STM32/STM32F1xx/onewire/boarddef.h')
-rw-r--r-- | lib/chibios-contrib/testhal/STM32/STM32F1xx/onewire/boarddef.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/chibios-contrib/testhal/STM32/STM32F1xx/onewire/boarddef.h b/lib/chibios-contrib/testhal/STM32/STM32F1xx/onewire/boarddef.h new file mode 100644 index 000000000..2b1b46684 --- /dev/null +++ b/lib/chibios-contrib/testhal/STM32/STM32F1xx/onewire/boarddef.h | |||
@@ -0,0 +1,29 @@ | |||
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 0 | ||
22 | #define ONEWIRE_PAD_MODE_IDLE PAL_MODE_INPUT | ||
23 | #define ONEWIRE_PAD_MODE_ACTIVE PAL_MODE_STM32_ALTERNATE_OPENDRAIN | ||
24 | #define search_led_on() (palClearPad(GPIOC, GPIOC_LED)) | ||
25 | #define search_led_off() (palSetPad(GPIOC, GPIOC_LED)) | ||
26 | #define ONEWIRE_MASTER_CHANNEL 2 | ||
27 | #define ONEWIRE_SAMPLE_CHANNEL 3 | ||
28 | |||
29 | #endif /* BOARDDEF_H_ */ | ||