Verified Commit 78dfac6c authored by ch3's avatar ch3 Committed by Rahix
Browse files

chore(card10-lib): Move core1 start/stop to lib

parent 9ffab0f4
......@@ -6,16 +6,6 @@
#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;
......@@ -26,7 +16,7 @@ int main(void)
printf("API Test.\n");
printf("core0: Starting dispatcher on core1\n");
Core1_Start();
core1_start();
TMR_Delay(MXC_TMR0, MSEC(100), 0);
api_set_buzzer(1);
......
......@@ -16,16 +16,6 @@
#include <string.h>
#include <Heart.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)
{
card10_init();
......@@ -41,7 +31,7 @@ int main(void)
int h = 0;
// Release core1
Core1_Start();
core1_start();
while (1) {
#define NUM 15
......
......@@ -171,3 +171,14 @@ void card10_diag(void)
#endif
}
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;
}
......@@ -9,4 +9,7 @@ extern const gpio_cfg_t bhi_interrupt_pin;
void card10_init(void);
void card10_diag(void);
void core1_start(void);
void core1_stop(void);
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment