fermentord/vendor/github.com/JuulLabs-OSS/ble/linux/att/att.go
Søren Rasmussen 07a23c1845
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Upgrade to go 1.20 and add vendor catalog
2023-04-22 10:37:23 +02:00

30 lines
1.1 KiB
Go

package att
import "errors"
var (
// ErrInvalidArgument means one or more of the arguments are invalid.
ErrInvalidArgument = errors.New("invalid argument")
// ErrInvalidResponse means one or more of the response fields are invalid.
ErrInvalidResponse = errors.New("invalid response")
// ErrSeqProtoTimeout means the request hasn't been acknowledged in 30 seconds.
// [Vol 3, Part F, 3.3.3]
ErrSeqProtoTimeout = errors.New("req timeout")
)
var rspOfReq = map[byte]byte{
ExchangeMTURequestCode: ExchangeMTUResponseCode,
FindInformationRequestCode: FindInformationResponseCode,
FindByTypeValueRequestCode: FindByTypeValueResponseCode,
ReadByTypeRequestCode: ReadByTypeResponseCode,
ReadRequestCode: ReadResponseCode,
ReadBlobRequestCode: ReadBlobResponseCode,
ReadMultipleRequestCode: ReadMultipleResponseCode,
ReadByGroupTypeRequestCode: ReadByGroupTypeResponseCode,
WriteRequestCode: WriteResponseCode,
PrepareWriteRequestCode: PrepareWriteResponseCode,
ExecuteWriteRequestCode: ExecuteWriteResponseCode,
HandleValueIndicationCode: HandleValueConfirmationCode,
}