LT8900 Arduino Library

- Main Page
- Classes
- Files

- File List

LT8900.h
1 /*
2 Copyright (C) 2015 Rob van der Veer, <rob.c.veer@gmail.com>
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 version 2 as published by the Free Software Foundation.
7 */
8
9 #ifndef LT8900_H
10 #define LT8900_H
11
12 class LT8900
13 {
14
15 public:
20 enum DataRate
21 {
22 LT8900_1MBPS,
23 LT8910_250KBPS,
24 LT8910_125KBPS,
25 LT8910_62KBPS
26 };
27
28 private:
29 uint8_t _pin_chipselect;
30 uint8_t _pin_pktflag;
31 uint8_t _pin_reset;
32 uint8_t _channel;
33 bool _isLT8910;
34
35 public:
41 LT8900(const uint8_t cs, const uint8_t pkt, const uint8_t rst);
42
44 void begin();
45
49 void setChannel(uint8_t channel);
51 uint8_t getChannel();
52
57 void setCurrentControl(uint8_t power, uint8_t gain);
58
63 bool setDataRate(DataRate rate);
64
68 DataRate getDataRate();
69
73 uint16_t readRegister(uint8_t reg);
74
78 uint8_t writeRegister(uint8_t reg, uint16_t data);
79
85 uint8_t writeRegister2(uint8_t reg, uint8_t high, uint8_t low);
86
90 void sleep();
91
95 void whatsUp(Stream &stream);
96
98 bool available();
99
105 bool getIs8910();
106
112 int read(uint8_t *buffer, size_t maxBuffer);
113
115 void startListening();
116
120 void setClock(uint8_t clock);
121
128 bool sendPacket(uint8_t *data, size_t packetSize);
129
134 void setSyncWord(uint64_t syncWord);
135
141 void setSyncWordLength(uint8_t length);
142
149 void scanRSSI(uint16_t *buffer, uint8_t start_channel, uint8_t num_channels);
150
152 uint8_t getRSSI();
153 };
154
155
156 #endif //LT8900_H
LT8900::readRegister
uint16_t readRegister(uint8_t reg)
Definition: LT8900.cpp:207
LT8900::LT8910_125KBPS
Definition: LT8900.h:24
LT8900::setChannel
void setChannel(uint8_t channel)
Definition: LT8900.cpp:140
LT8900::sleep
void sleep()
Definition: LT8900.cpp:249
LT8900::getIs8910
bool getIs8910()
Definition: LT8900.cpp:151
LT8900::DataRate
DataRate
Definition: LT8900.h:20
LT8900::getDataRate
DataRate getDataRate()
Definition: LT8900.cpp:191
LT8900::getChannel
uint8_t getChannel()
Definition: LT8900.cpp:146
LT8900::available
bool available()
Definition: LT8900.cpp:292
LT8900::scanRSSI
void scanRSSI(uint16_t *buffer, uint8_t start_channel, uint8_t num_channels)
Definition: LT8900.cpp:415
LT8900::read
int read(uint8_t *buffer, size_t maxBuffer)
Definition: LT8900.cpp:304
LT8900::startListening
void startListening()
Definition: LT8900.cpp:337
LT8900::setDataRate
bool setDataRate(DataRate rate)
Definition: LT8900.cpp:163
LT8900::getRSSI
uint8_t getRSSI()
Definition: LT8900.cpp:407
LT8900::whatsUp
void whatsUp(Stream &stream)
Definition: LT8900.cpp:255
LT8900::LT8910_250KBPS
Definition: LT8900.h:23
LT8900
Definition: LT8900.h:12
LT8900::setSyncWordLength
void setSyncWordLength(uint8_t length)
Definition: LT8900.cpp:399
LT8900::LT8900
LT8900(const uint8_t cs, const uint8_t pkt, const uint8_t rst)
Definition: LT8900.cpp:56
LT8900::writeRegister2
uint8_t writeRegister2(uint8_t reg, uint8_t high, uint8_t low)
Definition: LT8900.cpp:231
LT8900::begin
void begin()
Definition: LT8900.cpp:70
LT8900::setCurrentControl
void setCurrentControl(uint8_t power, uint8_t gain)
Definition: LT8900.cpp:156
LT8900::setSyncWord
void setSyncWord(uint64_t syncWord)
Definition: LT8900.cpp:391
LT8900::setClock
void setClock(uint8_t clock)
Definition: LT8900.cpp:347
LT8900::sendPacket
bool sendPacket(uint8_t *data, size_t packetSize)
Definition: LT8900.cpp:357
LT8900::writeRegister
uint8_t writeRegister(uint8_t reg, uint16_t data)
Definition: LT8900.cpp:223
LT8900::LT8910_62KBPS
Definition: LT8900.h:25