mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-19 01:03:22 +00:00
5d08b35b54
* Interrupt manager: add memory barriers. * ISRs: remove TIM17 dead code. * API HAL Delay: rename initialization routine and move to API-HAL * Main: move FURI initialization to the start. * API HAL GPIO: drop CC1101 shenanigans, COMP inversion for new boards. * IButton: migrate Cyfral and Metakom to RFID comp routine, make it compatible with new boards. * RFID: Better keyboard handling and shutdown routines
31 lines
No EOL
913 B
C
31 lines
No EOL
913 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);
|
|
}
|
|
|
|
/* Timer input capture event */
|
|
void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef* htim) {
|
|
api_interrupt_call(InterruptTypeTimerCapture, htim);
|
|
}
|
|
|
|
/* 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);
|
|
} |