Re: [PATCH BlueZ 2/3] unit/gatt: Add TP/GAR/CL/BV-04-C/64K test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johan,

On Mon, Jan 26, 2015 at 10:27 PM, Johan Hedberg <johan.hedberg@xxxxxxxxx> wrote:
> Hi Luiz,
>
> On Mon, Jan 26, 2015, Luiz Augusto von Dentz wrote:
>> +#define DATA_10B  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
>> +
>> +#define DATA_100B DATA_10B, DATA_10B, DATA_10B, DATA_10B, DATA_10B, \
>> +                     DATA_10B, DATA_10B, DATA_10B, DATA_10B, DATA_10B
>> +
>> +#define DATA_511B DATA_100B, DATA_100B, DATA_100B, DATA_100B, DATA_100B, \
>> +                     DATA_10B, 0xff
>> +
>> +#define DATA_512B DATA_511B, 0xff
>> +
>> +#define DATA_4KB DATA_512B, DATA_512B, DATA_512B, DATA_512B, DATA_512B, \
>> +             DATA_512B, DATA_512B, DATA_512B
>> +
>> +#define DATA_16KB DATA_4KB, DATA_4KB, DATA_4KB, DATA_4KB
>> +
>> +#define DATA_64KB DATA_16KB, DATA_16KB, DATA_16KB, DATA_16KB
>> +
>> +/* 64KB + 383B */
>> +static const uint8_t long_data_2[] = { DATA_64KB, DATA_100B, DATA_100B,
>> +                                     DATA_100B, DATA_10B, DATA_10B, DATA_10B,
>> +                                     DATA_10B, DATA_10B, DATA_10B, DATA_10B,
>> +                                     DATA_10B, 0xff, 0xff, 0xff };
>
> Instead of all these complex defines wouldn't it be easier to just:
>
> static const uint8_t long_data_2[0xffff + 383];
>
> The only difference is that you'd have zeros instead of 0xff bytes as
> content.

Indeed it is much simpler, the content is not really important in the
end, in the other hand it looks like the length limit for a value is
512 bytes not 64 K so I there is a couple more changes needed.


-- 
Luiz Augusto von Dentz
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux