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.
main.cpp
- Committer:
- davolfman
- Date:
- 2017-11-09
- Revision:
- 0:b2f7400596ce
- Child:
- 1:f3350a372732
File content as of revision 0:b2f7400596ce:
#include "mbed.h" AnalogOut DAC0(PA_4);//Not labeled in the docs for the f401, but seems to be for all AnalogOut DAC1(PA_5); 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 ADC4(PA_4);//we're using these for output //AnalogIn ADC5(PA_5);//we're using these for output AnalogIn ADC6(PA_6); AnalogIn ADC7(PA_7); //AnalogIn ADC8(PB_0);//lets leave the 2 we aren't using in a single port //AnalogIn ADC9(PB_1);//that way we know there's not ADCs on one of them AnalogIn ADC10(PC_0); AnalogIn ADC11(PC_1); AnalogIn ADC12(PC_2); AnalogIn ADC13(PC_3); AnalogIn ADC14(PC_4); AnalogIn ADC15(PC_5); //Renaming ports #define inVol ADC0 #define inModAmt ADC1 #define inCarA ADC6 #define inCarD ADC7 #define inCarS ADC10 #define inCarR ADC11 #define inModA ADC12 #define inModD ADC13 #define inModS ADC14 #define inModR ADC15 #define outMono DAC0 #define numKeys 88 //possible constants int carrierIncrements[numKeys]; //non-constants int FMmult; int Volume; bool keysPressed[numKeys]; int carrierPhases[numKeys]; int modulatorPhases[numKeys]; short envelopeStatesC[numKeys]; short envelopeStatesM[numKeys]; int envelopeAmpsC[numKeys]; int envleopeAmpsM[numKeys]; int main() { }