]> mj.ucw.cz Git - home-hw.git/blob - aircon/firmware/config.h
Aircon: Turned off debugging controls via UART
[home-hw.git] / aircon / firmware / config.h
1 /*
2  *      Air Conditioning Controller -- Configuration
3  *
4  *      (c) 2019 Martin Mareš <mj@ucw.cz>
5  */
6
7 // Processor clock
8
9 #define CPU_CLOCK_MHZ 72
10
11 // Debugging port
12
13 #define DEBUG_USART USART1
14 #define DEBUG_LED_BLUEPILL
15
16 // MODBUS library parameters
17
18 #define MODBUS_USART USART3
19 #define MODBUS_NVIC_USART_IRQ NVIC_USART3_IRQ
20 #define MODBUS_USART_ISR usart3_isr
21
22 #define MODBUS_TXEN_GPIO_PORT GPIOA
23 #define MODBUS_TXEN_GPIO_PIN GPIO6
24
25 #define MODBUS_TIMER TIM2
26 #define MODBUS_NVIC_TIMER_IRQ NVIC_TIM2_IRQ
27 #define MODBUS_TIMER_ISR tim2_isr
28
29 #define MODBUS_OUR_ADDRESS 42
30
31 #define MODBUS_BAUD_RATE 19200
32
33 #undef MODBUS_DEBUG
34
35 // DS18B20 library parameters
36
37 #define DS_TIMER TIM3
38 #define DS_GPIO GPIOA
39 #define DS_PIN GPIO7
40 #define DS_DMA DMA1
41 #define DS_DMA_CH 6
42 #define DS_NUM_SENSORS 8
43
44 #undef DS_DEBUG
45 #undef DS_DEBUG2