Add ifdef to bit definitions to avoid conflicts with other libraries. Refactor BITx to use BIT macro. (#45)

This commit is contained in:
Steve Karg
2020-02-18 08:21:54 -06:00
committed by GitHub
parent cf963a63ca
commit 9c41180145
19 changed files with 89 additions and 104 deletions
+3 -3
View File
@@ -85,10 +85,10 @@ uint16_t apdu_decode_confirmed_service_request(
{
uint16_t len = 0; /* counts where we are in PDU */
service_data->segmented_message = (apdu[0] & BIT3) ? true : false;
service_data->more_follows = (apdu[0] & BIT2) ? true : false;
service_data->segmented_message = (apdu[0] & BIT(3)) ? true : false;
service_data->more_follows = (apdu[0] & BIT(2)) ? true : false;
service_data->segmented_response_accepted =
(apdu[0] & BIT1) ? true : false;
(apdu[0] & BIT(1)) ? true : false;
service_data->max_segs = decode_max_segs(apdu[1]);
service_data->max_resp = decode_max_apdu(apdu[1]);
service_data->invoke_id = apdu[2];