Skip to content
Snippets Groups Projects
Select Git revision
  • e87cdd45f3fe1e9020a27b645fa628fdba73470a
  • master default protected
  • card10_nickname_fix
  • genofire/ble-card10-timeread
  • schneider/fundamental-test
  • schneider/ble-buffers
  • ios-workarounds
  • schneider/maxim-sdk-update
  • rahix/simple_menu
  • ch3/splashscreen
  • koalo/bhi160-works-but-dirty
  • koalo/wip/i2c-for-python
  • renze/safe_mode
  • renze/hatchery_apps
  • koalo/factory-reset
  • msgctl/gfx_rle
  • msgctl/faultscreen
  • msgctl/textbuffer_api
  • schneider/bonding
  • schneider/bootloader-update-9a0d158
  • schneider/bsec
  • v1.5
  • v1.4
  • v1.3
  • v1.2
  • v1.1
  • v1.0
  • release-1
  • bootloader-v1
  • v0.0
30 results

main.c

Blame
  • Forked from card10 / firmware
    1427 commits behind the upstream repository.
    fleur's avatar
    fleur authored and Rahix committed
    The new LED modules allow a much broader range of uses of the RGB LEDs.
    It also includes smart powersaving and options to set all LEDs at once.
    e87cdd45
    History
    main.c 855 B
    /*******************************************************************************
     * License: TBD
     ******************************************************************************/
    
    /***** Includes *****/
    #include "pmic.h"
    #include "leds.h"
    #include "card10.h"
    
    #include "GUI_Paint.h"
    
    #include "tmr_utils.h"
    
    #include <stdio.h>
    #include <stdint.h>
    #include <string.h>
    #include <Heart.h>
    
    int main(void)
    {
    	card10_init();
    	card10_diag();
    
    	Paint_DrawImage(Heart, 0, 0, 160, 80);
    	LCD_Update();
    
    	// Release core1
    	core1_start((void *)0x10080000);
    	int h = 0;
    
    	while (1) {
    #define NUM 15
    
    		leds_update();
    		TMR_Delay(MXC_TMR0, MSEC(10), 0);
    		h++;
    
    		// Send a txev using `sev` every once in a while to wake up core1
    		// and let it do something
    		if (h % 100 == 0) {
    			printf("core0: Triggering core1 using SEV ...\n");
    			__asm volatile("sev");
    		}
    	}
    }