]> Pileus Git - ~andy/csm213a-hw/commitdiff
Cleanup comments and move test.cpp
authorAndy Spencer <andy753421@gmail.com>
Fri, 14 Mar 2014 02:30:53 +0000 (02:30 +0000)
committerAndy Spencer <andy753421@gmail.com>
Fri, 14 Mar 2014 02:30:53 +0000 (02:30 +0000)
hw2/examples.cpp [moved from hw2/test.cpp with 100% similarity]
hw2/main.cpp
hw2/makefile

similarity index 100%
rename from hw2/test.cpp
rename to hw2/examples.cpp
index d824863b2dbc87413f57488f2acf4ff8d11f1082..2c0f2746e716f3064431fc1ee08901322fb5167e 100644 (file)
@@ -647,7 +647,7 @@ void task_debug(uint64_t local, uint64_t world)
 
        //sirq_debug(sirq_mbed);
 
 
        //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",
 
 #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);
 
        // 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();
 
        // 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();
 
        // Run tests
        //test_main();
 
index 697aa23406ae10fcc250888b8a19e1809ca2f2ca..80fdcb8140ea34552a1dc37a50d92422d7145a20 100644 (file)
@@ -1,7 +1,7 @@
 PROG  = mbed
 UART0 = /dev/ttyACM0
 UART1 = /dev/ttyACM1
 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
 
 CPPFLAGS =
 LDFLAGS  = -lm