Rev 21 | Rev 23 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 21 | Rev 22 | ||
---|---|---|---|
Line 159... | Line 159... | ||
159 | 159 | ||
160 | HAL_GPIO_WritePin ( USB_PULLUP_GPIO_Port, USB_PULLUP_Pin, GPIO_PIN_RESET); |
160 | HAL_GPIO_WritePin ( USB_PULLUP_GPIO_Port, USB_PULLUP_Pin, GPIO_PIN_RESET); |
161 | HAL_Delay (1000); |
161 | HAL_Delay (1000); |
162 | HAL_GPIO_WritePin ( USB_PULLUP_GPIO_Port, USB_PULLUP_Pin, GPIO_PIN_SET); |
162 | HAL_GPIO_WritePin ( USB_PULLUP_GPIO_Port, USB_PULLUP_Pin, GPIO_PIN_SET); |
163 | 163 | ||
164 | /* setup the USART control blocks */ |
164 | /* setup the USART control blocks */# |
165 | init_usart_ctl (&uc1, &huart1); |
- | |
166 | 165 | ||
- | 166 | #if defined SERIAL_UART1 |
|
167 | EnableSerialRxInterrupt (&uc1); |
167 | init_usart_ctl (&uc1, huart1.Instance); |
168 | 168 | ||
- | 169 | EnableSerialRxInterrupt (&uc1); |
|
- | 170 | #endif |
|
169 | 171 | ||
170 | /* Initialize the bmp280 */ |
172 | /* Initialize the bmp280 */ |
171 | rslt = bmp280_init(&bmp); |
173 | rslt = bmp280_init(&bmp); |
172 | // print_rslt(" bmp280_init status", rslt); |
174 | // print_rslt(" bmp280_init status", rslt); |
173 | 175 | ||
Line 203... | Line 205... | ||
203 | 205 | ||
204 | /* Infinite loop */ |
206 | /* Infinite loop */ |
205 | /* USER CODE BEGIN WHILE */ |
207 | /* USER CODE BEGIN WHILE */ |
206 | while (1) |
208 | while (1) |
207 | { |
209 | { |
- | 210 | ||
- | 211 | ||
208 | cc_run (&bmp); |
212 | cc_run (&bmp); |
209 | 213 | ||
210 | 214 | ||
211 | 215 | ||
212 | HAL_Delay (50); |
216 | HAL_Delay (50); |