api-interrupts.c 439 B

12345678910111213141516
  1. #include "api-hal/api-interrupt-mgr.h"
  2. #include <main.h>
  3. extern void api_interrupt_call(InterruptType type, void* hw);
  4. /* interrupts */
  5. /* Comparator trigger event */
  6. void HAL_COMP_TriggerCallback(COMP_HandleTypeDef* hcomp) {
  7. api_interrupt_call(InterruptTypeComparatorTrigger, hcomp);
  8. }
  9. /* Timer update event */
  10. void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef* htim) {
  11. api_interrupt_call(InterruptTypeTimerUpdate, htim);
  12. }