Skip to content
Snippets Groups Projects
Select Git revision
  • f8c5454b6e4c4252f711ad4665c8cfd5e108b36c
  • master default
  • analog_clock
  • mem_usage
  • longint_issue
  • more_fonts
  • more_fonts_ng
  • utime_time_ms
  • genofire/ble-personal_state
  • 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
  • schneider/fundamental-test
  • koalo/factory-reset
  • msgctl/gfx_rle
  • msgctl/faultscreen
  • v1.4
  • v1.3
  • v1.2
  • v1.1
  • v1.0
  • release-1
  • bootloader-v1
  • v0.0
29 results

main.c

Blame
  • Forked from card10 / firmware
    Source project has a limited visibility.
    main.c 768 B
    #include <stdio.h>
    #include <stdint.h>
    #include <string.h>
    
    #include "card10.h"
    #include "tmr_utils.h"
    #include "api.h"
    
    void Core1_Start(void) {
        //MXC_GCR->gp0 = (uint32_t)(&__isr_vector_core1);
        MXC_GCR->gp0 = 0x10040000;
        MXC_GCR->perckcn1 &= ~MXC_F_GCR_PERCKCN1_CPU1;
    }
    
    void Core1_Stop(void) {
        MXC_GCR->perckcn1 |= MXC_F_GCR_PERCKCN1_CPU1;
    }
    
    int main(void)
    {
        int count = 0;
    
        card10_init();
        card10_diag();
    
        printf("API Test.\n");
        printf("core0: Starting dispatcher on core1\n");
        Core1_Start();
        TMR_Delay(MXC_TMR0, MSEC(100), 0);
    
        api_set_buzzer(1);
        TMR_Delay(MXC_TMR0, MSEC(300), 0);
        api_set_buzzer(0);
    
        while(1) {
            printf("count = %d\n", count++);
    
            TMR_Delay(MXC_TMR0, SEC(1), 0);
        }
    }