-
大小: 126KB文件类型: .zip金币: 1下载: 0 次发布日期: 2021-06-02
- 语言: Java
- 标签: usb-serial Android 串口驱动
资源简介
git上找到的,用于usb-serial 串口通信的几乎所有驱动。下载后打开文件看文件名就可知道。供大家研究使用
代码片段和文件信息
/* Copyright 2011-2013 Google Inc.
* Copyright 2013 mike wakerly
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not write to the Free Software
* Foundation Inc. 51 Franklin Street Fifth Floor Boston MA 02110-1301
* USA.
*
* Project home page: https://github.com/mik3y/usb-serial-for-android
*/
package com.hoho.android.usbserial.examples;
import android.app.Activity;
import android.content.Context;
import android.hardware.usb.UsbDevice;
import android.hardware.usb.UsbManager;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.SystemClock;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.TwoLineListItem;
import com.hoho.android.usbserial.driver.UsbSerialDriver;
import com.hoho.android.usbserial.driver.UsbSerialPort;
import com.hoho.android.usbserial.driver.UsbSerialProber;
import com.hoho.android.usbserial.util.HexDump;
import java.util.ArrayList;
import java.util.List;
/**
* Shows a {@link ListView} of available USB devices.
*
* @author mike wakerly (opensource@hoho.com)
*/
public class DeviceListActivity extends Activity {
private final String TAG = DeviceListActivity.class.getSimpleName();
private UsbManager mUsbManager;
private ListView mListView;
private TextView mProgressBartitle;
private ProgressBar mProgressBar;
private static final int MESSAGE_REFRESH = 101;
private static final long REFRESH_TIMEOUT_MILLIS = 5000;
private final Handler mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case MESSAGE_REFRESH:
refreshDeviceList();
mHandler.sendEmptyMessageDelayed(MESSAGE_REFRESH REFRESH_TIMEOUT_MILLIS);
break;
default:
super.handleMessage(msg);
break;
}
}
};
private List mEntries = new ArrayList();
private ArrayAdapter mAdapter;
@Override
public void onCreate(Bundle saved
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-09-11 20:32 usb-serial-for-android-master\
文件 506 2016-09-11 20:32 usb-serial-for-android-master\.gitignore
目录 0 2016-09-11 20:32 usb-serial-for-android-master\.idea\
文件 22 2016-09-11 20:32 usb-serial-for-android-master\.idea\.name
文件 656 2016-09-11 20:32 usb-serial-for-android-master\.idea\compiler.xm
目录 0 2016-09-11 20:32 usb-serial-for-android-master\.idea\copyright\
文件 74 2016-09-11 20:32 usb-serial-for-android-master\.idea\copyright\profiles_settings.xm
文件 1375 2016-09-11 20:32 usb-serial-for-android-master\.idea\misc.xm
文件 598 2016-09-11 20:32 usb-serial-for-android-master\.idea\modules.xm
文件 167 2016-09-11 20:32 usb-serial-for-android-master\.idea\vcs.xm
文件 709 2016-09-11 20:32 usb-serial-for-android-master\CHANGELOG.txt
文件 24436 2016-09-11 20:32 usb-serial-for-android-master\LICENSE.txt
文件 5587 2016-09-11 20:32 usb-serial-for-android-master\README.md
目录 0 2016-09-11 20:32 usb-serial-for-android-master\arduino\
文件 1348 2016-09-11 20:32 usb-serial-for-android-master\arduino\serial_test.ino
文件 240 2016-09-11 20:32 usb-serial-for-android-master\build.gradle
目录 0 2016-09-11 20:32 usb-serial-for-android-master\gradle\
目录 0 2016-09-11 20:32 usb-serial-for-android-master\gradle\wrapper\
文件 49896 2016-09-11 20:32 usb-serial-for-android-master\gradle\wrapper\gradle-wrapper.jar
文件 232 2016-09-11 20:32 usb-serial-for-android-master\gradle\wrapper\gradle-wrapper.properties
文件 5080 2016-09-11 20:32 usb-serial-for-android-master\gradlew
文件 2404 2016-09-11 20:32 usb-serial-for-android-master\gradlew.bat
文件 51 2016-09-11 20:32 usb-serial-for-android-master\settings.gradle
目录 0 2016-09-11 20:32 usb-serial-for-android-master\usbSerialExamples\
文件 474 2016-09-11 20:32 usb-serial-for-android-master\usbSerialExamples\build.gradle
目录 0 2016-09-11 20:32 usb-serial-for-android-master\usbSerialExamples\src\
目录 0 2016-09-11 20:32 usb-serial-for-android-master\usbSerialExamples\src\main\
文件 1541 2016-09-11 20:32 usb-serial-for-android-master\usbSerialExamples\src\main\AndroidManifest.xm
目录 0 2016-09-11 20:32 usb-serial-for-android-master\usbSerialExamples\src\main\java\
目录 0 2016-09-11 20:32 usb-serial-for-android-master\usbSerialExamples\src\main\java\src\
目录 0 2016-09-11 20:32 usb-serial-for-android-master\usbSerialExamples\src\main\java\src\com\
............此处省略47个文件信息
相关资源
- News_AndroidStudio源代码
- 微信APP支付服务端和Android 端详解及其
- websocket 依赖包,android和java都可以
- android简单音乐播放器源码
- Android系统下选择图片及裁剪
- simg2img工具
- make_ext4fs
- android-serialport-api串口通信精简demo
- android多点触控 两指缩放的demo
- linphone.zip
- AndroidSupportV7
- 疯狂的Android讲义第三版 源码
- 基于android的学生信息管理系统
- 基于Android平台的音乐播放器开发和应
- android 登录 注册
- 讯飞语音类jar包
- android api 调用接口使用说明
- android开发 小车跟随键盘上下左右键而
- android个人收入支出记录
- android家庭财务管理-开题报告
- Google Android手机嵌入式系统的研究与开
- Android activity劫持
- Android自定义View之带小圆圈的倒计时圆
- Android 仿QQ侧滑删除—一个满足ListVi
- Android自定义View之可随时暂停、开启的
- android手机通讯录备份还原代码
- Android Wi-Fi 支持中文SSID修改 Patch
- android 源码 短信收发工具
- android studio finished with non-zero exit val
- android实训报告
评论
共有 条评论