Cortex Challenge Team / Mbed 2 deprecated Nucleo_read_ios

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Foxnec
Date:
Tue May 12 08:46:20 2015 +0000
Parent:
2:8af0223a6c51
Commit message:
Changes in comments.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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);
     }