DISCO-F746NGのAudioOutから正弦波をスイープとして出力します。ダブルバッファリングを使って、リアルタイムにデータ生成をしています。 This program outputs sine sweep from AudioOut on DISCO-F746NG. The program uses double buffering when generates data signals.

Dependencies:   BSP_DISCO_F746NG_patch_fixed LCD_DISCO_F746NG mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers common.cpp Source File

common.cpp

00001 #include "main.h"
00002 
00003 DigitalOut led1(LED1);
00004 
00005 void error_trap()
00006 {
00007     printlcd("### ERROR");
00008     while(1) {
00009         led1 = !led1;
00010         wait_ms(250);
00011     }
00012 }
00013 
00014 void printlcd(const char *str)
00015 {
00016     printlcdAt(str, 0);
00017 }
00018 
00019 void printlcdAt(const char *str, uint16_t line)
00020 {
00021     lcd.DisplayStringAt(0, LINE(line), (uint8_t *)str, LEFT_MODE);
00022 }