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: mbed
Fork of STM32FMSynth by
Diff: main.cpp
- Revision:
- 6:9f8c8c3c111d
- Parent:
- 5:ac5c4bd3ef4b
- Child:
- 7:b0cd74923bc6
--- a/main.cpp Wed Nov 29 21:47:56 2017 +0000
+++ b/main.cpp Fri Dec 01 22:48:48 2017 +0000
@@ -6,8 +6,8 @@
AnalogIn ADC0(PA_0);
AnalogIn ADC1(PA_1);
-//AnalogIn ADC2(PA_2);//not labeled as such in MBED's docs for f401, yes 446
-//AnalogIn ADC3(PA_3);//not labeled as such in MBED's docs for f401, yes 446
+//AnalogIn ADC2(PA_2);//these are the uart pins!!
+//AnalogIn ADC3(PA_3);//these are the uart pins!!
//AnalogIn ADC4(PA_4);//we're using these for output
//AnalogIn ADC5(PA_5);//we're using these for output
AnalogIn ADC6(PA_6);
@@ -87,16 +87,16 @@
sum += subindex * sintable[index+1];
break;
case 1:
- sum += (4 - subindex) * sintable[1+4096-index];
- sum += subindex * sintable[4096-index];
+ sum += (4 - subindex) * sintable[1+4095-index];
+ sum += subindex * sintable[4095-index];
break;
case 2:
sum -= (4 - subindex) * sintable[index];
sum -= subindex * sintable[index+1];
break;
case 3:
- sum -= (4 - subindex) * sintable[1+4096-index];
- sum -= subindex * sintable[4096-index];
+ sum -= (4 - subindex) * sintable[1+4095-index];
+ sum -= subindex * sintable[4095-index];
break;
}
sum = sum >> 2;
