当我想编写关于让我们说zigbee库的代码时,我将如何知道zigbee对象支持哪些函数?请帮忙。
答案 0 :(得分:0)
让我们说你想知道SoftwareSerial.h提供了什么。在Arduino目录中搜索它,例如:C:\ Program Files(x86)\ Arduino。所有公共方法都可供您使用。
这适用于已安装的Arduino IDE库:
SoftwareSerial.h:
#include <inttypes.h>
#include <Stream.h>
.........
.........
class SoftwareSerial : public Stream
{
private:
// per object data
uint8_t _receivePin;
uint8_t _receiveBitMask;
volatile uint8_t *_receivePortRegister;
uint8_t _transmitBitMask;
volatile uint8_t *_transmitPortRegister;
.........
.........
public:
// public methods
SoftwareSerial(uint8_t receivePin, uint8_t transmitPin, bool inverse_logic = false);
~SoftwareSerial();
void begin(long speed);
bool listen();
void end();
bool isListening() { return this == active_object; }
bool overflow() { bool ret = _buffer_overflow; _buffer_overflow = false; return ret; }
int peek();
virtual size_t write(uint8_t byte);
virtual int read();
virtual int available();
virtual void flush();
using Print::write;
// public only for easy access by interrupt handlers
static inline void handle_interrupt();
};
通常打开库头文件,您可以使用所有公共方法和属性。