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: BufferedSerial OneWire WinbondSPIFlash libxDot-dev-mbed5-deprecated
Fork of xDotBridge_update_test20180823 by
Diff: xDotBridge/src/main.cpp
- Revision:
- 39:64f79fa6e3cc
- Parent:
- 38:8a512e23d99e
- Child:
- 40:2ec4be320961
diff -r 8a512e23d99e -r 64f79fa6e3cc xDotBridge/src/main.cpp
--- a/xDotBridge/src/main.cpp Thu Jan 26 16:23:45 2017 -0700
+++ b/xDotBridge/src/main.cpp Thu Jan 26 17:27:05 2017 -0700
@@ -63,6 +63,12 @@
Serial pc(USBTX, USBRX);
+unsigned int callbackTime = 0;
+
+void testCallback () {
+ callbackTime = us_ticker_read();
+}
+
int main() {
unsigned int wakeMode;
RadioEvent events; // Custom event handler for automatically displaying RX data
@@ -184,6 +190,10 @@
uint16_t seqNum=0;
uint32_t cDwnLink = dot->getDownLinkCounter();
+ // Interrupt setup
+ intTest.pullup();
+ intTest.fall(testCallback);
+
while (true) {
std::vector<uint8_t> data;
led1=0;
@@ -260,6 +270,7 @@
//////////////
// Check interrupt
+ logInfo("Callback last called @ %d", callbackTime);
// // Check Analog
// logInfo("Read AN1/GPIO1: %f", an1.read());
@@ -293,8 +304,8 @@
// uartOut1 = !uartOut1;
// uartOut2 = !uartOut2;
-// logInfo("================================");
-// wait(1.0);
+ logInfo("================================");
+ wait(1.0);
//////////////////
// OneWire Play //
//////////////////
