mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-20 17:53:20 +00:00
3114a2d4b8
* Add cscope db generation * Add api-hal-irda, TIM2: HAL->LL * Add libirda: pwm decoding * Universal state machine * Add irda decoder library * Move IRDA capture to standalone tool * Add encoder/decoder samsung32, NEC, fix bugs * Port current App to new Irda lib * Fix clang format for test data * Port IRDA api-hal to f6 Co-authored-by: あく <alleteam@gmail.com>
26 lines
763 B
C
26 lines
763 B
C
#include "api-hal/api-interrupt-mgr.h"
|
|
#include <main.h>
|
|
|
|
extern void api_interrupt_call(InterruptType type, void* hw);
|
|
|
|
/* interrupts */
|
|
|
|
/* Comparator trigger event */
|
|
void HAL_COMP_TriggerCallback(COMP_HandleTypeDef* hcomp) {
|
|
api_interrupt_call(InterruptTypeComparatorTrigger, hcomp);
|
|
}
|
|
|
|
/* Output compare event */
|
|
void HAL_TIM_OC_DelayElapsedCallback(TIM_HandleTypeDef* htim) {
|
|
api_interrupt_call(InterruptTypeTimerOutputCompare, htim);
|
|
}
|
|
|
|
/* Timer update event */
|
|
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef* htim) {
|
|
api_interrupt_call(InterruptTypeTimerUpdate, htim);
|
|
}
|
|
|
|
/* External interrupt event */
|
|
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
|
|
api_interrupt_call(InterruptTypeExternalInterrupt, (void*)(uint32_t)GPIO_Pin);
|
|
}
|