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 PPP-Blinky by
Diff: main.cpp
- Revision:
- 43:aa57db08995d
- Parent:
- 42:4de44be70bfd
- Child:
- 44:d0c61ae49ea5
--- a/main.cpp Tue Jan 10 18:19:58 2017 +0000
+++ b/main.cpp Tue Jan 17 21:08:03 2017 +0000
@@ -88,6 +88,12 @@
ppp.ledState=0;
}
+void led1Toggle()
+{
+ ppp.ledState = ppp.ledState? 0 : 1;
+ led1 = ppp.ledState;
+}
+
void crcReset()
{
ppp.crc=0xffff; // crc restart
@@ -118,18 +124,12 @@
}
}
-void led1Toggle()
-{
- ppp.ledState = ppp.ledState? 0 : 1;
- led1 = ppp.ledState;
-}
-
int rxbufNotEmpty() // check if rx buffer has data
{
__disable_irq(); // critical section start
- int notEmpty = (ppp.rx.head==ppp.rx.tail) ? 0 : 1 ;
+ int emptyStatus = (ppp.rx.head==ppp.rx.tail) ? 0 : 1 ;
__enable_irq(); // critical section end
- return notEmpty;
+ return emptyStatus;
}
int pc_getBuf() // get one character from the buffer
