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:
- 3:bbfc2638e858
- Parent:
- 2:8af0223a6c51
diff -r 8af0223a6c51 -r bbfc2638e858 main.cpp
--- a/main.cpp	Sun Mar 22 14:53:13 2015 +0000
+++ b/main.cpp	Tue May 12 08:46:20 2015 +0000
@@ -3,7 +3,7 @@
 * @author  Petr Dousa
 * @version V0.1
 * @date    09-March-2015
-* @brief   Read PC_15, PC_14 and PC_13 and if there are on log.1, LED is blinking,
+* @brief   Read PC_15, PC_14 and PC_13 and if they're on high level, LED is blinking,
 ***********************************************************************************/
 
 /**************************************************************************************************************************************************/
@@ -25,8 +25,8 @@
 /* Variables ---------------------------------------------------------------------*/
 
 //mbed - initialization of peripherals
-PortIn myIOs(PortC, 0xE000); // inicialize port PC_15 + PC_14 + PC_13
-DigitalOut myled(LED1);      // inicialize LED
+PortIn myIOs(PortC, 0xE000); // initialize port PC_15 + PC_14 + PC_13
+DigitalOut myled(LED1);      // initialize LED
  
  /* Functions----------------------------------------------------------------------*/
  
@@ -41,7 +41,7 @@
 int main() {
   myIOs.mode(PullNone); // PullDown PullUp PullNone OpenDrain
   while(1) {
-    if (myIOs.read() != 0xE000 && myIOs != 0xE000) { // Any of the 3 IOs is low, two posibility to read value
+    if (myIOs.read() != 0xE000 && myIOs != 0xE000) { // Any of the 3 IOs is low, change led state
       myled = !myled; // Toggle LED state
       wait(0.2);
     }