pull/4/head
Mateusz Lubecki 2021-07-16 11:11:11 +02:00
rodzic 201b77c2e8
commit 0b33d7e997
2 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -100,10 +100,10 @@ inline void led_control_led1_upper(bool _in) {
inline void led_control_led2_bottom(bool _in) {
if (_in == true) {
GPIOC->BSRR |= GPIO_BSRR_BS9;
GPIOA->BSRR |= GPIO_BSRR_BS5;
}
else {
GPIOC->BSRR |= GPIO_BSRR_BR9;
GPIOA->BSRR |= GPIO_BSRR_BR5;
}
}
@ -117,11 +117,11 @@ inline void led_flip_led1_upper(void) {
}
inline void led_flip_led2_bottom(void) {
if ((GPIOC->ODR & GPIO_ODR_ODR_9) == GPIO_ODR_ODR_9) {
GPIOC->BSRR |= GPIO_BSRR_BR9;
if ((GPIOA->ODR & GPIO_ODR_ODR_5) == GPIO_ODR_ODR_5) {
GPIOA->BSRR |= GPIO_BSRR_BR5;
}
else {
GPIOC->BSRR |= GPIO_BSRR_BS9;
GPIOA->BSRR |= GPIO_BSRR_BS5;
}
}

Wyświetl plik

@ -273,7 +273,7 @@ void analog_anemometer_init(uint16_t pulses_per_meter_second, uint8_t anemometer
NVIC_EnableIRQ( DMA1_Channel5_IRQn );
// direction
GPIO_InitTypeDef.Mode = LL_GPIO_MODE_INPUT;
GPIO_InitTypeDef.Mode = LL_GPIO_MODE_ALTERNATE;
GPIO_InitTypeDef.Pin = LL_GPIO_PIN_2;
GPIO_InitTypeDef.Pull = LL_GPIO_PULL_NO;
GPIO_InitTypeDef.Speed = LL_GPIO_SPEED_FREQ_MEDIUM;
@ -534,7 +534,7 @@ int16_t analog_anemometer_direction_handler(void) {
LL_TIM_DisableCounter(TIM3);
// getting current counter value
uint16_t current_value = LL_TIM_GetCounter(TIM3);//TIM_GetCounter(TIM3);
volatile uint16_t current_value = LL_TIM_GetCounter(TIM3);//TIM_GetCounter(TIM3);
// if the counter value is zero it means that probably U/f converter isn't running
if (current_value == 0) {