/** * @copyright 2023 indie Semiconductor * * This file is proprietary to indie Semiconductor. * All rights reserved. Reproduction or distribution, in whole * or in part, is forbidden except by express written permission * of indie Semiconductor. * * @file syscfg_sfr.h */ #ifndef SYSCFG_SFR_H__ #define SYSCFG_SFR_H__ #include /* ------- Start of section using anonymous unions and disabling warnings ------- */ #if defined (__CC_ARM) #pragma push #pragma anon_unions #elif defined (__ICCARM__) #pragma language=extended #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wc11-extensions" #pragma clang diagnostic ignored "-Wreserved-id-macro" #elif defined (__GNUC__) /* anonymous unions are enabled by default */ #elif defined (__TMS470__) /* anonymous unions are enabled by default */ #elif defined (__TASKING__) #pragma warning 586 #elif defined (__CSMC__) /* anonymous unions are enabled by default */ #else #warning Not supported compiler type #endif /** * @brief A structure to represent Special Function Registers for SYSCFG. */ typedef struct { union { struct { uint8_t GT1INS : 1; /*!< GT1IN Selection */ uint8_t GT2INS : 1; /*!< GT2IN Selection */ uint8_t GT3INS : 1; /*!< GT3IN Selection */ uint8_t GT4INS : 1; /*!< GT4IN Selection */ uint8_t GT5INS : 1; /*!< GT5IN Selection */ uint8_t : 3; /* (reserved) */ uint8_t GT1EXTS : 2; /*!< GT1EXT Selection */ uint8_t GT2EXTS : 1; /*!< GT2EXT Selection */ uint8_t GT3EXTS : 1; /*!< GT3EXT Selection */ uint8_t GT4EXTS : 1; /*!< GT4EXT Selection */ uint8_t GT5EXTS : 1; /*!< GT5EXT Selection */ uint8_t : 2; /* (reserved) */ uint8_t GT1EXTC : 1; /*!< GT1EXT Input Control */ uint8_t GT2EXTC : 1; /*!< GT2EXT Input Control */ uint8_t GT3EXTC : 1; /*!< GT3EXT Input Control */ uint8_t : 5; /* (reserved) */ uint8_t GT3TRIGS : 8; /*!< GT3 Trigger Select */ }; uint32_t WORD; } GTINSR; /* +0x000 */ union { struct { uint8_t PT0HRS : 1; /*!< PT0HR Selection */ uint8_t PT1HRS : 1; /*!< PT1HR Selection */ uint8_t : 6; /* (reserved) */ uint8_t : 8; /* (reserved) */ uint8_t PT0HRC : 1; /*!< PT0HR Input Control */ uint8_t PT1HRC : 1; /*!< PT1HR Input Control */ uint8_t : 6; /* (reserved) */ uint8_t : 8; /* (reserved) */ }; uint32_t WORD; } PWMINSR; /* +0x004 */ uint8_t CTINS; /*= 6010050) #pragma clang diagnostic pop #elif defined (__GNUC__) /* anonymous unions are enabled by default */ #elif defined (__TMS470__) /* anonymous unions are enabled by default */ #elif defined (__TASKING__) #pragma warning restore #elif defined (__CSMC__) /* anonymous unions are enabled by default */ #else #warning Not supported compiler type #endif /** * @brief The starting address of SYSCFG SFRS. */ #define SYSCFG_SFRS ((__IO SYSCFG_SFRS_t *)0x40020000) #endif /* end of __SYSCFG_SFR_H__ section */