Coder Social home page Coder Social logo

hmxbanz / mserialport Goto Github PK

View Code? Open in Web Editor NEW

This project forked from flykule/mserialport

0.0 0.0 0.0 9.58 MB

自定义串口通讯,在底层直接读写,较androidSerialPort提高性能,能够同时支持多个串口读写

C++ 75.32% C 0.47% Java 5.53% Kotlin 17.68% CMake 1.00%

mserialport's Introduction

MserialPort

旧的androidSerialPort已经过于陈旧, 不支持奇偶校验,停止位,超时等设置, 其次当用于多线程应用时表现不佳, 总体读写较单片机应用有较大差距, 经常会出现莫名其妙的延迟,因此写了一个新的串口读写库.在底层直接进行读写.

特点

  • 支持调整时间间隔, 灵活调整最大一次性读取数据与串口响应时间
  • 底层直接进行读写, 不再返回fileDescriptor指针
  • 底层直接管理串口, 添加删除等
  • 目前的线程通讯通过std::future进行, 未来考虑支持socket通信

如何使用

  1. 使用AndroidStuido->Build Apk, 生成debug包
  2. 修改生成的apk后缀为zip
  3. 解压,复制其中的lib文件夹到你的应用
  4. 复制SerialPortManager.kt这个文件,保持一样的包结构到你的src/main/java目录下
  5. 参考dmeo进行使用

效果展示

demo

mserialport's People

Contributors

flykule avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.