Synergia AVR 0.1

transmiter/firmware/rfm12b.h

Go to the documentation of this file.
00001 /*
00002  Copyright (c) 2010 Tymon Tobolski
00003  
00004  Permission is hereby granted, free of charge, to any person obtaining
00005  a copy of this software and associated documentation files (the
00006  "Software"), to deal in the Software without restriction, including
00007  without limitation the rights to use, copy, modify, merge, publish,
00008  distribute, sublicense, and/or sell copies of the Software, and to
00009  permit persons to whom the Software is furnished to do so, subject to
00010  the following conditions:
00011  
00012  The above copyright notice and this permission notice shall be
00013  included in all copies or substantial portions of the Software.
00014  
00015  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00016  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00017  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00018  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
00019  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00020  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00021  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00022  */
00023 
00024 #ifndef _RFM12B_H_
00025 #define _RFM12B_H_
00026 
00046 class RFM12B_Base {
00047 private:
00048         unsigned char buffer[16];
00049         char buffer_pos = 0;
00050 
00051 public:
00052         
00058         void writeCmd(unsigned int cmd);
00059         
00063         void portInit();
00064         
00068         void init();
00069         
00073         void sendByte(unsigned char data);
00074         void sendPackage();
00075         unsigned char receive();
00076 };
00077 
00078 #endif
 All Classes Files Functions Variables Defines