kjj
Dependencies: mbed-rtos mbed Xbus
Fork of MTi-1_example by
Revision 69:cb7fbf7821b5, committed 2016-12-05
- Comitter:
- tjerkhofmeijer
- Date:
- Mon Dec 05 15:23:06 2016 +0000
- Parent:
- 67:5c6676f25ffd
- Parent:
- 68:6d6dbeefd196
- Child:
- 70:5454a6ddee8a
- Commit message:
- Adding support for the F401RE Nucleo board
Changed in this revision
--- a/main.cpp Wed Oct 14 14:37:09 2015 +0200
+++ b/main.cpp Mon Dec 05 15:23:06 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())
{
