180718 HJM : 8 Count sensing data RF send, certTest, temp(cold)Test_ take over and turn over

Dependencies:   1_cubebite_ev-cog-ad3029lz_433MHz_1nd_certTest stm-spirit1-rf-driver_for_cubebite2

Fork of cubebite_ev-cog-ad3029lz_433MHz_1nd_certTest by JunMo Hong

Revision:
0:c2a57b2f934e
Child:
1:04f46755f8af
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.h	Wed Mar 21 05:06:15 2018 +0000
@@ -0,0 +1,98 @@
+#pragma once
+
+#ifndef __MBED_H__
+#define __MBED_H__
+#include "mbed.h"
+#endif  //__MBED_H__
+
+#ifndef __SIMPLESPIRIT1_H__
+#define __SIMPLESPIRIT1_H__
+#include "SimpleSpirit1.h"
+#endif  //__SIMPLESPIRIT1_H__
+
+
+
+
+
+
+//*************************************************************************************
+//Global variable : LEDs and user buttons by board
+//*************************************************************************************
+#ifdef  CUBEBITE_BOARD_F401RE
+static DigitalOut TestLED(D5);         /* LED of IDS01A4/5 */
+#endif
+
+#ifdef  CUBEBITE_BOARD_F746ZG
+static DigitalOut TestLED(PB_0);         /* LED of IDS01A4/5 */
+static DigitalOut TestLED2(PB_7);         /* LED of IDS01A4/5 */
+static DigitalOut TestLED3(PB_14);         /* LED of IDS01A4/5 */
+#endif
+
+#ifdef  CUBEBITE_RF_USER_BUTTON_SEND_TEST
+static InterruptIn event(USER_BUTTON); /* Interrupt event to give userinterface to send pkt. */
+#endif
+//*************************************************************************************
+
+
+
+
+
+//*************************************************************************************
+//Global variable : Rf Send, read Buffer
+//*************************************************************************************
+/* 180108 cubebite HJM : send testing, orignal code  */
+#define TEST_STR_LEN (32)
+static uint8_t uiSendBuf[TEST_STR_LEN] ={'S','P','I','R','I','T','1',' ','H','E','L','L','O',' ','W','O','R','L','D',' ','P','2','P',' ','D','E','M','O'};
+static uint8_t uiRendBuf[TEST_STR_LEN] ={'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'};
+//*************************************************************************************
+
+
+
+//*************************************************************************************
+//Global variable : tx, rx Flag
+//*************************************************************************************
+static volatile bool bRxDoneFlag = false; 
+static volatile bool bTxDoneFlag = false; 
+static volatile bool bSendDataFlag = false;
+//*************************************************************************************
+
+
+
+
+//*************************************************************************************
+//Global variable : Testing
+//*************************************************************************************
+
+/* Test : RF Speed Test */
+#ifdef  CUBEBITE_RF_SPEED_TEST_SEND_ON
+static clock_t clocktimeRFSpeedTestStart, clocktimeRFSpeedTestEnd;
+static float fRfSpeedTestResultTime;
+
+static bool bIsSendFirstClockFunctionStarted = false;
+static bool bIsSetSendFlag = false;
+#endif
+
+
+#ifdef  CUBEBITE_RF_SPEED_TEST_RECV_ON
+#define TEST_ACK_STR_LEN (6)
+static uint8_t uiSendAckBuf[TEST_ACK_STR_LEN] ={'O','K'};
+size_t sizetCurrAckBufLen = strlen((const char*)uiSendAckBuf) + 1;
+
+static bool bIsAckSended = false;
+#endif
+//*************************************************************************************
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+