From: Andy Spencer Date: Fri, 14 Mar 2014 02:30:53 +0000 (+0000) Subject: Cleanup comments and move test.cpp X-Git-Url: http://pileus.org/git/?p=~andy%2Fcsm213a-hw;a=commitdiff_plain;h=d634f081b7dceacd2b23046f75a8dc54c9f545ff Cleanup comments and move test.cpp --- diff --git a/hw2/test.cpp b/hw2/examples.cpp similarity index 100% rename from hw2/test.cpp rename to hw2/examples.cpp diff --git a/hw2/main.cpp b/hw2/main.cpp index d824863..2c0f274 100644 --- a/hw2/main.cpp +++ b/hw2/main.cpp @@ -647,7 +647,7 @@ void task_debug(uint64_t local, uint64_t world) //sirq_debug(sirq_mbed); - serial_send_event(sirq_bbb, 1, local); + //serial_send_event(sirq_bbb, 1, local); #ifdef VERBOSE sirq_printf("background - %6u.%02u -> %u.%02u\r\n", @@ -729,71 +729,10 @@ int main(int argc, char **argv) // Setup event generation emit_init(3, PTE20, PullDown); - // configure crystal oscilator for high gain operation - //MCG->C2 |= MCG_C2_HGO0_MASK; - - // Test clocks - //MCG->C1 = 0x05; // was 0x1A - //MCG->C2 = 0x2C; // was 0x24 - //MCG->C3 = 0x91; // was 0x91 - //MCG->C4 = 0x10; // was 0x10 - //MCG->C5 = 0x01; // was 0x01 - //MCG->C6 = 0x40; // was 0x40 - //MCG->S = 0x6E; // was 0x6E - //MCG->SC = 0x02; // was 0x02 - //MCG->ATCVH = 0x00; // was 0x00 - //MCG->ATCVL = 0x00; // was 0x00 - //MCG->C7 = 0x00; // was 0x00 - //MCG->C8 = 0x80; // was 0x80 - //MCG->C9 = 0x00; // was 0x00 - //MCG->C10 = 0x00; // was 0x00 - - //sirq_printf("MGC - C1 %02hx\r\n", MCG->C1); // 1A - //sirq_printf("MGC - C2 %02hx\r\n", MCG->C2); // 24 - //sirq_printf("MGC - C3 %02hx\r\n", MCG->C3); // 91 - //sirq_printf("MGC - C4 %02hx\r\n", MCG->C4); // 10 - //sirq_printf("MGC - C5 %02hx\r\n", MCG->C5); // 01 - //sirq_printf("MGC - C6 %02hx\r\n", MCG->C6); // 40 - //sirq_printf("MGC - S %02hx\r\n", MCG->S); // 6E - //sirq_printf("MGC - SC %02hx\r\n", MCG->SC); // 02 - //sirq_printf("MGC - ATCVH %02hx\r\n", MCG->ATCVH); // 00 - //sirq_printf("MGC - ATCVL %02hx\r\n", MCG->ATCVL); // 00 - //sirq_printf("MGC - C7 %02hx\r\n", MCG->C7); // 00 - //sirq_printf("MGC - C8 %02hx\r\n", MCG->C8); // 80 - //sirq_printf("MGC - C9 %02hx\r\n", MCG->C9); // 00 - //sirq_printf("MGC - C10 %02hx\r\n", MCG->C10); // 00 - // Run background loop while (true) background(); - // Performance testing - //uint64_t prev = 0, due = 0; - //uint64_t worst[10] = {}; - //int count = 0; - //while (true) { - // uint64_t local = tdma_time(); - // if (prev && (local-prev) > worst[count]) - // worst[count] = (local-prev); - // prev = local; - // if (local > due) { - // if (count == 5) { - // static char str[] = "background background background\r\n"; - // sirq_write(sirq_dbg, str, sizeof(str)); - // } - // if (count == 9) { - // sirq_printf("background\r\n"); - // for (int i = 0; i < 10; i++) { - // sirq_printf(" worst[%d] = 0.%09u\r\n", - // i, worst[i]); - // worst[i] = 0; - // } - // } - // due += NSEC_PER_SEC; - // count = (count + 1) % 10; - // } - //} - // Run tests //test_main(); diff --git a/hw2/makefile b/hw2/makefile index 697aa23..80fdcb8 100644 --- a/hw2/makefile +++ b/hw2/makefile @@ -1,7 +1,7 @@ PROG = mbed UART0 = /dev/ttyACM0 UART1 = /dev/ttyACM1 -OBJS = main.o test.o serial_irq.o serial_dma.o timer_dma.o +OBJS = main.o serial_irq.o serial_dma.o timer_dma.o CPPFLAGS = LDFLAGS = -lm