Skip to content
Snippets Groups Projects
Select Git revision
  • max86150
  • ch3/splashscreen
  • genofire/ble-rewrite
  • ln/max68150
  • master default protected
  • koalo/bhi160-works-but-dirty
  • m
  • rahix/simple_menu
  • ios-workarounds
  • koalo/wip/i2c-for-python
  • renze/safe_mode
  • renze/hatchery_apps
  • schneider/fundamental-test
  • koalo/factory-reset
  • msgctl/gfx_rle
  • msgctl/faultscreen
  • msgctl/textbuffer_api
  • schneider/bonding
  • schneider/bootloader-update-9a0d158
  • schneider/bsec
  • v1.2
  • v1.1
  • v1.0
  • release-1
  • bootloader-v1
  • v0.0
26 results

main.c

Blame
  • Forked from card10 / firmware
    1807 commits behind the upstream repository.
    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);
        }
    }