Exempt from strict warnings for struct packing and add MCU options

This commit is contained in:
Scott Shawcroft 2018-11-09 00:10:44 -08:00
parent 30e3c64134
commit 537a29273c
No known key found for this signature in database
GPG Key ID: FD0EDC4B6C53CA59
6 changed files with 27 additions and 1 deletions

View File

@ -50,6 +50,10 @@
extern "C" {
#endif
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpacked"
#pragma GCC diagnostic ignored "-Wattributes"
/** \defgroup ClassDriver_CDC_Common Common Definitions
* @{ */
@ -401,6 +405,8 @@ typedef struct ATTR_PACKED
TU_VERIFY_STATIC(sizeof(cdc_line_control_state_t) == 2, "size is not correct");
#pragma GCC diagnostic pop
/** @} */
#ifdef __cplusplus

View File

@ -49,6 +49,10 @@
extern "C" {
#endif
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpacked"
#pragma GCC diagnostic ignored "-Wattributes"
//--------------------------------------------------------------------+
// Common Definitions
//--------------------------------------------------------------------+
@ -609,6 +613,7 @@ enum
HID_USAGE_CONSUMER_AC_PAN = 0x0238,
};
#pragma GCC diagnostic pop
#ifdef __cplusplus
}

View File

@ -52,6 +52,10 @@
extern "C" {
#endif
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpacked"
#pragma GCC diagnostic ignored "-Wattributes"
//--------------------------------------------------------------------+
// Mass Storage Class Constant
//--------------------------------------------------------------------+
@ -392,6 +396,8 @@ typedef struct ATTR_PACKED
TU_VERIFY_STATIC(sizeof(scsi_read10_t) == 10, "size is not correct");
TU_VERIFY_STATIC(sizeof(scsi_write10_t) == 10, "size is not correct");
#pragma GCC diagnostic pop
#ifdef __cplusplus
}
#endif

View File

@ -51,6 +51,10 @@
extern "C" {
#endif
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpacked"
#pragma GCC diagnostic ignored "-Wattributes"
/*------------------------------------------------------------------*/
/* CONSTANTS
*------------------------------------------------------------------*/
@ -422,6 +426,8 @@ static inline uint8_t descriptor_len(uint8_t const p_desc[])
// Convert comma-separated string to descriptor unicode format
#define TUD_DESC_STRCONV( ... ) (const uint16_t[]) { TUD_DESC_STR_HEADER(VA_ARGS_NUM_(__VA_ARGS__)), __VA_ARGS__ }
#pragma GCC diagnostic pop
#ifdef __cplusplus
}
#endif

View File

@ -38,7 +38,7 @@
#include "tusb_option.h"
#if TUSB_OPT_DEVICE_ENABLED && CFG_TUSB_MCU == OPT_MCU_SAMD51
#if TUSB_OPT_DEVICE_ENABLED && CFG_TUSB_MCU == OPT_MCU_SAMD21
#include "device/dcd.h"

View File

@ -57,6 +57,9 @@
#define OPT_MCU_LPC43XX 7 ///< NXP LPC43xx series
#define OPT_MCU_NRF5X 100 ///< Nordic nRF5x series
#define OPT_MCU_SAMD21 200 ///< MicroChip SAMD21
#define OPT_MCU_SAMD51 201 ///< MicroChip SAMD51
/** @} */
/** \defgroup group_supported_os Supported RTOS