Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: CMSIS-DSP_for_STM32F746G BSP_DISCO_F746NG
Diff: main.cpp
- Revision:
- 10:a82b64ea1d11
- Parent:
- 9:f5b37c71856d
- Child:
- 11:4256dbbb0c89
diff -r f5b37c71856d -r a82b64ea1d11 main.cpp
--- a/main.cpp Sun Dec 29 04:15:45 2019 +0000
+++ b/main.cpp Sun Dec 29 06:29:49 2019 +0000
@@ -44,7 +44,7 @@
static void Draw_Trace(uint16_t Xpos, uint16_t L_Ypos, uint16_t R_Ypos, uint16_t* Mem_start, uint16_t Length);
uint32_t counter = 0;
-char buf[10];
+char buf[40];
int first_half_time, second_half_time, total_time;
int main()
@@ -123,21 +123,18 @@
//Erase_Trace(OSC_START_X_POS+OSC_LINE_SIZE, L_CHANNEL_Y_POS, R_CHANNEL_Y_POS, 50);
//Draw_Trace(OSC_START_X_POS+OSC_LINE_SIZE, L_CHANNEL_Y_POS, R_CHANNEL_Y_POS, (uint16_t *) AUDIO_BUFFER_IN + (AUDIO_BLOCK_SIZE), 50);
+
+
counter++;
- sprintf(buf, "%d", counter);
+ sprintf(buf, "Cycles: %9d", counter);
BSP_LCD_SetTextColor(LCD_COLOR_RED);
- BSP_LCD_DisplayStringAt(0, 46, (uint8_t *) buf, LEFT_MODE);
+ BSP_LCD_DisplayStringAt(0, 46, (uint8_t *) buf, LEFT_MODE);
+ sprintf(buf, "1:%6d 2:%6d T:%6d", first_half_time, second_half_time, total_time);
+ BSP_LCD_DisplayStringAt(0, 20, (uint8_t *) buf, LEFT_MODE);
+ audio_rec_buffer_state = BUFFER_OFFSET_NONE;
second_half_time = timer.read_us();
- sprintf(buf, "%10d", first_half_time);
- BSP_LCD_DisplayStringAt(0, 20, (uint8_t *) buf, LEFT_MODE);
- sprintf(buf, "%10d", second_half_time);
- BSP_LCD_DisplayStringAt(100, 20, (uint8_t *) buf, LEFT_MODE);
- sprintf(buf, "%10d", total_time);
- BSP_LCD_DisplayStringAt(200, 20, (uint8_t *) buf, LEFT_MODE);
-
- audio_rec_buffer_state = BUFFER_OFFSET_NONE;
}
}