You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.0 KiB

2 years ago
//
// BluetoothTool.h
// BluetoothDemo
//
// Created by mac on 17/3/16.
// Copyright © 2017年 . All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AddressBook/AddressBook.h> //通讯录库
@interface BluetoothTool : NSObject
/**
CRC校验数据是否正确
*/
+ (BOOL)checkCRCWithData:(NSMutableData *)data;
/**
* 1610
*
* @param hexString 16
*
* @return
*/
+ (int)intFromHexSrting:(NSString *)hexString;
/**
1016
@param hexNumber 10
@return
*/
+ (NSString *)stringWithHexNumber:(int)hexNumber;
/**
L1层第二个字节
@param err 1: 0:
@param ack 1: 0:
@param vision
*/
+ (Byte)stitchWithErr:(int)err
Ack:(int)ack
Vision:(int)vision;
/**
mac地址
*/
+ (NSString *)getInvertedOrderMacWithData:(NSData *)data;
/**
mac地址
*/
+ (NSString *)getPositiveSequenceMacWithData:(NSData *)data;
@end