SmartOS/Board/Pandora.h

64 lines
1.1 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef _Pandora_H_
#define _Pandora_H_
#include "Kernel\Sys.h"
#include "Net\ITransport.h"
#include "Net\Socket.h"
#include "Device\RTC.h"
#include "Message\ProxyFactory.h"
#include "App\Alarm.h"
// 潘多拉0903
class PA0903
{
public:
List<Pin> LedPins;
List<OutputPort*> Leds;
//List<Pin> ButtonPins;
//List<InputPort*> Buttons;
List<OutputPort*> Outputs;
List<InputPort*> Inputs;
ProxyFactory* ProxyFac; // 透传管理器
Alarm* AlarmObj;
PA0903();
// 设置系统参数
void Init(ushort code, cstring name, COM message = COM2);
// 设置数据区
void* InitData(void* data, int size);
void Register(int index, IDataPort& dp);
void InitLeds();
//void InitButtons();
//void InitPort();
// 打开以太网W5500
NetworkInterface* Create5500();
// 打开Esp8266作为主控或者纯AP
NetworkInterface* Create8266();
//ITransport* Create2401();
void InitClient();
void InitNet();
void InitProxy();
void InitAlarm();
void Restore();
//void OnLongPress(InputPort* port, bool down);
static PA0903* Current;
private:
void* Data;
int Size;
};
#endif