imx9_iomux.h: Fix issues with the header file
- Add missing include guard - Add missing C++ guard - Fix the initialization ordering in IOMUX_PADCFG macro. Why ? Becaused of: imx9_iomuxc.h:54:3: error: designator order for field 'iomux_padcfg_s::dsyreg' does not match declaration order in 'iomux_padcfg_s' 54 | } |
This commit is contained in:
parent
9beb73d0f0
commit
4a82838be7
@ -18,6 +18,9 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __ARCH_ARM64_SRC_IMX9_IMX9_IOMUXC_H
|
||||||
|
#define __ARCH_ARM64_SRC_IMX9_IMX9_IOMUXC_H
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Included Files
|
* Included Files
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -36,10 +39,10 @@
|
|||||||
#define IOMUX_PADCFG(_ctlreg, _mode, _dsyreg, _dsy, _padreg) \
|
#define IOMUX_PADCFG(_ctlreg, _mode, _dsyreg, _dsy, _padreg) \
|
||||||
{ \
|
{ \
|
||||||
.ctlreg = (_ctlreg), \
|
.ctlreg = (_ctlreg), \
|
||||||
.mode = (_mode), \
|
|
||||||
.dsyreg = (_dsyreg), \
|
|
||||||
.dsy = (_dsy), \
|
|
||||||
.padreg = (_padreg), \
|
.padreg = (_padreg), \
|
||||||
|
.dsyreg = (_dsyreg), \
|
||||||
|
.mode = (_mode), \
|
||||||
|
.dsy = (_dsy), \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define IOMUX_CFG(_padcfg, _pad, _mux) \
|
#define IOMUX_CFG(_padcfg, _pad, _mux) \
|
||||||
@ -81,6 +84,19 @@ struct iomux_cfg_s
|
|||||||
};
|
};
|
||||||
typedef struct iomux_cfg_s iomux_cfg_t;
|
typedef struct iomux_cfg_s iomux_cfg_t;
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Function Prototypes
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#undef EXTERN
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
#define EXTERN extern "C"
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#else
|
||||||
|
#define EXTERN extern
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: imx9_iomux_configure
|
* Name: imx9_iomux_configure
|
||||||
*
|
*
|
||||||
@ -115,3 +131,9 @@ int imx9_iomux_configure(iomux_cfg_t cfg);
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int imx9_iomux_gpio(iomux_cfg_t cfg, bool sion);
|
int imx9_iomux_gpio(iomux_cfg_t cfg, bool sion);
|
||||||
|
|
||||||
|
#undef EXTERN
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif /* __ARCH_ARM64_SRC_IMX9_IMX9_IOMUXC_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user