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-rtos mbed Xbus
Fork of MTi-1_example by
Diff: main.cpp
- Revision:
- 68:6d6dbeefd196
- Parent:
- 66:f12dec1c0c3d
- Child:
- 70:ff3afeaa31be
diff -r f12dec1c0c3d -r 6d6dbeefd196 main.cpp
--- a/main.cpp Tue Oct 06 10:29:07 2015 +0200
+++ b/main.cpp Mon Dec 05 15:20:09 2016 +0000
@@ -106,6 +106,24 @@
#define MT_NRESET PA_10
#define MT_DRDY PB_3
+#elif defined(TARGET_NUCLEO_F401RE)
+
+#define PC_TX PA_2
+#define PC_RX PA_3
+#define MT_TX PA_10
+#define MT_RX PA_9
+#define MT_SDA PB_9
+#define MT_SCL PB_8
+#define MT_ADD0 PB_13
+#define MT_ADD1 PB_14
+#define MT_ADD2 PB_15
+#define MT_MOSI PB_15
+#define MT_MISO PB_14
+#define MT_SCLK PB_13
+#define MT_nCS PB_6
+#define MT_NRESET PC_9
+#define MT_DRDY PB_3
+
#elif defined(TARGET_KL46Z)
#define PC_TX USBTX
@@ -284,7 +302,7 @@
mt.read(MTI_I2C_ADDRESS, (char*)status, sizeof(status));
uint16_t notificationSize = status[0] | (status[1] << 8);
- uint16_t measurementSize = status[2] | (status[3] <<8);
+ uint16_t measurementSize = status[2] | (status[3] << 8);
if (notificationSize)
{
@@ -849,7 +867,6 @@
pc.printf("\r\n");
}
-
int main(void)
{
XbusParserCallback xbusCallback = {};
@@ -860,7 +877,7 @@
xbusParser = XbusParser_create(&xbusCallback);
configurePcInterface();
configureMtCommunicationInterface();
-
+
printIntroMessage();
if (wakeupMotionTracker())
{

Xsens MTi 1-series