/** * @copyright 2022 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 lins_sfr.h */ #ifndef LINS_SFR_H__ #define LINS_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 #define LINS_DL_LENGTH_POS (0) #define LINS_DL_DISAUTOSLEEP_POS (5) #define LINS_DL_DISBITMON_POS (6) #define LINS_DL_ENHCHK_POS (7) #define DATAACK_TPYE_RECEIVE (0x01) #define DATAACK_TPYE_TRANSMIT (0x03) /** * @brief A structure to represent Special Function Registers for LINS. */ typedef union{ struct{ uint8_t DATA; /*CTRL.PD1V5_ENA_HIBERNATE=0x0), the write operation of this register takes effect by IOCTRLA_SFRS->LIN.UPDATE */ uint8_t _RESERVED_45[3]; /* +0x045 */ LINS_CONF_t CONF; UARTINTENA_t UARTINTENA; UARTINTCLR_t UARTINTCLR; UARTINTSTATUS_t UARTINTSTATUS; } LINS_SFRS_t; /* -------- End of section using anonymous unions and disabling warnings -------- */ #if defined (__CC_ARM) #pragma pop #elif defined (__ICCARM__) /* leave anonymous unions enabled */ #elif (__ARMCC_VERSION >= 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 LINS SFRS. */ /* #define LINS_REG_DATA_LOW_4BYTES (*(__IO uint32_t *)(0x50010700)) #define LINS_REG_DATA_HIGH_4BYTES (*(__IO uint32_t *)(0x50010710)) #define LINS_REG_DATA(index) (*(__IO uint8_t *)(0x50010700 + index*4)) #define LINS_REG_CTRL (*(__IO LINS_CTRL_T2_t *)(0x50010720)) #define LINS_REG_STATUS (*(__IO uint8_t *)(0x50010724)) #define LINS_REG_ERROR (*(__IO LINS_ERROR_t *)(0x50010728)) #define LINS_REG_DL (*(__IO uint8_t *)(0x5001072C)) #define LINS_REG_BTDIV07 (*(__IO uint8_t *)(0x50010730)) #define LINS_REG_BITTIME (*(__IO LINS_BITTIME_t *)(0x50010734)) #define LINS_REG_ID (*(__IO uint8_t *)(0x50010738)) #define LINS_REG_BUSTIME (*(__IO LINS_BUSTIME_t *)(0x5001073C)) #define LINS_REG_TX_STATUS (*(__IO LINS_TX_STATUS_t *)(0x50010740)) #define LINS_REG_WUPDETECTTHRES (*(__IO uint8_t *)(0x50010744)) #define LINS_REG_CONF (*(__IO LINS_CONF_t *)(0x50010748)) */ /** * @brief The starting address of LINS SFRS. */ #define LINS_SFRS ((__IO LINS_SFRS_t *)0x40001C00) #endif /* end of __LINS_SFR_H__ section */