![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Cubebite Publish
Fork of HelloWorld_IDS01A4 by
main.h
- Committer:
- jmhong
- Date:
- 2018-02-13
- Revision:
- 14:1a6faeda6579
File content as of revision 14:1a6faeda6579:
#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 //*************************************************************************************