📄 worwithack.h
字号:
/*******************************************************************************************************
* *
* ********** *
* ************ *
* *** *** *
* *** +++ *** *
* *** + + *** This file contains all defines and function prototypes necessary to *
* *** + run the WorWithAck example. *
* *** + + *** *
* *** +++ *** WorWithAck.h *
* *** *** *
* ************ *
* ********** *
* *
*******************************************************************************************************
* Compiler: Keil C51 V7.50 *
* Target platform: Chipcon CCxxx0 (Silabs F320) *
* Author: ESY *
*******************************************************************************************************
* Revision history: See end of file *
*******************************************************************************************************/
#include <Chipcon\srf04\regssrf04.h>
#include <Chipcon\srf04\halsrf04.h>
#include <Chipcon\srf04\ebsrf04.h>
//-------------------------------------------------------------------------------------------------------
// Defines
// Defines used as state values for state machine in main loop
#define SETUP 0
#define TX 1
#define RX 2
// Defines used as mode values for the setup menu
#define MODE_NOT_SET 0
#define MODE_TX 1
#define MODE_RX 2
// Other defines
#define GDO2_PIN P0_7
#define RX_BYTES 0x7F
//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
// Global variables
extern RF_SETTINGS code rfSettings;
extern BYTE code paTable;
extern BYTE xdata rxBuffer[]; // Buffer for RX FIFO
extern BYTE xdata asciiString[]; // Byte array used by the intToAscii(UINT32 value) function
extern UINT8 xdata joystickPosition;
extern UINT8 xdata prevJoystickPosition;
//------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
// Function declarations
void intToAscii(UINT32 value); // Converts an UINT32 value to char array, stored in asciiString[]
void showMenu(void); // Show the initial setup menu
void parseMenu(UINT8 joystickPosition); // Parses the input for menu navigation
void runTransmitter();
void runReceiver();
//-------------------------------------------------------------------------------------------------------
/******************************************************************************************************
* Revision history: *
*
* $Log: WorWithAck.h,v $
* Revision 1.2 2006/03/17 10:37:37 a0190596
* New file structure might have caused variables, defines, and functions to move.
* Comments are added.
*
* Revision 1.1 2005/10/06 12:14:34 sna
* Initial version in CVS.
*
*
*
******************************************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -