Skip to content
Snippets Groups Projects
Select Git revision
  • fd96a857577d504ae363b5daa88fbd7cf081b8d0
  • master default
  • add-datetime
  • rahix/simple_menu
  • genofire/leds_rgb_get_state
  • genofire/rockets-state
  • genofire/ble-follow-py
  • hauke/ble-cleanups
  • plaetzchen/ios-workaround
  • blinkisync-as-preload
  • genofire/haule-ble-fs-deactive
  • schneider/max30001-pycardium
  • schneider/max30001-epicaridum
  • schneider/max30001
  • schneider/stream-locks
  • ios-workarounds
  • schneider/fundamental-test
  • schneider/ble-buffers
  • schneider/maxim-sdk-update
  • ch3/splashscreen
  • koalo/bhi160-works-but-dirty
  • v1.8
  • v1.7
  • v1.6
  • v1.5
  • v1.4
  • v1.3
  • v1.2
  • v1.1
  • v1.0
  • release-1
  • bootloader-v1
  • v0.0
33 results

hardware.c

Blame
  • Forked from card10 / firmware
    Source project has a limited visibility.
    main.c 947 B
    /*******************************************************************************
     * License: TBD
     ******************************************************************************/
    
    /***** Includes *****/
    #include "card10.h"
    #include "leds.h"
    #include "pmic.h"
    
    #include "display.h"
    #include "gfx.h"
    
    #include "tmr_utils.h"
    
    #include <Heart.h>
    #include <stdint.h>
    #include <stdio.h>
    #include <string.h>
    
    int main(void)
    {
    	card10_init();
    	card10_diag();
    
    	gfx_copy_region(
    		&display_screen,
    		0,
    		0,
    		160,
    		80,
    		GFX_RGB565,
    		(const void *)(Heart)
    	);
    	gfx_update(&display_screen);
    
    	// 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");
    		}
    	}
    }