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
Diff: main.cpp
- Revision:
- 1:836ed9afcb8a
- Parent:
- 0:97b4f9625db2
diff -r 97b4f9625db2 -r 836ed9afcb8a main.cpp
--- a/main.cpp Tue May 24 14:16:46 2016 +0000
+++ b/main.cpp Wed May 25 06:03:39 2016 +0000
@@ -1,24 +1,13 @@
#include "mbed.h"
-PwmOut mypwm(PWM_OUT);
-
-DigitalOut myled(LED1);
-
-int main() {
-
+int main()
+ {
mypwm.period_ms(10);
- mypwm.pulsewidth_ms(1);
-
- printf("pwm set to %.2f %%\n", mypwm.read() * 100);
-
- while(1) {
- myled = !myled;
- wait(1);
+ mypwm.pulsewidth_ms(1);
}
-}
+
void _ISR _U2RXInterrupt(void)
{
-
static char Temp;
Temp=U2RXREG;
if (Receive_Flag==1)
@@ -42,8 +31,7 @@
Receive_Data[0]= Temp;
}
else
-{
-}
+{}
}
IFS1bits.U2RXIF=0;
}