Skip to content
Snippets Groups Projects
Select Git revision
  • fc28ffb4ac1230bb932d63fa285a8fb09eb67fd4
  • main default protected
  • pippin/media_framework
  • release/1.1.1
  • release/1.1.0
  • fpletz/flake
  • sec/auto-nick
  • rahix/flow3rseeds
  • compressor
  • sec/blinky
  • pippin/uhm_flash_access_bust
  • release/1.0.0
  • fm_fix2
  • fm_fix
  • pippin/make_empty_drawlists_skip_render_and_blit
  • pressable_bugfix
  • moon2_gay_drums
  • moon2_applications
  • schneider/application-remove-name
  • anon/webflasher
  • pippin/display-python-errors-on-display
  • v1.1.1
  • v1.1.0
  • v1.1.0+rc1
  • v1.0.0
  • v1.0.0+rc6
  • v1.0.0+rc5
  • v1.0.0+rc4
  • v1.0.0+rc3
  • v1.0.0+rc2
  • v1.0.0+rc1
31 results

help.c

Blame
  • Forked from flow3r / flow3r firmware
    Source project has a limited visibility.
    api_dispatcher.c 652 B
    #include "api_dispatcher.h"
    
    int api_init (sys_cfg_sema_t *sys_cfg)
    {
    	int ret;
    
    	ret = SEMA_Init (sys_cfg);
    	/* Set the status of the flag to a valid initial state (right before
    	 * api-calls are made) */
    	ApiCallSpace->returning = 1;
    
    	return ret;
    }
    
    /* Generated function */
    void __api_dispatch_call(uint32_t id, void*buffer);
    
    void api_dispatcher()
    {
    	while (SEMA_GetSema(API_CALL_SEMA) == E_BUSY) {}
    
    	if (ApiCallSpace->returning == 1) {
    		SEMA_FreeSema(API_CALL_SEMA);
    		return;
    	}
    
    	printf("core1: Catched API CALL!\n");
    	__api_dispatch_call(ApiCallSpace->id, ApiCallSpace->buf);
    
    	ApiCallSpace->returning = 1;
    
    	SEMA_FreeSema(API_CALL_SEMA);
    }