]> mj.ucw.cz Git - home-hw.git/blob - test-modbus/config.h
Modbus: Genericized debugging
[home-hw.git] / test-modbus / config.h
1 // Processor clock
2
3 #define CPU_CLOCK_MHZ 72
4
5 // Debugging port
6
7 // #define DEBUG_SEMIHOSTING
8 #define DEBUG_USART USART1
9
10 // MODBUS library parameters
11
12 #define MODBUS_USART USART2
13 #define MODBUS_NVIC_USART_IRQ NVIC_USART2_IRQ
14 #define MODBUS_USART_ISR usart2_isr
15
16 #define MODBUS_TXEN_GPIO_PORT GPIOA
17 #define MODBUS_TXEN_GPIO_PIN GPIO1
18
19 #define MODBUS_TIMER TIM2
20 #define MODBUS_NVIC_TIMER_IRQ NVIC_TIM2_IRQ
21 #define MODBUS_TIMER_ISR tim2_isr
22
23 #define MODBUS_OUR_ADDRESS 42
24
25 #define MODBUS_BAUD_RATE 19200