Files @ 67d1f9d02048
Branch filter:

Location: windsonde/Source/system/interrupts.c

ethanzonca
Working pressure sensor and adc vbatt reading
//
// Interrupts: ISRs for all global interrupts
//

#include <system/gpio.h>
#include <system/stm32f0xx_it.h>
#include "stm32f0xx_hal.h"
#include "stm32f0xx.h"
#include "system/gpio.h"
#include "aprs/afsk.h"
#include "pressure.h"
#include "system/adc.h"

// Systick
void SysTick_Handler(void)
{
  HAL_IncTick();
  HAL_SYSTICK_IRQHandler();
}


void TIM1_CC_IRQHandler(void)
{
  HAL_TIM_IRQHandler(afsk_timer_gethandle());
}

void TIM1_BRK_UP_TRG_COM_IRQHandler(void)
{
  HAL_TIM_IRQHandler(afsk_timer_gethandle());
}


// Handle I2C interrupts
void I2C1_IRQHandler(void)
{
	if (pressure_get_i2c_handle()->Instance->ISR & (I2C_FLAG_BERR | I2C_FLAG_ARLO | I2C_FLAG_OVR)) {
		HAL_I2C_ER_IRQHandler(pressure_get_i2c_handle());
	} else {
		HAL_I2C_EV_IRQHandler(pressure_get_i2c_handle());
	}
}

void DMA1_Channel1_IRQHandler(void)
{
  HAL_DMA_IRQHandler(adc__hdma_gethandle());
}