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: BSP_DISCO_F746NG_patch_fixed LCD_DISCO_F746NG TS_DISCO_F746NG FATFileSystem TinyJpgDec_interwork mbed-src
Revision 8:51e0f01d5c74, committed 2015-11-12
- Comitter:
- the_sz
- Date:
- Thu Nov 12 22:01:17 2015 +0000
- Parent:
- 7:dc29f6647486
- Child:
- 9:fe2c9b3a312b
- Commit message:
- sound test
Changed in this revision
| BSP_DISCO_F746NG_patch.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/BSP_DISCO_F746NG_patch.lib Thu Nov 12 21:21:48 2015 +0000 +++ b/BSP_DISCO_F746NG_patch.lib Thu Nov 12 22:01:17 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/NirT/code/BSP_DISCO_F746NG_patch/#bf157336ad2b +http://developer.mbed.org/users/NirT/code/BSP_DISCO_F746NG_patch/#3c0a51826ecc
--- a/main.cpp Thu Nov 12 21:21:48 2015 +0000
+++ b/main.cpp Thu Nov 12 22:01:17 2015 +0000
@@ -63,6 +63,24 @@
}
}
+#include "stm32746g_discovery_audio.h"
+
+uint16_t buffer[2000];
+void BSP_AUDIO_OUT_TransferComplete_CallBack(void)
+{
+ DPrintf("***1");
+ BSP_AUDIO_OUT_Stop(CODEC_PDWN_SW);
+}
+void BSP_AUDIO_OUT_HalfTransfer_CallBack(void)
+{
+ DPrintf("***2");
+ BSP_AUDIO_OUT_Stop(CODEC_PDWN_SW);
+}
+void HAL_SAI_TxCpltCallback(SAI_HandleTypeDef *hsai)
+{
+ DPrintf("***3");
+}
+
int main()
{
debug_Init();
@@ -77,7 +95,19 @@
Config_Init();
-//BSP_AUDIO_OUT_Play(NULL,28);
+
+// OUTPUT_DEVICE_SPEAKER OUTPUT_DEVICE_BOTH
+BSP_AUDIO_OUT_Init(OUTPUT_DEVICE_HEADPHONE,100,8000);
+uint32_t index;
+for (index=0;index<100;index++)
+{
+ if ((index % 2)==0)
+ buffer[index]=0x0000;
+ else
+ buffer[index]=0x7000;
+}
+
+BSP_AUDIO_OUT_Play(buffer, sizeof(buffer)*sizeof(uint16_t));
/*
#include "SDFileSystem.h"
SDFileSystem sd(PD_2, PC_8, PC_12, PC_11, "sd"); // MOSI, MISO, SCLK, SSEL