JunMo Hong / Mbed 2 deprecated cubebite_rnd_SPSGRFC433

Dependencies:   mbed

Fork of HelloWorld_IDS01A4 by ST

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.h Source File

main.h

00001 #pragma once
00002 
00003 #ifndef __MBED_H__
00004 #define __MBED_H__
00005 #include "mbed.h"
00006 #endif  //__MBED_H__
00007 
00008 #ifndef __SIMPLESPIRIT1_H__
00009 #define __SIMPLESPIRIT1_H__
00010 #include "SimpleSpirit1.h"
00011 #endif  //__SIMPLESPIRIT1_H__
00012 
00013 
00014 //*************************************************************************************
00015 //Global variable : LEDs and user buttons by board
00016 //*************************************************************************************
00017 #ifdef  CUBEBITE_BOARD_F401RE
00018 static DigitalOut TestLED(D5);         /* LED of IDS01A4/5 */
00019 #endif
00020 
00021 #ifdef  CUBEBITE_BOARD_F746ZG
00022 static DigitalOut TestLED(PB_0);         /* LED of IDS01A4/5 */
00023 static DigitalOut TestLED2(PB_7);         /* LED of IDS01A4/5 */
00024 static DigitalOut TestLED3(PB_14);         /* LED of IDS01A4/5 */
00025 #endif
00026 
00027 #ifdef  CUBEBITE_RF_USER_BUTTON_SEND_TEST
00028 static InterruptIn event(USER_BUTTON); /* Interrupt event to give userinterface to send pkt. */
00029 #endif
00030 //*************************************************************************************
00031 
00032 
00033 
00034 
00035 
00036 //*************************************************************************************
00037 //Global variable : Rf Send, read Buffer
00038 //*************************************************************************************
00039 /* 180108 cubebite HJM : send testing, orignal code  */
00040 #define TEST_STR_LEN (32)
00041 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'};
00042 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'};
00043 //*************************************************************************************
00044 
00045 
00046 
00047 //*************************************************************************************
00048 //Global variable : tx, rx Flag
00049 //*************************************************************************************
00050 static volatile bool bRxDoneFlag = false; 
00051 static volatile bool bTxDoneFlag = false; 
00052 static volatile bool bSendDataFlag = false;
00053 //*************************************************************************************
00054 
00055 
00056 
00057 
00058 //*************************************************************************************
00059 //Global variable : Testing
00060 //*************************************************************************************
00061 
00062 /* Test : RF Speed Test */
00063 #ifdef  CUBEBITE_RF_SPEED_TEST_SEND_ON
00064 static clock_t clocktimeRFSpeedTestStart, clocktimeRFSpeedTestEnd;
00065 static float fRfSpeedTestResultTime;
00066 
00067 static bool bIsSendFirstClockFunctionStarted = false;
00068 static bool bIsSetSendFlag = false;
00069 #endif
00070 
00071 
00072 #ifdef  CUBEBITE_RF_SPEED_TEST_RECV_ON
00073 #define TEST_ACK_STR_LEN (6)
00074 static uint8_t uiSendAckBuf[TEST_ACK_STR_LEN] ={'O','K'};
00075 size_t sizetCurrAckBufLen = strlen((const char*)uiSendAckBuf) + 1;
00076 
00077 static bool bIsAckSended = false;
00078 #endif
00079 //*************************************************************************************
00080 
00081 
00082 
00083 
00084 
00085 
00086 
00087 
00088 
00089 
00090 
00091 
00092 
00093 
00094