JLChen
2021-11-05 de72a7843ceb868c89fc11983e315849caa28573
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.hdl.sdk.ttl.HDLDeviceManger.Core;
 
import android.content.Context;
 
import com.hdl.sdk.ttl.Utils.LogUtils.HDLLog;
 
/**
 * Created by JLChen on 2019/7/25
 */
public class HDLTtlSdk {
 
    /**
     * 初始化 SDK
     *
     * @param context
     */
    public static void init(Context context, String mPathname, int mBaudrate) {
        HDLDeviceManager.init(context);
        HDLSerialPortCore.initHDLSerialPort(mPathname, mBaudrate);
    }
 
    /**
     * 是否开启SDK日志打印
     *
     * @param bOpen
     */
    public static void setHDLLogOpen(boolean bOpen) {
        HDLLog.setHDLLogOpen(bOpen);
    }
 
    /**
     * 释放资源 关闭串口
     */
    public static void release() {
        HDLDeviceManager.release();
    }
}