/* Generated by ./src/xlat/gen.sh from ./src/xlat/rtc_feature_bits.in; do not edit. */

#include "gcc_compat.h"
#include "static_assert.h"

#if defined(RTC_FEATURE_ALARM) || (defined(HAVE_DECL_RTC_FEATURE_ALARM) && HAVE_DECL_RTC_FEATURE_ALARM)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((RTC_FEATURE_ALARM) == (0), "RTC_FEATURE_ALARM != 0");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define RTC_FEATURE_ALARM 0
#endif
#if defined(RTC_FEATURE_ALARM_RES_MINUTE) || (defined(HAVE_DECL_RTC_FEATURE_ALARM_RES_MINUTE) && HAVE_DECL_RTC_FEATURE_ALARM_RES_MINUTE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((RTC_FEATURE_ALARM_RES_MINUTE) == (1), "RTC_FEATURE_ALARM_RES_MINUTE != 1");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define RTC_FEATURE_ALARM_RES_MINUTE 1
#endif
#if defined(RTC_FEATURE_NEED_WEEK_DAY) || (defined(HAVE_DECL_RTC_FEATURE_NEED_WEEK_DAY) && HAVE_DECL_RTC_FEATURE_NEED_WEEK_DAY)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((RTC_FEATURE_NEED_WEEK_DAY) == (2), "RTC_FEATURE_NEED_WEEK_DAY != 2");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define RTC_FEATURE_NEED_WEEK_DAY 2
#endif
#if defined(RTC_FEATURE_ALARM_RES_2S) || (defined(HAVE_DECL_RTC_FEATURE_ALARM_RES_2S) && HAVE_DECL_RTC_FEATURE_ALARM_RES_2S)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((RTC_FEATURE_ALARM_RES_2S) == (3), "RTC_FEATURE_ALARM_RES_2S != 3");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define RTC_FEATURE_ALARM_RES_2S 3
#endif
#if defined(RTC_FEATURE_UPDATE_INTERRUPT) || (defined(HAVE_DECL_RTC_FEATURE_UPDATE_INTERRUPT) && HAVE_DECL_RTC_FEATURE_UPDATE_INTERRUPT)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((RTC_FEATURE_UPDATE_INTERRUPT) == (4), "RTC_FEATURE_UPDATE_INTERRUPT != 4");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define RTC_FEATURE_UPDATE_INTERRUPT 4
#endif
#if defined(RTC_FEATURE_CORRECTION) || (defined(HAVE_DECL_RTC_FEATURE_CORRECTION) && HAVE_DECL_RTC_FEATURE_CORRECTION)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((RTC_FEATURE_CORRECTION) == (5), "RTC_FEATURE_CORRECTION != 5");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define RTC_FEATURE_CORRECTION 5
#endif
#if defined(RTC_FEATURE_BACKUP_SWITCH_MODE) || (defined(HAVE_DECL_RTC_FEATURE_BACKUP_SWITCH_MODE) && HAVE_DECL_RTC_FEATURE_BACKUP_SWITCH_MODE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((RTC_FEATURE_BACKUP_SWITCH_MODE) == (6), "RTC_FEATURE_BACKUP_SWITCH_MODE != 6");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define RTC_FEATURE_BACKUP_SWITCH_MODE 6
#endif
#if defined(RTC_FEATURE_ALARM_WAKEUP_ONLY) || (defined(HAVE_DECL_RTC_FEATURE_ALARM_WAKEUP_ONLY) && HAVE_DECL_RTC_FEATURE_ALARM_WAKEUP_ONLY)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((RTC_FEATURE_ALARM_WAKEUP_ONLY) == (7), "RTC_FEATURE_ALARM_WAKEUP_ONLY != 7");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define RTC_FEATURE_ALARM_WAKEUP_ONLY 7
#endif
#undef XLAT_PREV_VAL

#ifndef XLAT_MACROS_ONLY

# ifdef IN_MPERS

extern const struct xlat rtc_feature_bits[];

# else

DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
static const struct xlat_data rtc_feature_bits_xdata[] = {
 [RTC_FEATURE_ALARM] = XLAT(RTC_FEATURE_ALARM),
 #define XLAT_VAL_0 ((unsigned) (RTC_FEATURE_ALARM))
 #define XLAT_STR_0 STRINGIFY(RTC_FEATURE_ALARM)
 [RTC_FEATURE_ALARM_RES_MINUTE] = XLAT(RTC_FEATURE_ALARM_RES_MINUTE),
 #define XLAT_VAL_1 ((unsigned) (RTC_FEATURE_ALARM_RES_MINUTE))
 #define XLAT_STR_1 STRINGIFY(RTC_FEATURE_ALARM_RES_MINUTE)
 [RTC_FEATURE_NEED_WEEK_DAY] = XLAT(RTC_FEATURE_NEED_WEEK_DAY),
 #define XLAT_VAL_2 ((unsigned) (RTC_FEATURE_NEED_WEEK_DAY))
 #define XLAT_STR_2 STRINGIFY(RTC_FEATURE_NEED_WEEK_DAY)
 [RTC_FEATURE_ALARM_RES_2S] = XLAT(RTC_FEATURE_ALARM_RES_2S),
 #define XLAT_VAL_3 ((unsigned) (RTC_FEATURE_ALARM_RES_2S))
 #define XLAT_STR_3 STRINGIFY(RTC_FEATURE_ALARM_RES_2S)
 [RTC_FEATURE_UPDATE_INTERRUPT] = XLAT(RTC_FEATURE_UPDATE_INTERRUPT),
 #define XLAT_VAL_4 ((unsigned) (RTC_FEATURE_UPDATE_INTERRUPT))
 #define XLAT_STR_4 STRINGIFY(RTC_FEATURE_UPDATE_INTERRUPT)
 [RTC_FEATURE_CORRECTION] = XLAT(RTC_FEATURE_CORRECTION),
 #define XLAT_VAL_5 ((unsigned) (RTC_FEATURE_CORRECTION))
 #define XLAT_STR_5 STRINGIFY(RTC_FEATURE_CORRECTION)
 [RTC_FEATURE_BACKUP_SWITCH_MODE] = XLAT(RTC_FEATURE_BACKUP_SWITCH_MODE),
 #define XLAT_VAL_6 ((unsigned) (RTC_FEATURE_BACKUP_SWITCH_MODE))
 #define XLAT_STR_6 STRINGIFY(RTC_FEATURE_BACKUP_SWITCH_MODE)
 [RTC_FEATURE_ALARM_WAKEUP_ONLY] = XLAT(RTC_FEATURE_ALARM_WAKEUP_ONLY),
 #define XLAT_VAL_7 ((unsigned) (RTC_FEATURE_ALARM_WAKEUP_ONLY))
 #define XLAT_STR_7 STRINGIFY(RTC_FEATURE_ALARM_WAKEUP_ONLY)

};
#  if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS)
static
#  endif
const struct xlat rtc_feature_bits[1] = { {
 .data = rtc_feature_bits_xdata,
 .size = ARRAY_SIZE(rtc_feature_bits_xdata),
 .type = XT_INDEXED,
 .flags_mask = 0
#  ifdef XLAT_VAL_0
  | XLAT_VAL_0
#  endif
#  ifdef XLAT_VAL_1
  | XLAT_VAL_1
#  endif
#  ifdef XLAT_VAL_2
  | XLAT_VAL_2
#  endif
#  ifdef XLAT_VAL_3
  | XLAT_VAL_3
#  endif
#  ifdef XLAT_VAL_4
  | XLAT_VAL_4
#  endif
#  ifdef XLAT_VAL_5
  | XLAT_VAL_5
#  endif
#  ifdef XLAT_VAL_6
  | XLAT_VAL_6
#  endif
#  ifdef XLAT_VAL_7
  | XLAT_VAL_7
#  endif
  ,
 .flags_strsz = 0
#  ifdef XLAT_STR_0
  + sizeof(XLAT_STR_0)
#  endif
#  ifdef XLAT_STR_1
  + sizeof(XLAT_STR_1)
#  endif
#  ifdef XLAT_STR_2
  + sizeof(XLAT_STR_2)
#  endif
#  ifdef XLAT_STR_3
  + sizeof(XLAT_STR_3)
#  endif
#  ifdef XLAT_STR_4
  + sizeof(XLAT_STR_4)
#  endif
#  ifdef XLAT_STR_5
  + sizeof(XLAT_STR_5)
#  endif
#  ifdef XLAT_STR_6
  + sizeof(XLAT_STR_6)
#  endif
#  ifdef XLAT_STR_7
  + sizeof(XLAT_STR_7)
#  endif
  ,
} };
DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE

#  undef XLAT_STR_0
#  undef XLAT_VAL_0
#  undef XLAT_STR_1
#  undef XLAT_VAL_1
#  undef XLAT_STR_2
#  undef XLAT_VAL_2
#  undef XLAT_STR_3
#  undef XLAT_VAL_3
#  undef XLAT_STR_4
#  undef XLAT_VAL_4
#  undef XLAT_STR_5
#  undef XLAT_VAL_5
#  undef XLAT_STR_6
#  undef XLAT_VAL_6
#  undef XLAT_STR_7
#  undef XLAT_VAL_7
# endif /* !IN_MPERS */

#endif /* !XLAT_MACROS_ONLY */
