3 #define CPU_CLOCK_MHZ 72
7 // #define DEBUG_SEMIHOSTING
8 #define DEBUG_USART USART2
9 #define DEBUG_LED_BLUEPILL
11 // MODBUS library parameters
13 #define MODBUS_USART USART3
14 #define MODBUS_NVIC_USART_IRQ NVIC_USART3_IRQ
15 #define MODBUS_USART_ISR usart3_isr
17 #define MODBUS_TXEN_GPIO_PORT GPIOB
18 #define MODBUS_TXEN_GPIO_PIN GPIO1
20 #define MODBUS_TIMER TIM2
21 #define MODBUS_NVIC_TIMER_IRQ NVIC_TIM2_IRQ
22 #define MODBUS_TIMER_ISR tim2_isr
24 #define MODBUS_OUR_ADDRESS 42
26 #define MODBUS_BAUD_RATE 19200