2 * mbed project: Simple_Square_Wave
3 * mbed board: FRDM-KL46Z
4 * Generate square waves using DigitalOut.
9 DigitalOut Square_Wave(PTD3); // Used PWM output is PTD3
10 InterruptIn Control_Testing(PTC12); // SW3
14 int START_STOP_FLAG = 0;
15 float period_s = 0.0001;
17 extern serial_t stdio_uart;
19 int main(int arc, char **argv)
21 serial_init(&stdio_uart, USBTX, USBRX);
22 serial_baud(&stdio_uart, 115200);
23 printf("starting\r\n");
25 Control_Testing.rise(&Control_T); // Enable getMode interrupt handler
30 if(START_STOP_FLAG == 1)
44 if(START_STOP_FLAG == 0)