Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的应用程序中有一个输出流,我只想向该流写入 3 个字节。有没有人看到一个很好的例子?字节是:
Byte command1 = 254; Byte command2 = 108; Byte command3 = 1;
谢谢
感谢您对杰克货车的投票。
我从另一个程序员发布的一些示例软件中找到了我的问题的答案。这是示例代码:
Byte *commandBytes = malloc(3); commandBytes[0] = (Byte)254; commandBytes[1] = (Byte)108; commandBytes[2] = (Byte)1; [outputStream write:(uint8_t *)commandBytes maxLength:3];
希望这对将来的人有所帮助。