更新EsptouchForIOS
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// ESPGuideCode.m
|
||||
// EspTouchDemo
|
||||
//
|
||||
// Created by fby on 4/9/15.
|
||||
// Copyright (c) 2015 fby. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ESPGuideCode.h"
|
||||
#import "ESP_ByteUtil.h"
|
||||
|
||||
#define GUIDE_CODE_LEN 4
|
||||
|
||||
@implementation ESPGuideCode
|
||||
|
||||
- (NSData *) getU16s
|
||||
{
|
||||
UInt16 guideU16s[GUIDE_CODE_LEN];
|
||||
guideU16s[0] = 515;
|
||||
guideU16s[1] = 514;
|
||||
guideU16s[2] = 513;
|
||||
guideU16s[3] = 512;
|
||||
NSData* data = [[NSData alloc]initWithBytes:guideU16s length:GUIDE_CODE_LEN*2];
|
||||
return data;
|
||||
}
|
||||
|
||||
- (NSString *)description
|
||||
{
|
||||
NSData* data = [self getU16s];
|
||||
return [ESP_ByteUtil getHexStringByData:data];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user