![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
testtest
Dependencies: 1_cubebite_ev-cog-ad3029lz_433MHz_1nd_certTest stm-spirit1-rf-driver_for_cubebite2
Fork of cubebite_rnd_ev-cog-ad3029lz_433MHz_2nd_testing2_RF10CountSensingCheckOK_180619_initReviseTest by
main.h@1:04f46755f8af, 2018-06-22 (annotated)
- Committer:
- jmhong
- Date:
- Fri Jun 22 03:43:49 2018 +0000
- Revision:
- 1:04f46755f8af
- Parent:
- 0:c2a57b2f934e
180622 HJM : 10 Count sensing data RF send
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jmhong | 0:c2a57b2f934e | 1 | #pragma once |
jmhong | 0:c2a57b2f934e | 2 | |
jmhong | 1:04f46755f8af | 3 | //#ifndef __MBED_H__ |
jmhong | 1:04f46755f8af | 4 | //#define __MBED_H__ |
jmhong | 1:04f46755f8af | 5 | //#include "mbed.h" |
jmhong | 1:04f46755f8af | 6 | //#endif //__MBED_H__ |
jmhong | 0:c2a57b2f934e | 7 | |
jmhong | 1:04f46755f8af | 8 | //#ifndef __SIMPLESPIRIT1_H__ |
jmhong | 1:04f46755f8af | 9 | //#define __SIMPLESPIRIT1_H__ |
jmhong | 1:04f46755f8af | 10 | //#include "SimpleSpirit1.h" |
jmhong | 1:04f46755f8af | 11 | //#endif //__SIMPLESPIRIT1_H__ |
jmhong | 0:c2a57b2f934e | 12 | |
jmhong | 0:c2a57b2f934e | 13 | |
jmhong | 0:c2a57b2f934e | 14 | |
jmhong | 0:c2a57b2f934e | 15 | |
jmhong | 0:c2a57b2f934e | 16 | |
jmhong | 1:04f46755f8af | 17 | // |
jmhong | 1:04f46755f8af | 18 | ////************************************************************************************* |
jmhong | 1:04f46755f8af | 19 | ////Global variable : LEDs and user buttons by board |
jmhong | 1:04f46755f8af | 20 | ////************************************************************************************* |
jmhong | 1:04f46755f8af | 21 | //#ifdef CUBEBITE_BOARD_F401RE |
jmhong | 1:04f46755f8af | 22 | //static DigitalOut TestLED(D5); /* LED of IDS01A4/5 */ |
jmhong | 1:04f46755f8af | 23 | //#endif |
jmhong | 1:04f46755f8af | 24 | // |
jmhong | 1:04f46755f8af | 25 | //#ifdef CUBEBITE_BOARD_F746ZG |
jmhong | 1:04f46755f8af | 26 | //static DigitalOut TestLED(PB_0); /* LED of IDS01A4/5 */ |
jmhong | 1:04f46755f8af | 27 | //static DigitalOut TestLED2(PB_7); /* LED of IDS01A4/5 */ |
jmhong | 1:04f46755f8af | 28 | //static DigitalOut TestLED3(PB_14); /* LED of IDS01A4/5 */ |
jmhong | 1:04f46755f8af | 29 | //#endif |
jmhong | 1:04f46755f8af | 30 | // |
jmhong | 1:04f46755f8af | 31 | //#ifdef CUBEBITE_RF_USER_BUTTON_SEND_TEST |
jmhong | 1:04f46755f8af | 32 | //static InterruptIn event(USER_BUTTON); /* Interrupt event to give userinterface to send pkt. */ |
jmhong | 1:04f46755f8af | 33 | //#endif |
jmhong | 1:04f46755f8af | 34 | ////************************************************************************************* |
jmhong | 1:04f46755f8af | 35 | // |
jmhong | 1:04f46755f8af | 36 | // |
jmhong | 1:04f46755f8af | 37 | // |
jmhong | 1:04f46755f8af | 38 | // |
jmhong | 0:c2a57b2f934e | 39 | |
jmhong | 0:c2a57b2f934e | 40 | //************************************************************************************* |
jmhong | 0:c2a57b2f934e | 41 | //Global variable : Rf Send, read Buffer |
jmhong | 0:c2a57b2f934e | 42 | //************************************************************************************* |
jmhong | 0:c2a57b2f934e | 43 | /* 180108 cubebite HJM : send testing, orignal code */ |
jmhong | 1:04f46755f8af | 44 | #define TEST_STR_LEN (91) |
jmhong | 1:04f46755f8af | 45 | //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'}; |
jmhong | 1:04f46755f8af | 46 | static uint8_t uiSendBuf[TEST_STR_LEN] ={ 0, }; |
jmhong | 1:04f46755f8af | 47 | static volatile uint8_t dataCount = 0; |
jmhong | 0:c2a57b2f934e | 48 | 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'}; |
jmhong | 0:c2a57b2f934e | 49 | //************************************************************************************* |
jmhong | 0:c2a57b2f934e | 50 | |
jmhong | 0:c2a57b2f934e | 51 | |
jmhong | 0:c2a57b2f934e | 52 | |
jmhong | 0:c2a57b2f934e | 53 | //************************************************************************************* |
jmhong | 0:c2a57b2f934e | 54 | //Global variable : tx, rx Flag |
jmhong | 0:c2a57b2f934e | 55 | //************************************************************************************* |
jmhong | 1:04f46755f8af | 56 | //static volatile bool bRxDoneFlag = false; |
jmhong | 1:04f46755f8af | 57 | //static volatile bool bTxDoneFlag = false; |
jmhong | 1:04f46755f8af | 58 | //static volatile bool bSendDataFlag = false; |
jmhong | 0:c2a57b2f934e | 59 | //************************************************************************************* |
jmhong | 0:c2a57b2f934e | 60 | |
jmhong | 0:c2a57b2f934e | 61 | |
jmhong | 0:c2a57b2f934e | 62 | |
jmhong | 0:c2a57b2f934e | 63 | |
jmhong | 0:c2a57b2f934e | 64 | //************************************************************************************* |
jmhong | 0:c2a57b2f934e | 65 | //Global variable : Testing |
jmhong | 0:c2a57b2f934e | 66 | //************************************************************************************* |
jmhong | 0:c2a57b2f934e | 67 | |
jmhong | 0:c2a57b2f934e | 68 | /* Test : RF Speed Test */ |
jmhong | 0:c2a57b2f934e | 69 | #ifdef CUBEBITE_RF_SPEED_TEST_SEND_ON |
jmhong | 0:c2a57b2f934e | 70 | static clock_t clocktimeRFSpeedTestStart, clocktimeRFSpeedTestEnd; |
jmhong | 0:c2a57b2f934e | 71 | static float fRfSpeedTestResultTime; |
jmhong | 0:c2a57b2f934e | 72 | |
jmhong | 0:c2a57b2f934e | 73 | static bool bIsSendFirstClockFunctionStarted = false; |
jmhong | 0:c2a57b2f934e | 74 | static bool bIsSetSendFlag = false; |
jmhong | 0:c2a57b2f934e | 75 | #endif |
jmhong | 0:c2a57b2f934e | 76 | |
jmhong | 0:c2a57b2f934e | 77 | |
jmhong | 0:c2a57b2f934e | 78 | #ifdef CUBEBITE_RF_SPEED_TEST_RECV_ON |
jmhong | 0:c2a57b2f934e | 79 | #define TEST_ACK_STR_LEN (6) |
jmhong | 0:c2a57b2f934e | 80 | static uint8_t uiSendAckBuf[TEST_ACK_STR_LEN] ={'O','K'}; |
jmhong | 0:c2a57b2f934e | 81 | size_t sizetCurrAckBufLen = strlen((const char*)uiSendAckBuf) + 1; |
jmhong | 0:c2a57b2f934e | 82 | |
jmhong | 0:c2a57b2f934e | 83 | static bool bIsAckSended = false; |
jmhong | 0:c2a57b2f934e | 84 | #endif |
jmhong | 0:c2a57b2f934e | 85 | //************************************************************************************* |
jmhong | 0:c2a57b2f934e | 86 | |
jmhong | 0:c2a57b2f934e | 87 | |
jmhong | 0:c2a57b2f934e | 88 | |
jmhong | 0:c2a57b2f934e | 89 | |
jmhong | 0:c2a57b2f934e | 90 | |
jmhong | 0:c2a57b2f934e | 91 | |
jmhong | 0:c2a57b2f934e | 92 | |
jmhong | 0:c2a57b2f934e | 93 | |
jmhong | 0:c2a57b2f934e | 94 | |
jmhong | 0:c2a57b2f934e | 95 | |
jmhong | 0:c2a57b2f934e | 96 | |
jmhong | 0:c2a57b2f934e | 97 | |
jmhong | 0:c2a57b2f934e | 98 | |
jmhong | 0:c2a57b2f934e | 99 | |
jmhong | 0:c2a57b2f934e | 100 |