LETransceiver.h
1.08 KB
//
// LETransceiver.h
// ActsBluetoothSpeed
//
// Created by inidhu on 2019/3/15.
// Copyright © 2019 Actions. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreBluetooth/CoreBluetooth.h>
NS_ASSUME_NONNULL_BEGIN
#define KeyWriteServiceUUID @"kWriteServiceUUID"
#define KeyIndicateServiceUUID @"kIndicateServiceUUID"
#define KeyWriteCharacteristicUUID @"kWriteCharacteristicUUID"
#define KeyIndicateCharacteristicUUID @"kIndicateCharacteristicUUID"
@protocol LEConnctionDelegate <NSObject>
// 当做完相关ota的连接动作后的回调,此时手表进入固件升级进度状态
- (void)onPeripheralOtaConnected:(CBPeripheral *) peripheral;
@end
@interface LETransceiver : NSObject
@property (weak, nonatomic) id<LEConnctionDelegate> connectionDelegate;
- (void)write:(NSData *) data;
- (void)write:(NSData *) data index:(int) i;
// for BluetoothManager to call
- (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForService:(CBService *)service error:(nullable NSError *)error;
- (void)closeOTA;
@end
NS_ASSUME_NONNULL_END