Ai
1 Star 0 Fork 0

DFRobot/pxt-HTTP-MQTT

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Obloq.cpp 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
TgJe 提交于 2020-07-24 13:02 +08:00 . Modify the bug that cannot be connected to the network
#include "pxt.h"
using namespace pxt;
namespace Obloq {
//%
void obloqSetTxBufferSize(int size){
if(size > 100) {
size = 100;
}
uBit.serial.setTxBufferSize(size);
}
//%
void obloqSetRxBufferSize(int size){
if(size > 100) {
size = 100;
}
uBit.serial.setRxBufferSize(size);
}
//%
void obloqEventOn(){
uBit.serial.eventOn(ManagedString("\r"), MicroBitSerialMode::ASYNC);
}
//%
void obloqClearRxBuffer(){
uBit.serial.clearRxBuffer();
}
//%
void obloqClearTxBuffer(){
uBit.serial.clearTxBuffer();
}
//%
void forever_stubs(void *a) {
runAction0((Action)a);
}
//%
void obloqforevers(Action a) {
if (a != 0) {
incr(a);
create_fiber(forever_stubs, (void*)a);
}
}
//%
void obloqWriteString(StringData *text) {
if (!text) {
return;
}
uBit.serial.send(ManagedString(text));
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dfrobot/pxt-HTTP-MQTT.git
git@gitee.com:dfrobot/pxt-HTTP-MQTT.git
dfrobot
pxt-HTTP-MQTT
pxt-HTTP-MQTT
master

搜索帮助