Select Git revision
-
Paul Sokolovsky authored
Previously they used historical "pyb" affix causing confusion and inconsistency (there's no "pyb" module in modern ports; but people took esp8266 port as an example, and "pyb" naming kept proliferating, while other people complained that source structure is not clear).
Paul Sokolovsky authoredPreviously they used historical "pyb" affix causing confusion and inconsistency (there's no "pyb" module in modern ports; but people took esp8266 port as an example, and "pyb" naming kept proliferating, while other people complained that source structure is not clear).
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);
}
}