Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Queue.h
00001 /* 00002 * QUEUE.h 00003 * 00004 * Created on: 2013-5-9 00005 * Author: fu 00006 */ 00007 #ifndef QUEUE_H_ 00008 #define QUEUE_H_ 00009 #include "stdint.h" 00010 #define PACKAGE_MAX 128 00011 #define RFQUENEMAX 100 00012 struct RfData 00013 { 00014 uint8_t rbuf[PACKAGE_MAX]; 00015 uint8_t length; 00016 uint8_t payloadindex; 00017 union 00018 { 00019 uint8_t rssi; 00020 uint8_t destaddress; 00021 } value; 00022 }; 00023 00024 class QUEUE { 00025 private: 00026 uint8_t front; 00027 uint8_t rear; 00028 public: 00029 struct RfData RfData[RFQUENEMAX]; 00030 QUEUE(); 00031 void init_queue(); 00032 uint8_t inqueue( ); 00033 uint8_t dequeue(); 00034 void undodequeue(); 00035 uint8_t peerqueue(); 00036 }; 00037 00038 #endif /* QUEUE_H_ */ 00039
Generated on Sat Jul 23 2022 21:53:07 by
1.7.2