Implement requested PR changes

Removes CFG_TUSB_ALT_BIT_PACKING_ALIGNMENT, and makes the manual padding
behavior standard.  Replaced unused variable name with TU_RESERVED.
This commit is contained in:
Jeremiah McCarthy
2021-02-18 13:26:03 -05:00
parent f8fbc0930b
commit 21f1cd4ec7
6 changed files with 10 additions and 59 deletions

View File

@@ -277,11 +277,7 @@ typedef struct TU_ATTR_PACKED
struct {
uint8_t handle_call : 1; ///< 0 - Device sends/receives call management information only over the Communications Class interface. 1 - Device can send/receive call management information over a Data Class interface.
uint8_t send_recv_call : 1; ///< 0 - Device does not handle call management itself. 1 - Device handles call management itself.
#if CFG_TUSB_ALT_BIT_PACKING_ALIGNMENT
uint8_t unused : 6;
#else
uint8_t : 0;
#endif /* CFG_TUSB_ALT_BIT_PACKING_ALIGNMENT */
uint8_t TU_RESERVED : 6;
} bmCapabilities;
uint8_t bDataInterface;
@@ -294,11 +290,7 @@ typedef struct TU_ATTR_PACKED
uint8_t support_line_request : 1; ///< Device supports the request combination of Set_Line_Coding, Set_Control_Line_State, Get_Line_Coding, and the notification Serial_State.
uint8_t support_send_break : 1; ///< Device supports the request Send_Break
uint8_t support_notification_network_connection : 1; ///< Device supports the notification Network_Connection.
#if CFG_TUSB_ALT_BIT_PACKING_ALIGNMENT
uint8_t unused : 4;
#else
uint8_t : 0;
#endif /* CFG_TUSB_ALT_BIT_PACKING_ALIGNMENT */
uint8_t TU_RESERVED : 4;
}cdc_acm_capability_t;
TU_VERIFY_STATIC(sizeof(cdc_acm_capability_t) == 1, "mostly problem with compiler");
@@ -324,11 +316,7 @@ typedef struct TU_ATTR_PACKED
uint8_t require_pulse_setup : 1; ///< Device requires extra Pulse_Setup request during pulse dialing sequence to disengage holding circuit.
uint8_t support_aux_request : 1; ///< Device supports the request combination of Set_Aux_Line_State, Ring_Aux_Jack, and notification Aux_Jack_Hook_State.
uint8_t support_pulse_request : 1; ///< Device supports the request combination of Pulse_Setup, Send_Pulse, and Set_Pulse_Time.
#if CFG_TUSB_ALT_BIT_PACKING_ALIGNMENT
uint8_t unused : 5;
#else
uint8_t : 0;
#endif /* CFG_TUSB_ALT_BIT_PACKING_ALIGNMENT */
uint8_t TU_RESERVED : 5;
} bmCapabilities;
}cdc_desc_func_direct_line_management_t;
@@ -356,11 +344,7 @@ typedef struct TU_ATTR_PACKED
uint8_t simple_mode : 1;
uint8_t standalone_mode : 1;
uint8_t computer_centric_mode : 1;
#if CFG_TUSB_ALT_BIT_PACKING_ALIGNMENT
uint8_t unused : 5;
#else
uint8_t : 0;
#endif /* CFG_TUSB_ALT_BIT_PACKING_ALIGNMENT */
uint8_t TU_RESERVED : 5;
} bmCapabilities;
}cdc_desc_func_telephone_operational_modes_t;
@@ -379,11 +363,7 @@ typedef struct TU_ATTR_PACKED
uint32_t incoming_distinctive : 1; ///< 0 : Reports only incoming ringing. 1 : Reports incoming distinctive ringing patterns.
uint32_t dual_tone_multi_freq : 1; ///< 0 : Cannot report dual tone multi-frequency (DTMF) digits input remotely over the telephone line. 1 : Can report DTMF digits input remotely over the telephone line.
uint32_t line_state_change : 1; ///< 0 : Does not support line state change notification. 1 : Does support line state change notification
#if CFG_TUSB_ALT_BIT_PACKING_ALIGNMENT
uint32_t unused : 26;
#else
uint32_t : 0;
#endif /* CFG_TUSB_ALT_BIT_PACKING_ALIGNMENT */
uint32_t TU_RESERVED : 26;
} bmCapabilities;
}cdc_desc_func_telephone_call_state_reporting_capabilities_t;