move custom ATT_ERROR_TIMEOUT to 0x7f

This commit is contained in:
Matthias Ringwald 2015-10-08 16:26:54 +02:00
parent 12a5e8daf6
commit 7fa238285e
2 changed files with 4 additions and 1 deletions

View File

@ -104,7 +104,8 @@ extern "C" {
#define ATT_ERROR_INSUFFICIENT_ENCRYPTION 0x0f
#define ATT_ERROR_UNSUPPORTED_GROUP_TYPE 0x10
#define ATT_ERROR_INSUFFICIENT_RESOURCES 0x11
#define ATT_ERROR_TIMEOUT 0x12
// custom BTstack ATT error coders
#define ATT_ERROR_TIMEOUT 0x7F
// custom BTstack error codes

View File

@ -200,11 +200,13 @@ static const char * att_errors[] = {
static const char * att_error_reserved = "Reserved";
static const char * att_error_application = "Application Error";
static const char * att_error_common_error = "Common Profile and Service Error Codes";
static const char * att_error_timeout = "Timeout";
const char * att_error_string_for_code(uint8_t code){
if (code >= 0xe0) return att_error_common_error;
if (code >= 0xa0) return att_error_reserved;
if (code >= 0x80) return att_error_application;
if (code == 0x7f) return att_error_timeout;
if (code >= 0x12) return att_error_reserved;
return att_errors[code];
}