Skip to content
Snippets Groups Projects
Select Git revision
  • 5f0b229f2f89dd924430c09adc6aef81aec5312e
  • master default protected
  • fix-warnings
  • tvbgone-fixes
  • genofire/ble-follow-py
  • schneider/ble-stability-new-phy-adv
  • schneider/ble-stability
  • msgctl/gfx_rle
  • schneider/ble-stability-new-phy
  • add_menu_vibration
  • plaetzchen/ios-workaround
  • blinkisync-as-preload
  • schneider/max30001-pycardium
  • schneider/max30001-epicaridum
  • schneider/max30001
  • schneider/stream-locks
  • schneider/fundamental-test
  • schneider/ble-buffers
  • schneider/maxim-sdk-update
  • ch3/splashscreen
  • koalo/bhi160-works-but-dirty
  • v1.11
  • v1.10
  • v1.9
  • v1.8
  • v1.7
  • v1.6
  • v1.5
  • v1.4
  • v1.3
  • v1.2
  • v1.1
  • v1.0
  • release-1
  • bootloader-v1
  • v0.0
36 results

interrupt-sender.c

Blame
  • Forked from card10 / firmware
    518 commits behind, 2 commits ahead of the upstream repository.
    François Revol's avatar
    François Revol authored
    Any reason to use TMR5 except preventing the use of PWM on the IR LED?
    
    TMR4 is used for the LCD backlight it seems.
    5f0b229f
    History
    interrupt-sender.c 419 B
    #include "api/interrupt-sender.h"
    #include "api/common.h"
    #include "tmr_utils.h"
    #include <assert.h>
    
    void api_interrupt_init(void)
    {
    	API_CALL_MEM->int_id = (-1);
    }
    
    bool api_interrupt_is_ready(void)
    {
    	return API_CALL_MEM->int_id == (api_int_id_t)(-1);
    }
    
    void api_interrupt_trigger(api_int_id_t id)
    {
    	assert(API_CALL_MEM->int_id == (api_int_id_t)(-1));
    
    	API_CALL_MEM->int_id = id;
    	TMR_TO_Start(MXC_TMR3, 1, 0);
    }