DISCO-F746NGのAudioInからの音声信号をLCDに波形として出力する、簡易なオシロスコープです。 This program is easy oscilloscope. The program draws waveform of signals from AudioIn on DISCO-F746NG.
Dependencies: BSP_DISCO_F746NG_patch_fixed LCD_DISCO_F746NG mbed
Diff: common.cpp
- Revision:
- 0:36a62c23e60c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/common.cpp Sat Dec 26 14:51:48 2015 +0000 @@ -0,0 +1,22 @@ +#include "main.h" + +DigitalOut led1(LED1); + +void error_trap() +{ + printlcd("### ERROR"); + while(1) { + led1 = !led1; + wait_ms(250); + } +} + +void printlcd(const char *str) +{ + printlcdAt(str, 0); +} + +void printlcdAt(const char *str, uint16_t line) +{ + lcd.DisplayStringAt(0, LINE(line), (uint8_t *)str, LEFT_MODE); +} \ No newline at end of file