diff --git a/Libraries/PeriphDrivers/Include/MAX32520/dma.h b/Libraries/PeriphDrivers/Include/MAX32520/dma.h index 5e5fefe503..ad2b422ff2 100644 --- a/Libraries/PeriphDrivers/Include/MAX32520/dma.h +++ b/Libraries/PeriphDrivers/Include/MAX32520/dma.h @@ -181,6 +181,10 @@ typedef mxc_dma_srcdst_t (*mxc_dma_trans_chain_t)(mxc_dma_srcdst_t dest); /** * @brief Initialize DMA resources * @details This initialization is required before using the DMA driver functions. + * @note On default this function enables DMA peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * @return #E_NO_ERROR if successful */ int MXC_DMA_Init(void); diff --git a/Libraries/PeriphDrivers/Include/MAX32520/tmr.h b/Libraries/PeriphDrivers/Include/MAX32520/tmr.h index 760af07221..3bbd9ce70f 100644 --- a/Libraries/PeriphDrivers/Include/MAX32520/tmr.h +++ b/Libraries/PeriphDrivers/Include/MAX32520/tmr.h @@ -117,6 +117,11 @@ typedef void (*mxc_tmr_complete_t)(int error); /** * @brief Initialize timer module clock. + * @note On default this function enables TMR peripheral clock and related GPIOs. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param tmr Pointer to timer module to initialize. * @param cfg configuration object */ diff --git a/Libraries/PeriphDrivers/Include/MAX32520/wdt.h b/Libraries/PeriphDrivers/Include/MAX32520/wdt.h index 82a800c656..e9c2aa049c 100644 --- a/Libraries/PeriphDrivers/Include/MAX32520/wdt.h +++ b/Libraries/PeriphDrivers/Include/MAX32520/wdt.h @@ -82,7 +82,13 @@ typedef enum { /** * @brief Initialize the Watchdog Timer - * @param wdt Pointer to the watchdog registers + * @note On default this function enables WDT peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * + * @param wdt Pointer to the watchdog registers, has no effect incase of + * MSDK_NO_GPIO_CLK_INIT has been defined. * @return See \ref MXC_Error_Codes for the list of error codes. */ int MXC_WDT_Init(mxc_wdt_regs_t *wdt); diff --git a/Libraries/PeriphDrivers/Include/MAX32570/dma.h b/Libraries/PeriphDrivers/Include/MAX32570/dma.h index 11c52903ec..7c64980264 100644 --- a/Libraries/PeriphDrivers/Include/MAX32570/dma.h +++ b/Libraries/PeriphDrivers/Include/MAX32570/dma.h @@ -236,6 +236,10 @@ typedef mxc_dma_srcdst_t (*mxc_dma_trans_chain_t)(mxc_dma_srcdst_t dest); /** * @brief Initialize DMA resources * @details This initialization is required before using the DMA driver functions. + * @note On default this function enables DMA peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * @return #E_NO_ERROR if successful */ int MXC_DMA_Init(void); diff --git a/Libraries/PeriphDrivers/Include/MAX32570/tmr.h b/Libraries/PeriphDrivers/Include/MAX32570/tmr.h index 81d8cdd344..e47c2ce82d 100644 --- a/Libraries/PeriphDrivers/Include/MAX32570/tmr.h +++ b/Libraries/PeriphDrivers/Include/MAX32570/tmr.h @@ -118,6 +118,11 @@ typedef void (*mxc_tmr_complete_t)(int error); /** * @brief Initialize timer module clock. + * @note On default this function enables TMR peripheral clock and related GPIOs. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param tmr Pointer to timer module to initialize. * @param cfg configuration object */ diff --git a/Libraries/PeriphDrivers/Include/MAX32570/wdt.h b/Libraries/PeriphDrivers/Include/MAX32570/wdt.h index a90148d332..c9ce6bd0a2 100644 --- a/Libraries/PeriphDrivers/Include/MAX32570/wdt.h +++ b/Libraries/PeriphDrivers/Include/MAX32570/wdt.h @@ -82,7 +82,13 @@ typedef enum { /** * @brief Initialize the Watchdog Timer - * @param wdt Pointer to the watchdog registers + * @note On default this function enables WDT peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * + * @param wdt Pointer to the watchdog registers, has no effect incase of + * MSDK_NO_GPIO_CLK_INIT has been defined. * @return See \ref MXC_Error_Codes for the list of error codes. */ int MXC_WDT_Init(mxc_wdt_regs_t *wdt); diff --git a/Libraries/PeriphDrivers/Include/MAX32572/dma.h b/Libraries/PeriphDrivers/Include/MAX32572/dma.h index bc058c2cec..40dd69ca3c 100644 --- a/Libraries/PeriphDrivers/Include/MAX32572/dma.h +++ b/Libraries/PeriphDrivers/Include/MAX32572/dma.h @@ -244,6 +244,10 @@ typedef mxc_dma_srcdst_t (*mxc_dma_trans_chain_t)(mxc_dma_srcdst_t dest); /** * @brief Initialize DMA resources * @details This initialization is required before using the DMA driver functions. + * @note On default this function enables DMA peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * @return #E_NO_ERROR if successful */ int MXC_DMA_Init(void); diff --git a/Libraries/PeriphDrivers/Include/MAX32572/tmr.h b/Libraries/PeriphDrivers/Include/MAX32572/tmr.h index 6dea63785b..a7c94ab574 100644 --- a/Libraries/PeriphDrivers/Include/MAX32572/tmr.h +++ b/Libraries/PeriphDrivers/Include/MAX32572/tmr.h @@ -122,6 +122,11 @@ typedef void (*mxc_tmr_complete_t)(int error); /** * @brief Initialize timer module clock. + * @note On default this function enables TMR peripheral clock and related GPIOs. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param tmr Pointer to timer module to initialize. * @param cfg configuration object */ diff --git a/Libraries/PeriphDrivers/Include/MAX32572/wdt.h b/Libraries/PeriphDrivers/Include/MAX32572/wdt.h index 12a02b233e..b831418a5f 100644 --- a/Libraries/PeriphDrivers/Include/MAX32572/wdt.h +++ b/Libraries/PeriphDrivers/Include/MAX32572/wdt.h @@ -82,7 +82,13 @@ typedef enum { /** * @brief Initialize the Watchdog Timer - * @param wdt Pointer to the watchdog registers + * @note On default this function enables WDT peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * + * @param wdt Pointer to the watchdog registers, has no effect incase of + * MSDK_NO_GPIO_CLK_INIT has been defined. * @return See \ref MXC_Error_Codes for the list of error codes. */ int MXC_WDT_Init(mxc_wdt_regs_t *wdt); diff --git a/Libraries/PeriphDrivers/Include/MAX32650/dma.h b/Libraries/PeriphDrivers/Include/MAX32650/dma.h index f19ad1c826..d3da779096 100644 --- a/Libraries/PeriphDrivers/Include/MAX32650/dma.h +++ b/Libraries/PeriphDrivers/Include/MAX32650/dma.h @@ -245,6 +245,10 @@ typedef mxc_dma_srcdst_t (*mxc_dma_trans_chain_t)(mxc_dma_srcdst_t dest); /** * @brief Initialize DMA resources * @details This initialization is required before using the DMA driver functions. + * @note On default this function enables DMA peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * @return #E_NO_ERROR if successful */ int MXC_DMA_Init(void); diff --git a/Libraries/PeriphDrivers/Include/MAX32650/tmr.h b/Libraries/PeriphDrivers/Include/MAX32650/tmr.h index b92c465ae8..6b5036fca2 100644 --- a/Libraries/PeriphDrivers/Include/MAX32650/tmr.h +++ b/Libraries/PeriphDrivers/Include/MAX32650/tmr.h @@ -121,6 +121,11 @@ typedef void (*mxc_tmr_complete_t)(int error); /** * @brief Initialize timer module clock. + * @note On default this function enables TMR peripheral clock and related GPIOs. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param tmr Pointer to timer module to initialize. * @param cfg configuration object */ diff --git a/Libraries/PeriphDrivers/Include/MAX32650/wdt.h b/Libraries/PeriphDrivers/Include/MAX32650/wdt.h index aa973cc2fa..4cc5bc10be 100644 --- a/Libraries/PeriphDrivers/Include/MAX32650/wdt.h +++ b/Libraries/PeriphDrivers/Include/MAX32650/wdt.h @@ -82,8 +82,14 @@ typedef enum { /** * @brief Initialize the Watchdog Timer - * @param wdt Pointer to the watchdog registers - * @param sys_cfg The system configuration object + * @note On default this function enables WDT peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * + * @param wdt Pointer to the watchdog registers, has no effect incase of + * MSDK_NO_GPIO_CLK_INIT has been defined. + * @return See \ref MXC_Error_Codes for the list of error codes. */ int MXC_WDT_Init(mxc_wdt_regs_t *wdt); diff --git a/Libraries/PeriphDrivers/Include/MAX32655/dma.h b/Libraries/PeriphDrivers/Include/MAX32655/dma.h index 950da42ffe..5848bb968c 100644 --- a/Libraries/PeriphDrivers/Include/MAX32655/dma.h +++ b/Libraries/PeriphDrivers/Include/MAX32655/dma.h @@ -203,6 +203,10 @@ typedef mxc_dma_srcdst_t (*mxc_dma_trans_chain_t)(mxc_dma_srcdst_t dest); /** * @brief Initialize DMA resources * @details This initialization is required before using the DMA driver functions. + * @note On default this function enables DMA peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * @return #E_NO_ERROR if successful */ int MXC_DMA_Init(void); diff --git a/Libraries/PeriphDrivers/Include/MAX32655/i2c.h b/Libraries/PeriphDrivers/Include/MAX32655/i2c.h index 83c3b6e814..1206340109 100644 --- a/Libraries/PeriphDrivers/Include/MAX32655/i2c.h +++ b/Libraries/PeriphDrivers/Include/MAX32655/i2c.h @@ -185,6 +185,10 @@ typedef int (*mxc_i2c_slave_handler_t)(mxc_i2c_regs_t *i2c, mxc_i2c_slave_event_ * @brief Initialize and enable I2C peripheral. * @note This function sets the I2C Speed to 100kHz, if another speed is * desired use the MXC_I2C_SetFrequency() function to set it. + * @note On default this function enables I2C peripheral clock and i2c gpio pins. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * * @param i2c Pointer to I2C registers (selects the I2C block used.) * @param masterMode Whether to put the device in master or slave mode. Use diff --git a/Libraries/PeriphDrivers/Include/MAX32655/spi.h b/Libraries/PeriphDrivers/Include/MAX32655/spi.h index 5c8e7a03b3..42d502f746 100644 --- a/Libraries/PeriphDrivers/Include/MAX32655/spi.h +++ b/Libraries/PeriphDrivers/Include/MAX32655/spi.h @@ -174,6 +174,11 @@ struct _mxc_spi_req_t { * SPI Width - SPI_WIDTH_STANDARD (even if quadModeUsed is set) * * These parameters can be modified after initialization using low level functions + * + * @note On default this function enables SPI peripheral clock and spi gpio pins. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * * @param spi Pointer to SPI registers (selects the SPI block used.) * @param masterMode Whether to put the device in master or slave mode. Use @@ -191,7 +196,8 @@ struct _mxc_spi_req_t { * will be returned by the function if successful. Used in * master mode only. * @param pins SPI pin structure. Pins selected as true will be initialized - * for the requested SPI block. + * for the requested SPI block. Has no effect incase of + * MSDK_NO_GPIO_CLK_INIT has been defined. * * @return If successful, the actual clock frequency is returned. Otherwise, see * \ref MXC_Error_Codes for a list of return codes. diff --git a/Libraries/PeriphDrivers/Include/MAX32655/tmr.h b/Libraries/PeriphDrivers/Include/MAX32655/tmr.h index 017ecd8a6a..f227af2624 100644 --- a/Libraries/PeriphDrivers/Include/MAX32655/tmr.h +++ b/Libraries/PeriphDrivers/Include/MAX32655/tmr.h @@ -145,10 +145,15 @@ typedef void (*mxc_tmr_complete_t)(int error); /** * @brief Initialize timer module clock. + * @note On default this function enables TMR peripheral clock and related GPIOs. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param tmr Pointer to timer module to initialize. * @param cfg System configuration object * @param init_pins True will initialize pins corresponding to the TMR and False will not if pins are pinned out otherwise it will not - * be used + * be used, has no effect incase of MSDK_NO_GPIO_CLK_INIT has been defined. * * @return Success/Fail, see \ref MXC_Error_Codes for a list of return codes. */ diff --git a/Libraries/PeriphDrivers/Include/MAX32655/uart.h b/Libraries/PeriphDrivers/Include/MAX32655/uart.h index 2cb57f495a..5f829080fc 100644 --- a/Libraries/PeriphDrivers/Include/MAX32655/uart.h +++ b/Libraries/PeriphDrivers/Include/MAX32655/uart.h @@ -157,6 +157,11 @@ struct _mxc_uart_req_t { * * These parameters can be modified after initialization using low level functions * + * @note On default this function enables UART peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param uart Pointer to UART registers (selects the UART block used.) * @param baud The requested clock frequency. The actual clock frequency * will be returned by the function if successful. diff --git a/Libraries/PeriphDrivers/Include/MAX32655/wdt.h b/Libraries/PeriphDrivers/Include/MAX32655/wdt.h index d7da921f42..16e89a4d47 100644 --- a/Libraries/PeriphDrivers/Include/MAX32655/wdt.h +++ b/Libraries/PeriphDrivers/Include/MAX32655/wdt.h @@ -116,6 +116,11 @@ typedef struct { /** * @brief Initialize the Watchdog Timer + * @note On default this function enables WDT peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param wdt Pointer to the watchdog registers * @param cfg watchdog configuration * @return See \ref MXC_Error_Codes for the list of error codes. diff --git a/Libraries/PeriphDrivers/Include/MAX32660/dma.h b/Libraries/PeriphDrivers/Include/MAX32660/dma.h index 81b074ec05..814c0e2de6 100644 --- a/Libraries/PeriphDrivers/Include/MAX32660/dma.h +++ b/Libraries/PeriphDrivers/Include/MAX32660/dma.h @@ -185,6 +185,10 @@ typedef mxc_dma_srcdst_t (*mxc_dma_trans_chain_t)(mxc_dma_srcdst_t dest); /** * @brief Initialize DMA resources * @details This initialization is required before using the DMA driver functions. + * @note On default this function enables DMA peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * @return #E_NO_ERROR if successful */ int MXC_DMA_Init(void); diff --git a/Libraries/PeriphDrivers/Include/MAX32660/tmr.h b/Libraries/PeriphDrivers/Include/MAX32660/tmr.h index 3ce9bf91b6..a2de2c1bcc 100644 --- a/Libraries/PeriphDrivers/Include/MAX32660/tmr.h +++ b/Libraries/PeriphDrivers/Include/MAX32660/tmr.h @@ -132,6 +132,11 @@ typedef void (*mxc_tmr_complete_t)(int error); /** * @brief Initialize timer module clock. + * @note On default this function enables TMR peripheral clock and related GPIOs. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param tmr Pointer to timer module to initialize. * @param cfg System configuration object * diff --git a/Libraries/PeriphDrivers/Include/MAX32662/dma.h b/Libraries/PeriphDrivers/Include/MAX32662/dma.h index 50b1e5bb14..161929d9d4 100644 --- a/Libraries/PeriphDrivers/Include/MAX32662/dma.h +++ b/Libraries/PeriphDrivers/Include/MAX32662/dma.h @@ -193,6 +193,10 @@ typedef mxc_dma_srcdst_t (*mxc_dma_trans_chain_t)(mxc_dma_srcdst_t dest); /** * @brief Initialize DMA resources * @details This initialization is required before using the DMA driver functions. + * @note On default this function enables DMA peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * @return #E_NO_ERROR if successful */ int MXC_DMA_Init(void); diff --git a/Libraries/PeriphDrivers/Include/MAX32662/tmr.h b/Libraries/PeriphDrivers/Include/MAX32662/tmr.h index 5d21906217..3c935a5c9e 100644 --- a/Libraries/PeriphDrivers/Include/MAX32662/tmr.h +++ b/Libraries/PeriphDrivers/Include/MAX32662/tmr.h @@ -147,11 +147,17 @@ typedef void (*mxc_tmr_complete_t)(int error); /** * @brief Initialize timer module clock. + * @note On default this function enables TMR peripheral clock and related GPIOs. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param tmr Pointer to timer module to initialize. * @param cfg System configuration object * @param init_pins True will initialize pins corresponding to the TMR and False will not if pins are pinned out otherwise it will not - * be used - * @param pin_sel Selects which set of pins to initialize (if init_pins set to true) for the given timer instance + * be used, has no effect incase of MSDK_NO_GPIO_CLK_INIT has been defined. + * @param pin_sel Selects which set of pins to initialize (if init_pins set to true) for the given timer instance, + * has no effect incase of MSDK_NO_GPIO_CLK_INIT has been defined. * * @return Success/Fail, see \ref MXC_Error_Codes for a list of return codes. */ diff --git a/Libraries/PeriphDrivers/Include/MAX32662/wdt.h b/Libraries/PeriphDrivers/Include/MAX32662/wdt.h index e9cf2fe9a9..212c178519 100644 --- a/Libraries/PeriphDrivers/Include/MAX32662/wdt.h +++ b/Libraries/PeriphDrivers/Include/MAX32662/wdt.h @@ -116,6 +116,11 @@ typedef struct { /** * @brief Initialize the Watchdog Timer + * @note On default this function enables WDT peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param wdt Pointer to the watchdog registers * @param cfg watchdog configuration * @return See \ref MXC_Error_Codes for the list of error codes. diff --git a/Libraries/PeriphDrivers/Include/MAX32665/dma.h b/Libraries/PeriphDrivers/Include/MAX32665/dma.h index 82e39f5875..3e73924978 100644 --- a/Libraries/PeriphDrivers/Include/MAX32665/dma.h +++ b/Libraries/PeriphDrivers/Include/MAX32665/dma.h @@ -250,6 +250,10 @@ typedef mxc_dma_srcdst_t (*mxc_dma_trans_chain_t)(mxc_dma_srcdst_t dest); * @brief Initialize DMA resources * @param dma Pointer to DMA registers. * @details This initialization is required before using the DMA driver functions. + * @note On default this function enables DMA peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * @return #E_NO_ERROR if successful */ int MXC_DMA_Init(mxc_dma_regs_t *dma); diff --git a/Libraries/PeriphDrivers/Include/MAX32665/i2c.h b/Libraries/PeriphDrivers/Include/MAX32665/i2c.h index 137efd7b82..947dd1b683 100644 --- a/Libraries/PeriphDrivers/Include/MAX32665/i2c.h +++ b/Libraries/PeriphDrivers/Include/MAX32665/i2c.h @@ -187,6 +187,10 @@ typedef int (*mxc_i2c_slave_handler_t)(mxc_i2c_regs_t *i2c, mxc_i2c_slave_event_ * @brief Initialize and enable I2C peripheral. * @note This function sets the I2C Speed to 100kHz, if another speed is * desired use the MXC_I2C_SetFrequency() function to set it. + * @note On default this function enables I2C peripheral clock and i2c gpio pins. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file * * @param i2c Pointer to I2C registers (selects the I2C block used.) * @param masterMode Whether to put the device in master or slave mode. Use diff --git a/Libraries/PeriphDrivers/Include/MAX32665/spi.h b/Libraries/PeriphDrivers/Include/MAX32665/spi.h index 4a49b8c749..e7c1be3421 100644 --- a/Libraries/PeriphDrivers/Include/MAX32665/spi.h +++ b/Libraries/PeriphDrivers/Include/MAX32665/spi.h @@ -153,6 +153,11 @@ struct _mxc_spi_req_t { * SPI Width - SPI_WIDTH_STANDARD (even if quadModeUsed is set) * * These parameters can be modified after initialization using low level functions + * + * @note On default this function enables SPI peripheral clock and spi gpio pins. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * * @param spi Pointer to SPI registers (selects the SPI block used.) * @param masterMode Whether to put the device in master or slave mode. Use @@ -169,7 +174,8 @@ struct _mxc_spi_req_t { * @param hz The requested clock frequency. The actual clock frequency * will be returned by the function if successful. Used in * master mode only. - * @param map Mapping (MAP_A or MAP_B) to use for SPIO + * @param map Mapping (MAP_A or MAP_B) to use for SPIO, Has no effect + * incase of MSDK_NO_GPIO_CLK_INIT has been defined. * * @return If successful, the actual clock frequency is returned. Otherwise, see * \ref MXC_Error_Codes for a list of return codes. diff --git a/Libraries/PeriphDrivers/Include/MAX32665/tmr.h b/Libraries/PeriphDrivers/Include/MAX32665/tmr.h index 00c7c7cf6d..2d9cfb6ef9 100644 --- a/Libraries/PeriphDrivers/Include/MAX32665/tmr.h +++ b/Libraries/PeriphDrivers/Include/MAX32665/tmr.h @@ -117,6 +117,11 @@ typedef void (*mxc_tmr_complete_t)(int error); /** * @brief Initialize timer module clock. + * @note On default this function enables TMR peripheral clock and related GPIOs. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param tmr Pointer to timer module to initialize. * @param cfg configuration object */ diff --git a/Libraries/PeriphDrivers/Include/MAX32665/uart.h b/Libraries/PeriphDrivers/Include/MAX32665/uart.h index 305f84e477..51ec08579e 100644 --- a/Libraries/PeriphDrivers/Include/MAX32665/uart.h +++ b/Libraries/PeriphDrivers/Include/MAX32665/uart.h @@ -157,11 +157,17 @@ struct _mxc_uart_req_t { * UART Clock - 7.37MHz Clock (for baud > 7372800, PCLK is used) * * These parameters can be modified after initialization using low level functions + * + * @note On default this function enables UART peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * * @param uart Pointer to UART registers (selects the UART block used.) * @param baud The requested clock frequency. The actual clock frequency * will be returned by the function if successful. - * @param map MAP_A or MAP_B uart pins select + * @param map MAP_A or MAP_B uart pins select, Has no effect incase of + * MSDK_NO_GPIO_CLK_INIT has been defined. * * @return If successful, the actual clock frequency is returned. Otherwise, see * \ref MXC_Error_Codes for a list of return codes. diff --git a/Libraries/PeriphDrivers/Include/MAX32665/wdt.h b/Libraries/PeriphDrivers/Include/MAX32665/wdt.h index 91b725cdb2..20c8dd8365 100644 --- a/Libraries/PeriphDrivers/Include/MAX32665/wdt.h +++ b/Libraries/PeriphDrivers/Include/MAX32665/wdt.h @@ -82,7 +82,13 @@ typedef enum { /** * @brief Initialize the Watchdog Timer - * @param wdt Pointer to the watchdog registers + * @note On default this function enables WDT peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * + * @param wdt Pointer to the watchdog registers, has no effect incase of + * MSDK_NO_GPIO_CLK_INIT has been defiend. * @return See \ref MXC_Error_Codes for the list of error codes. */ int MXC_WDT_Init(mxc_wdt_regs_t *wdt); diff --git a/Libraries/PeriphDrivers/Include/MAX32670/dma.h b/Libraries/PeriphDrivers/Include/MAX32670/dma.h index af46d3fb12..2f1aad32d2 100644 --- a/Libraries/PeriphDrivers/Include/MAX32670/dma.h +++ b/Libraries/PeriphDrivers/Include/MAX32670/dma.h @@ -203,6 +203,10 @@ typedef mxc_dma_srcdst_t (*mxc_dma_trans_chain_t)(mxc_dma_srcdst_t dest); /** * @brief Initialize DMA resources * @details This initialization is required before using the DMA driver functions. + * @note On default this function enables DMA peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * @return #E_NO_ERROR if successful */ int MXC_DMA_Init(void); diff --git a/Libraries/PeriphDrivers/Include/MAX32670/i2c.h b/Libraries/PeriphDrivers/Include/MAX32670/i2c.h index fd0bfa32f0..e0ef03e017 100644 --- a/Libraries/PeriphDrivers/Include/MAX32670/i2c.h +++ b/Libraries/PeriphDrivers/Include/MAX32670/i2c.h @@ -186,6 +186,10 @@ typedef int (*mxc_i2c_slave_handler_t)(mxc_i2c_regs_t *i2c, mxc_i2c_slave_event_ * @brief Initialize and enable I2C peripheral. * @note This function sets the I2C Speed to 100kHz, if another speed is * desired use the MXC_I2C_SetFrequency() function to set it. + * @note On default this function enables I2C peripheral clock and i2c gpio pins. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * * @param i2c Pointer to I2C registers (selects the I2C block used.) * @param masterMode Whether to put the device in master or slave mode. Use diff --git a/Libraries/PeriphDrivers/Include/MAX32670/spi.h b/Libraries/PeriphDrivers/Include/MAX32670/spi.h index cf04c7dc6e..f2d00ef806 100644 --- a/Libraries/PeriphDrivers/Include/MAX32670/spi.h +++ b/Libraries/PeriphDrivers/Include/MAX32670/spi.h @@ -153,6 +153,11 @@ struct _mxc_spi_req_t { * SPI Width - SPI_WIDTH_STANDARD (even if quadModeUsed is set) * * These parameters can be modified after initialization using low level functions + * + * @note On default this function enables SPI peripheral clock and spi gpio pins. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * * @param spi Pointer to SPI registers (selects the SPI block used.) * @param masterMode Whether to put the device in master or slave mode. Use diff --git a/Libraries/PeriphDrivers/Include/MAX32670/tmr.h b/Libraries/PeriphDrivers/Include/MAX32670/tmr.h index 100b1c365c..d7fe193789 100644 --- a/Libraries/PeriphDrivers/Include/MAX32670/tmr.h +++ b/Libraries/PeriphDrivers/Include/MAX32670/tmr.h @@ -145,10 +145,15 @@ typedef void (*mxc_tmr_complete_t)(int error); /** * @brief Initialize timer module clock. + * @note On default this function enables TMR peripheral clock and related GPIOs. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param tmr Pointer to timer module to initialize. * @param cfg System configuration object * @param init_pins True will initialize pins corresponding to the TMR and False will not if pins are pinned out otherwise it will not - * be used + * be used, has no effect incase of MSDK_NO_GPIO_CLK_INIT has been defined. * * @return Success/Fail, see \ref MXC_Error_Codes for a list of return codes. */ diff --git a/Libraries/PeriphDrivers/Include/MAX32670/uart.h b/Libraries/PeriphDrivers/Include/MAX32670/uart.h index 08661d25c4..a68b89100e 100644 --- a/Libraries/PeriphDrivers/Include/MAX32670/uart.h +++ b/Libraries/PeriphDrivers/Include/MAX32670/uart.h @@ -159,6 +159,11 @@ struct _mxc_uart_req_t { * * These parameters can be modified after initialization using low level functions * + * @note On default this function enables UART peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param uart Pointer to UART registers (selects the UART block used.) * @param baud The requested clock frequency. The actual clock frequency * will be returned by the function if successful. diff --git a/Libraries/PeriphDrivers/Include/MAX32670/wdt.h b/Libraries/PeriphDrivers/Include/MAX32670/wdt.h index 183e440db7..15ecdc4a54 100644 --- a/Libraries/PeriphDrivers/Include/MAX32670/wdt.h +++ b/Libraries/PeriphDrivers/Include/MAX32670/wdt.h @@ -116,6 +116,11 @@ typedef struct { /** * @brief Initialize the Watchdog Timer + * @note On default this function enables WDT peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param wdt Pointer to the watchdog registers * @param cfg watchdog configuration * @return See \ref MXC_Error_Codes for the list of error codes. diff --git a/Libraries/PeriphDrivers/Include/MAX32672/dma.h b/Libraries/PeriphDrivers/Include/MAX32672/dma.h index e0a047d842..6c9241a687 100644 --- a/Libraries/PeriphDrivers/Include/MAX32672/dma.h +++ b/Libraries/PeriphDrivers/Include/MAX32672/dma.h @@ -203,6 +203,10 @@ typedef mxc_dma_srcdst_t (*mxc_dma_trans_chain_t)(mxc_dma_srcdst_t dest); /** * @brief Initialize DMA resources * @details This initialization is required before using the DMA driver functions. + * @note On default this function enables DMA peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * @return #E_NO_ERROR if successful */ int MXC_DMA_Init(void); diff --git a/Libraries/PeriphDrivers/Include/MAX32672/tmr.h b/Libraries/PeriphDrivers/Include/MAX32672/tmr.h index 0a3a8f67ac..4068e64dbb 100644 --- a/Libraries/PeriphDrivers/Include/MAX32672/tmr.h +++ b/Libraries/PeriphDrivers/Include/MAX32672/tmr.h @@ -145,10 +145,15 @@ typedef void (*mxc_tmr_complete_t)(int error); /** * @brief Initialize timer module clock. + * @note On default this function enables TMR peripheral clock and related GPIOs. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param tmr Pointer to timer module to initialize. * @param cfg System configuration object * @param bool True will initialize pins corresponding to the TMR and False will not if pins are pinned out otherwise it will not - * be used + * be used, has no effect incase of MSDK_NO_GPIO_CLK_INIT has been defined. * * @return Success/Fail, see \ref MXC_Error_Codes for a list of return codes. */ diff --git a/Libraries/PeriphDrivers/Include/MAX32672/wdt.h b/Libraries/PeriphDrivers/Include/MAX32672/wdt.h index 5c5ce620ef..ec413a6d43 100644 --- a/Libraries/PeriphDrivers/Include/MAX32672/wdt.h +++ b/Libraries/PeriphDrivers/Include/MAX32672/wdt.h @@ -116,6 +116,11 @@ typedef struct { /** * @brief Initialize the Watchdog Timer + * @note On default this function enables WDT peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param wdt Pointer to the watchdog registers * @param cfg watchdog configuration * @return See \ref MXC_Error_Codes for the list of error codes. diff --git a/Libraries/PeriphDrivers/Include/MAX32675/dma.h b/Libraries/PeriphDrivers/Include/MAX32675/dma.h index 501e5a9979..6c63ddab12 100644 --- a/Libraries/PeriphDrivers/Include/MAX32675/dma.h +++ b/Libraries/PeriphDrivers/Include/MAX32675/dma.h @@ -203,6 +203,10 @@ typedef mxc_dma_srcdst_t (*mxc_dma_trans_chain_t)(mxc_dma_srcdst_t dest); /** * @brief Initialize DMA resources * @details This initialization is required before using the DMA driver functions. + * @note On default this function enables DMA peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * @return #E_NO_ERROR if successful */ int MXC_DMA_Init(void); diff --git a/Libraries/PeriphDrivers/Include/MAX32675/tmr.h b/Libraries/PeriphDrivers/Include/MAX32675/tmr.h index 798de98a60..2c92840680 100644 --- a/Libraries/PeriphDrivers/Include/MAX32675/tmr.h +++ b/Libraries/PeriphDrivers/Include/MAX32675/tmr.h @@ -145,10 +145,15 @@ typedef void (*mxc_tmr_complete_t)(int error); /** * @brief Initialize timer module clock. + * @note On default this function enables TMR peripheral clock and related GPIOs. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param tmr Pointer to timer module to initialize. * @param cfg System configuration object * @param init_pins True will initialize pins corresponding to the TMR and False will not if pins are pinned out otherwise it will not - * be used + * be used, has no effect incase of MSDK_NO_GPIO_CLK_INIT has been defined. * * @return Success/Fail, see \ref MXC_Error_Codes for a list of return codes. */ diff --git a/Libraries/PeriphDrivers/Include/MAX32675/wdt.h b/Libraries/PeriphDrivers/Include/MAX32675/wdt.h index ec402a8e57..2228b4bf66 100644 --- a/Libraries/PeriphDrivers/Include/MAX32675/wdt.h +++ b/Libraries/PeriphDrivers/Include/MAX32675/wdt.h @@ -120,6 +120,11 @@ typedef struct { /** * @brief Initialize the Watchdog Timer + * @note On default this function enables WDT peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param wdt Pointer to the watchdog registers * @param cfg watchdog configuration * @return See \ref MXC_Error_Codes for the list of error codes. diff --git a/Libraries/PeriphDrivers/Include/MAX32680/dma.h b/Libraries/PeriphDrivers/Include/MAX32680/dma.h index 6aaf55d07a..c02e6705e1 100644 --- a/Libraries/PeriphDrivers/Include/MAX32680/dma.h +++ b/Libraries/PeriphDrivers/Include/MAX32680/dma.h @@ -203,6 +203,10 @@ typedef mxc_dma_srcdst_t (*mxc_dma_trans_chain_t)(mxc_dma_srcdst_t dest); /** * @brief Initialize DMA resources * @details This initialization is required before using the DMA driver functions. + * @note On default this function enables DMA peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * @return #E_NO_ERROR if successful */ int MXC_DMA_Init(void); diff --git a/Libraries/PeriphDrivers/Include/MAX32680/tmr.h b/Libraries/PeriphDrivers/Include/MAX32680/tmr.h index b23c1c2090..8969b15f4f 100644 --- a/Libraries/PeriphDrivers/Include/MAX32680/tmr.h +++ b/Libraries/PeriphDrivers/Include/MAX32680/tmr.h @@ -146,6 +146,11 @@ typedef void (*mxc_tmr_complete_t)(int error); /** * @brief Initialize timer module clock. + * @note On default this function enables TMR peripheral clock and related GPIOs. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param tmr Pointer to timer module to initialize. * @param cfg System configuration object * @param init_pins True will initialize pins corresponding to the TMR and False will not if pins are pinned out otherwise it will not diff --git a/Libraries/PeriphDrivers/Include/MAX32680/wdt.h b/Libraries/PeriphDrivers/Include/MAX32680/wdt.h index bc8a729f95..55bd28083b 100644 --- a/Libraries/PeriphDrivers/Include/MAX32680/wdt.h +++ b/Libraries/PeriphDrivers/Include/MAX32680/wdt.h @@ -116,6 +116,11 @@ typedef struct { /** * @brief Initialize the Watchdog Timer + * @note On default this function enables WDT peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param wdt Pointer to the watchdog registers * @param cfg watchdog configuration * @return See \ref MXC_Error_Codes for the list of error codes. diff --git a/Libraries/PeriphDrivers/Include/MAX32690/dma.h b/Libraries/PeriphDrivers/Include/MAX32690/dma.h index b577008327..1bcfe3dddd 100644 --- a/Libraries/PeriphDrivers/Include/MAX32690/dma.h +++ b/Libraries/PeriphDrivers/Include/MAX32690/dma.h @@ -209,6 +209,10 @@ typedef mxc_dma_srcdst_t (*mxc_dma_trans_chain_t)(mxc_dma_srcdst_t dest); /** * @brief Initialize DMA resources * @details This initialization is required before using the DMA driver functions. + * @note On default this function enables DMA peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * @return #E_NO_ERROR if successful */ int MXC_DMA_Init(void); diff --git a/Libraries/PeriphDrivers/Include/MAX32690/i2c.h b/Libraries/PeriphDrivers/Include/MAX32690/i2c.h index a20fc8f2b8..6eeff9dfa5 100644 --- a/Libraries/PeriphDrivers/Include/MAX32690/i2c.h +++ b/Libraries/PeriphDrivers/Include/MAX32690/i2c.h @@ -185,6 +185,10 @@ typedef int (*mxc_i2c_slave_handler_t)(mxc_i2c_regs_t *i2c, mxc_i2c_slave_event_ * @brief Initialize and enable I2C peripheral. * @note This function sets the I2C Speed to 100kHz, if another speed is * desired use the MXC_I2C_SetFrequency() function to set it. + * @note On default this function enables I2C peripheral clock and i2c gpio pins. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file * * @param i2c Pointer to I2C registers (selects the I2C block used.) * @param masterMode Whether to put the device in master or slave mode. Use diff --git a/Libraries/PeriphDrivers/Include/MAX32690/spi.h b/Libraries/PeriphDrivers/Include/MAX32690/spi.h index a57d2a2599..5b70f9e66f 100644 --- a/Libraries/PeriphDrivers/Include/MAX32690/spi.h +++ b/Libraries/PeriphDrivers/Include/MAX32690/spi.h @@ -168,6 +168,11 @@ struct _mxc_spi_req_t { * SPI Width - SPI_WIDTH_STANDARD (even if quadModeUsed is set) * * These parameters can be modified after initialization using low level functions + * + * @note On default this function enables SPI peripheral clock and spi gpio pins. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file * * @param spi Pointer to SPI registers (selects the SPI block used.) * @param masterMode Whether to put the device in master or slave mode. Use @@ -185,7 +190,8 @@ struct _mxc_spi_req_t { * will be returned by the function if successful. Used in * master mode only. * @param pins SPI pin structure. Pins selected as true will be initialized - * for the requested SPI block. + * for the requested SPI block. Has no effect incase of + * MSDK_NO_GPIO_CLK_INIT has been defined. * * @return If successful, the actual clock frequency is returned. Otherwise, see * \ref MXC_Error_Codes for a list of return codes. diff --git a/Libraries/PeriphDrivers/Include/MAX32690/tmr.h b/Libraries/PeriphDrivers/Include/MAX32690/tmr.h index dab28f811c..12f6f78b7c 100644 --- a/Libraries/PeriphDrivers/Include/MAX32690/tmr.h +++ b/Libraries/PeriphDrivers/Include/MAX32690/tmr.h @@ -147,10 +147,15 @@ typedef void (*mxc_tmr_complete_t)(int error); /** * @brief Initialize timer module clock. + * @note On default this function enables TMR peripheral clock and related GPIOs. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param tmr Pointer to timer module to initialize. * @param cfg System configuration object * @param bool True will initialize pins corresponding to the TMR and False will not if pins are pinned out otherwise it will not - * be used + * be used, has no effect incase of MSDK_NO_GPIO_CLK_INIT has been defined. * * @return Success/Fail, see \ref MXC_Error_Codes for a list of return codes. */ diff --git a/Libraries/PeriphDrivers/Include/MAX32690/uart.h b/Libraries/PeriphDrivers/Include/MAX32690/uart.h index 2a7ad31c96..1838a5d7d4 100644 --- a/Libraries/PeriphDrivers/Include/MAX32690/uart.h +++ b/Libraries/PeriphDrivers/Include/MAX32690/uart.h @@ -159,6 +159,11 @@ struct _mxc_uart_req_t { * * These parameters can be modified after initialization using low level functions * + * @note On default this function enables UART peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param uart Pointer to UART registers (selects the UART block used.) * @param baud The requested clock frequency. The actual clock frequency * will be returned by the function if successful. diff --git a/Libraries/PeriphDrivers/Include/MAX32690/wdt.h b/Libraries/PeriphDrivers/Include/MAX32690/wdt.h index 7c54d0b4fc..e5ba05b58f 100644 --- a/Libraries/PeriphDrivers/Include/MAX32690/wdt.h +++ b/Libraries/PeriphDrivers/Include/MAX32690/wdt.h @@ -116,6 +116,11 @@ typedef struct { /** * @brief Initialize the Watchdog Timer + * @note On default this function enables WDT peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param wdt Pointer to the watchdog registers * @param cfg watchdog configuration * @return See \ref MXC_Error_Codes for the list of error codes. diff --git a/Libraries/PeriphDrivers/Include/MAX78000/dma.h b/Libraries/PeriphDrivers/Include/MAX78000/dma.h index eb9bc55d05..3598774e32 100644 --- a/Libraries/PeriphDrivers/Include/MAX78000/dma.h +++ b/Libraries/PeriphDrivers/Include/MAX78000/dma.h @@ -203,6 +203,10 @@ typedef mxc_dma_srcdst_t (*mxc_dma_trans_chain_t)(mxc_dma_srcdst_t dest); /** * @brief Initialize DMA resources * @details This initialization is required before using the DMA driver functions. + * @note On default this function enables DMA peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * @return #E_NO_ERROR if successful */ int MXC_DMA_Init(void); diff --git a/Libraries/PeriphDrivers/Include/MAX78000/tmr.h b/Libraries/PeriphDrivers/Include/MAX78000/tmr.h index d9bbf9bd8a..3e940956f9 100644 --- a/Libraries/PeriphDrivers/Include/MAX78000/tmr.h +++ b/Libraries/PeriphDrivers/Include/MAX78000/tmr.h @@ -147,10 +147,15 @@ typedef void (*mxc_tmr_complete_t)(int error); /** * @brief Initialize timer module clock. + * @note On default this function enables TMR peripheral clock and related GPIOs. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param tmr Pointer to timer module to initialize. * @param cfg System configuration object * @param init_pins True will initialize pins corresponding to the TMR and False will not if pins are pinned out otherwise it will not - * be used + * be used, has no effect incase of MSDK_NO_GPIO_CLK_INIT has been defined. * * @return Success/Fail, see \ref MXC_Error_Codes for a list of return codes. */ diff --git a/Libraries/PeriphDrivers/Include/MAX78000/wdt.h b/Libraries/PeriphDrivers/Include/MAX78000/wdt.h index 63acdc1294..3eb9ce8fb9 100644 --- a/Libraries/PeriphDrivers/Include/MAX78000/wdt.h +++ b/Libraries/PeriphDrivers/Include/MAX78000/wdt.h @@ -116,6 +116,11 @@ typedef struct { /** * @brief Initialize the Watchdog Timer + * @note On default this function enables WDT peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param wdt Pointer to the watchdog registers * @param cfg watchdog configuration * @return See \ref MXC_Error_Codes for the list of error codes. diff --git a/Libraries/PeriphDrivers/Include/MAX78002/dma.h b/Libraries/PeriphDrivers/Include/MAX78002/dma.h index d8a3b2dfac..0bbefc3527 100644 --- a/Libraries/PeriphDrivers/Include/MAX78002/dma.h +++ b/Libraries/PeriphDrivers/Include/MAX78002/dma.h @@ -201,6 +201,10 @@ typedef mxc_dma_srcdst_t (*mxc_dma_trans_chain_t)(mxc_dma_srcdst_t dest); /** * @brief Initialize DMA resources * @details This initialization is required before using the DMA driver functions. + * @note On default this function enables DMA peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. * @return #E_NO_ERROR if successful */ int MXC_DMA_Init(void); diff --git a/Libraries/PeriphDrivers/Include/MAX78002/tmr.h b/Libraries/PeriphDrivers/Include/MAX78002/tmr.h index 1f5a125120..0c31054a95 100644 --- a/Libraries/PeriphDrivers/Include/MAX78002/tmr.h +++ b/Libraries/PeriphDrivers/Include/MAX78002/tmr.h @@ -146,10 +146,15 @@ typedef void (*mxc_tmr_complete_t)(int error); /** * @brief Initialize timer module clock. + * @note On default this function enables TMR peripheral clock and related GPIOs. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param tmr Pointer to timer module to initialize. * @param cfg System configuration object * @param init_pins True will initialize pins corresponding to the TMR and False will not if pins are pinned out otherwise it will not - * be used + * be used, has no effect incase of MSDK_NO_GPIO_CLK_INIT has been defined. * * @return Success/Fail, see \ref MXC_Error_Codes for a list of return codes. */ diff --git a/Libraries/PeriphDrivers/Include/MAX78002/wdt.h b/Libraries/PeriphDrivers/Include/MAX78002/wdt.h index d024feb0b0..7554441ea3 100644 --- a/Libraries/PeriphDrivers/Include/MAX78002/wdt.h +++ b/Libraries/PeriphDrivers/Include/MAX78002/wdt.h @@ -116,6 +116,11 @@ typedef struct { /** * @brief Initialize the Watchdog Timer + * @note On default this function enables WDT peripheral clock. + * if you wish to manage clock and gpio related things in upper level instead of here. + * Define MSDK_NO_GPIO_CLK_INIT flag in project.mk file. + * By this flag this function will remove clock and gpio related codes from file. + * * @param wdt Pointer to the watchdog registers * @param cfg watchdog configuration * @return See \ref MXC_Error_Codes for the list of error codes. diff --git a/Libraries/PeriphDrivers/Source/DMA/dma_ai87.c b/Libraries/PeriphDrivers/Source/DMA/dma_ai87.c index cdaa594a71..d1611b5d68 100644 --- a/Libraries/PeriphDrivers/Source/DMA/dma_ai87.c +++ b/Libraries/PeriphDrivers/Source/DMA/dma_ai87.c @@ -49,10 +49,12 @@ int MXC_DMA_Init(void) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (!MXC_SYS_IsClockEnabled(MXC_SYS_PERIPH_CLOCK_DMA)) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_DMA); MXC_SYS_Reset_Periph(MXC_SYS_RESET0_DMA); } +#endif return MXC_DMA_RevA_Init((mxc_dma_reva_regs_t *)MXC_DMA); } diff --git a/Libraries/PeriphDrivers/Source/DMA/dma_es17.c b/Libraries/PeriphDrivers/Source/DMA/dma_es17.c index 452ebf1989..52e7384883 100644 --- a/Libraries/PeriphDrivers/Source/DMA/dma_es17.c +++ b/Libraries/PeriphDrivers/Source/DMA/dma_es17.c @@ -45,10 +45,12 @@ int MXC_DMA_Init(void) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (!MXC_SYS_IsClockEnabled(MXC_SYS_PERIPH_CLOCK_DMA)) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_DMA); MXC_SYS_Reset_Periph(MXC_SYS_RESET_DMA); } +#endif return MXC_DMA_RevA_Init((mxc_dma_reva_regs_t *)MXC_DMA); } diff --git a/Libraries/PeriphDrivers/Source/DMA/dma_me10.c b/Libraries/PeriphDrivers/Source/DMA/dma_me10.c index 3c289831d7..a7ee76b5b6 100644 --- a/Libraries/PeriphDrivers/Source/DMA/dma_me10.c +++ b/Libraries/PeriphDrivers/Source/DMA/dma_me10.c @@ -43,10 +43,12 @@ /* ************************************************************************* */ int MXC_DMA_Init(void) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (!MXC_SYS_IsClockEnabled(MXC_SYS_PERIPH_CLOCK_DMA)) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_DMA); MXC_SYS_Reset_Periph(MXC_SYS_RESET_DMA); } +#endif return MXC_DMA_RevA_Init((mxc_dma_reva_regs_t *)MXC_DMA); } diff --git a/Libraries/PeriphDrivers/Source/DMA/dma_me11.c b/Libraries/PeriphDrivers/Source/DMA/dma_me11.c index e7e46cf659..ef043fcd8c 100644 --- a/Libraries/PeriphDrivers/Source/DMA/dma_me11.c +++ b/Libraries/PeriphDrivers/Source/DMA/dma_me11.c @@ -51,10 +51,12 @@ int MXC_DMA_Init(void) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (!MXC_SYS_IsClockEnabled(MXC_SYS_PERIPH_CLOCK_DMA)) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_DMA); MXC_SYS_Reset_Periph(MXC_SYS_RESET0_DMA); } +#endif return MXC_DMA_RevA_Init((mxc_dma_reva_regs_t *)MXC_DMA); } diff --git a/Libraries/PeriphDrivers/Source/DMA/dma_me12.c b/Libraries/PeriphDrivers/Source/DMA/dma_me12.c index 2787409a2d..574265c006 100644 --- a/Libraries/PeriphDrivers/Source/DMA/dma_me12.c +++ b/Libraries/PeriphDrivers/Source/DMA/dma_me12.c @@ -49,10 +49,12 @@ int MXC_DMA_Init(void) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (!MXC_SYS_IsClockEnabled(MXC_SYS_PERIPH_CLOCK_DMA)) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_DMA); MXC_SYS_Reset_Periph(MXC_SYS_RESET0_DMA); } +#endif return MXC_DMA_RevA_Init((mxc_dma_reva_regs_t *)MXC_DMA); } diff --git a/Libraries/PeriphDrivers/Source/DMA/dma_me13.c b/Libraries/PeriphDrivers/Source/DMA/dma_me13.c index d1e93cf759..0d4ae7bd07 100644 --- a/Libraries/PeriphDrivers/Source/DMA/dma_me13.c +++ b/Libraries/PeriphDrivers/Source/DMA/dma_me13.c @@ -45,10 +45,12 @@ int MXC_DMA_Init(void) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (!MXC_SYS_IsClockEnabled(MXC_SYS_PERIPH_CLOCK_DMA)) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_DMA); MXC_SYS_Reset_Periph(MXC_SYS_RESET0_DMA); } +#endif return MXC_DMA_RevA_Init((mxc_dma_reva_regs_t *)MXC_DMA); } diff --git a/Libraries/PeriphDrivers/Source/DMA/dma_me14.c b/Libraries/PeriphDrivers/Source/DMA/dma_me14.c index bec606c2ec..e118f19bf3 100644 --- a/Libraries/PeriphDrivers/Source/DMA/dma_me14.c +++ b/Libraries/PeriphDrivers/Source/DMA/dma_me14.c @@ -62,6 +62,7 @@ static mxc_dma_regs_t *getDMAInstance(int ch) int MXC_DMA_Init(mxc_dma_regs_t *dma) { +#ifndef MSDK_NO_GPIO_CLK_INIT switch (MXC_DMA_GET_IDX(dma)) { case 0: if (!MXC_SYS_IsClockEnabled(MXC_SYS_PERIPH_CLOCK_DMA)) { @@ -78,6 +79,7 @@ int MXC_DMA_Init(mxc_dma_regs_t *dma) default: return E_BAD_PARAM; } +#endif return MXC_DMA_RevA_Init((mxc_dma_reva_regs_t *)dma); } diff --git a/Libraries/PeriphDrivers/Source/DMA/dma_me15.c b/Libraries/PeriphDrivers/Source/DMA/dma_me15.c index 63ef2a184d..38e976e9ca 100644 --- a/Libraries/PeriphDrivers/Source/DMA/dma_me15.c +++ b/Libraries/PeriphDrivers/Source/DMA/dma_me15.c @@ -45,10 +45,12 @@ int MXC_DMA_Init(void) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (!MXC_SYS_IsClockEnabled(MXC_SYS_PERIPH_CLOCK_DMA)) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_DMA); MXC_SYS_Reset_Periph(MXC_SYS_RESET0_DMA); } +#endif return MXC_DMA_RevA_Init((mxc_dma_reva_regs_t *)MXC_DMA); } diff --git a/Libraries/PeriphDrivers/Source/DMA/dma_me16.c b/Libraries/PeriphDrivers/Source/DMA/dma_me16.c index c3b6c6410c..3f9cc3f04e 100644 --- a/Libraries/PeriphDrivers/Source/DMA/dma_me16.c +++ b/Libraries/PeriphDrivers/Source/DMA/dma_me16.c @@ -45,10 +45,12 @@ int MXC_DMA_Init(void) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (!MXC_SYS_IsClockEnabled(MXC_SYS_PERIPH_CLOCK_DMA)) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_DMA); MXC_SYS_Reset_Periph(MXC_SYS_RESET0_DMA); } +#endif return MXC_DMA_RevA_Init(); } diff --git a/Libraries/PeriphDrivers/Source/DMA/dma_me17.c b/Libraries/PeriphDrivers/Source/DMA/dma_me17.c index cdaa594a71..d1611b5d68 100644 --- a/Libraries/PeriphDrivers/Source/DMA/dma_me17.c +++ b/Libraries/PeriphDrivers/Source/DMA/dma_me17.c @@ -49,10 +49,12 @@ int MXC_DMA_Init(void) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (!MXC_SYS_IsClockEnabled(MXC_SYS_PERIPH_CLOCK_DMA)) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_DMA); MXC_SYS_Reset_Periph(MXC_SYS_RESET0_DMA); } +#endif return MXC_DMA_RevA_Init((mxc_dma_reva_regs_t *)MXC_DMA); } diff --git a/Libraries/PeriphDrivers/Source/DMA/dma_me18.c b/Libraries/PeriphDrivers/Source/DMA/dma_me18.c index 2787409a2d..574265c006 100644 --- a/Libraries/PeriphDrivers/Source/DMA/dma_me18.c +++ b/Libraries/PeriphDrivers/Source/DMA/dma_me18.c @@ -49,10 +49,12 @@ int MXC_DMA_Init(void) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (!MXC_SYS_IsClockEnabled(MXC_SYS_PERIPH_CLOCK_DMA)) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_DMA); MXC_SYS_Reset_Periph(MXC_SYS_RESET0_DMA); } +#endif return MXC_DMA_RevA_Init((mxc_dma_reva_regs_t *)MXC_DMA); } diff --git a/Libraries/PeriphDrivers/Source/DMA/dma_me21.c b/Libraries/PeriphDrivers/Source/DMA/dma_me21.c index 02b57bb0e1..d3a15605ed 100644 --- a/Libraries/PeriphDrivers/Source/DMA/dma_me21.c +++ b/Libraries/PeriphDrivers/Source/DMA/dma_me21.c @@ -45,10 +45,12 @@ int MXC_DMA_Init(void) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (!MXC_SYS_IsClockEnabled(MXC_SYS_PERIPH_CLOCK_DMA)) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_DMA); MXC_SYS_Reset_Periph(MXC_SYS_RESET0_DMA); } +#endif return MXC_DMA_RevA_Init((mxc_dma_reva_regs_t *)MXC_DMA); } diff --git a/Libraries/PeriphDrivers/Source/DMA/dma_me55.c b/Libraries/PeriphDrivers/Source/DMA/dma_me55.c index d1e93cf759..0d4ae7bd07 100644 --- a/Libraries/PeriphDrivers/Source/DMA/dma_me55.c +++ b/Libraries/PeriphDrivers/Source/DMA/dma_me55.c @@ -45,10 +45,12 @@ int MXC_DMA_Init(void) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (!MXC_SYS_IsClockEnabled(MXC_SYS_PERIPH_CLOCK_DMA)) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_DMA); MXC_SYS_Reset_Periph(MXC_SYS_RESET0_DMA); } +#endif return MXC_DMA_RevA_Init((mxc_dma_reva_regs_t *)MXC_DMA); } diff --git a/Libraries/PeriphDrivers/Source/I2C/i2c_me14.c b/Libraries/PeriphDrivers/Source/I2C/i2c_me14.c index 3b47c6311d..3171f20a3b 100644 --- a/Libraries/PeriphDrivers/Source/I2C/i2c_me14.c +++ b/Libraries/PeriphDrivers/Source/I2C/i2c_me14.c @@ -60,6 +60,7 @@ int MXC_I2C_Init(mxc_i2c_regs_t *i2c, int masterMode, unsigned int slaveAddr) return E_NULL_PTR; } +#ifndef MSDK_NO_GPIO_CLK_INIT MXC_I2C_Shutdown(i2c); // Clear everything out if ((i2c == MXC_I2C0_BUS0) || (i2c == MXC_I2C0_BUS1)) { @@ -74,6 +75,7 @@ int MXC_I2C_Init(mxc_i2c_regs_t *i2c, int masterMode, unsigned int slaveAddr) } else { return E_NO_DEVICE; } +#endif // MSDK_NO_GPIO_CLK_INIT return MXC_I2C_RevA_Init((mxc_i2c_reva_regs_t *)i2c, masterMode, slaveAddr); } diff --git a/Libraries/PeriphDrivers/Source/I2C/i2c_me15.c b/Libraries/PeriphDrivers/Source/I2C/i2c_me15.c index 85f9df5107..9e88b1ee2e 100644 --- a/Libraries/PeriphDrivers/Source/I2C/i2c_me15.c +++ b/Libraries/PeriphDrivers/Source/I2C/i2c_me15.c @@ -65,6 +65,7 @@ int MXC_I2C_Init(mxc_i2c_regs_t *i2c, int masterMode, unsigned int slaveAddr) return E_NULL_PTR; } +#ifndef MSDK_NO_GPIO_CLK_INIT MXC_I2C_Shutdown(i2c); // Clear everything out if (i2c == MXC_I2C0) { @@ -81,6 +82,7 @@ int MXC_I2C_Init(mxc_i2c_regs_t *i2c, int masterMode, unsigned int slaveAddr) } else { return E_NO_DEVICE; } +#endif // MSDK_NO_GPIO_CLK_INIT return MXC_I2C_RevA_Init((mxc_i2c_reva_regs_t *)i2c, masterMode, slaveAddr); } diff --git a/Libraries/PeriphDrivers/Source/I2C/i2c_me17.c b/Libraries/PeriphDrivers/Source/I2C/i2c_me17.c index e82437b0a2..ae9ee88cd6 100644 --- a/Libraries/PeriphDrivers/Source/I2C/i2c_me17.c +++ b/Libraries/PeriphDrivers/Source/I2C/i2c_me17.c @@ -58,6 +58,7 @@ int MXC_I2C_Init(mxc_i2c_regs_t *i2c, int masterMode, unsigned int slaveAddr) return E_NULL_PTR; } +#ifndef MSDK_NO_GPIO_CLK_INIT MXC_I2C_Shutdown(i2c); // Clear everything out if (i2c == MXC_I2C0) { @@ -72,6 +73,7 @@ int MXC_I2C_Init(mxc_i2c_regs_t *i2c, int masterMode, unsigned int slaveAddr) } else { return E_NO_DEVICE; } +#endif // MSDK_NO_GPIO_CLK_INIT return MXC_I2C_RevA_Init((mxc_i2c_reva_regs_t *)i2c, masterMode, slaveAddr); } diff --git a/Libraries/PeriphDrivers/Source/I2C/i2c_me18.c b/Libraries/PeriphDrivers/Source/I2C/i2c_me18.c index 5c7bebd0b2..3a7dadd559 100644 --- a/Libraries/PeriphDrivers/Source/I2C/i2c_me18.c +++ b/Libraries/PeriphDrivers/Source/I2C/i2c_me18.c @@ -58,6 +58,7 @@ int MXC_I2C_Init(mxc_i2c_regs_t *i2c, int masterMode, unsigned int slaveAddr) return E_NULL_PTR; } +#ifndef MSDK_NO_GPIO_CLK_INIT MXC_I2C_Shutdown(i2c); // Clear everything out if (i2c == MXC_I2C0) { @@ -72,6 +73,7 @@ int MXC_I2C_Init(mxc_i2c_regs_t *i2c, int masterMode, unsigned int slaveAddr) } else { return E_NO_DEVICE; } +#endif // MSDK_NO_GPIO_CLK_INIT return MXC_I2C_RevA_Init((mxc_i2c_reva_regs_t *)i2c, masterMode, slaveAddr); } diff --git a/Libraries/PeriphDrivers/Source/SPI/spi_me14.c b/Libraries/PeriphDrivers/Source/SPI/spi_me14.c index a620ce47db..5bf3ae2023 100644 --- a/Libraries/PeriphDrivers/Source/SPI/spi_me14.c +++ b/Libraries/PeriphDrivers/Source/SPI/spi_me14.c @@ -61,6 +61,7 @@ int MXC_SPI_Init(mxc_spi_regs_t *spi, int masterMode, int quadModeUsed, int numS return E_BAD_PARAM; } +#ifndef MSDK_NO_GPIO_CLK_INIT // Configure GPIO for spi if (spi == MXC_SPI0) { MXC_GCR->rstr1 |= MXC_F_GCR_RSTR1_SPI0; @@ -86,6 +87,9 @@ int MXC_SPI_Init(mxc_spi_regs_t *spi, int masterMode, int quadModeUsed, int numS } else { return E_NO_DEVICE; } +#else + (void)map; +#endif // MSDK_NO_GPIO_CLK_INIT return MXC_SPI_RevA1_Init((mxc_spi_reva_regs_t *)spi, masterMode, quadModeUsed, numSlaves, ssPolarity, hz); diff --git a/Libraries/PeriphDrivers/Source/SPI/spi_me15.c b/Libraries/PeriphDrivers/Source/SPI/spi_me15.c index c49e6efe6e..9de0b08cf7 100644 --- a/Libraries/PeriphDrivers/Source/SPI/spi_me15.c +++ b/Libraries/PeriphDrivers/Source/SPI/spi_me15.c @@ -61,6 +61,7 @@ int MXC_SPI_Init(mxc_spi_regs_t *spi, int masterMode, int quadModeUsed, int numS return E_BAD_PARAM; } +#ifndef MSDK_NO_GPIO_CLK_INIT // Configure GPIO for spi if (spi == MXC_SPI0) { #if TARGET_NUM != 32675 @@ -79,6 +80,7 @@ int MXC_SPI_Init(mxc_spi_regs_t *spi, int masterMode, int quadModeUsed, int numS } else { return E_NO_DEVICE; } +#endif // MSDK_NO_GPIO_CLK_INIT return MXC_SPI_RevA1_Init((mxc_spi_reva_regs_t *)spi, masterMode, quadModeUsed, numSlaves, ssPolarity, hz); diff --git a/Libraries/PeriphDrivers/Source/SPI/spi_me17.c b/Libraries/PeriphDrivers/Source/SPI/spi_me17.c index 82d0323eee..2d806febd0 100644 --- a/Libraries/PeriphDrivers/Source/SPI/spi_me17.c +++ b/Libraries/PeriphDrivers/Source/SPI/spi_me17.c @@ -68,6 +68,7 @@ int MXC_SPI_Init(mxc_spi_regs_t *spi, int masterMode, int quadModeUsed, int numS return E_BAD_PARAM; } +#ifndef MSDK_NO_GPIO_CLK_INIT mxc_gpio_cfg_t gpio_cfg_spi; gpio_cfg_spi.pad = MXC_GPIO_PAD_NONE; gpio_cfg_spi.port = MXC_GPIO0; @@ -182,6 +183,9 @@ int MXC_SPI_Init(mxc_spi_regs_t *spi, int masterMode, int quadModeUsed, int numS } MXC_GPIO_Config(&gpio_cfg_spi); +#else + (void)pins; +#endif // MSDK_NO_GPIO_CLK_INIT return MXC_SPI_RevA1_Init((mxc_spi_reva_regs_t *)spi, masterMode, quadModeUsed, numSlaves, ssPolarity, hz); diff --git a/Libraries/PeriphDrivers/Source/SPI/spi_me18.c b/Libraries/PeriphDrivers/Source/SPI/spi_me18.c index d5277903ce..4b5b94dc27 100644 --- a/Libraries/PeriphDrivers/Source/SPI/spi_me18.c +++ b/Libraries/PeriphDrivers/Source/SPI/spi_me18.c @@ -68,6 +68,7 @@ int MXC_SPI_Init(mxc_spi_regs_t *spi, int masterMode, int quadModeUsed, int numS return E_BAD_PARAM; } +#ifndef MSDK_NO_GPIO_CLK_INIT // Configure GPIO for spi if (spi == MXC_SPI0) { MXC_SYS_Reset_Periph(MXC_SYS_RESET0_SPI0); @@ -159,6 +160,9 @@ int MXC_SPI_Init(mxc_spi_regs_t *spi, int masterMode, int quadModeUsed, int numS } else { return E_NO_DEVICE; } +#else + (void)pins; +#endif // MSDK_NO_GPIO_CLK_INIT return MXC_SPI_RevA1_Init((mxc_spi_reva_regs_t *)spi, masterMode, quadModeUsed, numSlaves, ssPolarity, hz); diff --git a/Libraries/PeriphDrivers/Source/TMR/tmr_ai85.c b/Libraries/PeriphDrivers/Source/TMR/tmr_ai85.c index bfb3fc845b..ce8274b951 100644 --- a/Libraries/PeriphDrivers/Source/TMR/tmr_ai85.c +++ b/Libraries/PeriphDrivers/Source/TMR/tmr_ai85.c @@ -110,6 +110,7 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins) break; } +#ifndef MSDK_NO_GPIO_CLK_INIT //enable peripheral clock and configure gpio pins switch (tmr_id) { case 0: @@ -180,6 +181,9 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins) MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_TMR5); break; } +#else + (void)init_pins; +#endif return MXC_TMR_RevB_Init((mxc_tmr_revb_regs_t *)tmr, cfg, clockSource); } diff --git a/Libraries/PeriphDrivers/Source/TMR/tmr_ai87.c b/Libraries/PeriphDrivers/Source/TMR/tmr_ai87.c index 1e5f6f4306..4cce165f74 100644 --- a/Libraries/PeriphDrivers/Source/TMR/tmr_ai87.c +++ b/Libraries/PeriphDrivers/Source/TMR/tmr_ai87.c @@ -98,6 +98,7 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins) break; } +#ifndef MSDK_NO_GPIO_CLK_INIT //enable peripheral clock and configure gpio pins switch (tmr_id) { case 0: @@ -168,6 +169,9 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins) MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_TMR5); break; } +#else + (void)init_pins; +#endif return MXC_TMR_RevB_Init((mxc_tmr_revb_regs_t *)tmr, cfg, clockSource); } diff --git a/Libraries/PeriphDrivers/Source/TMR/tmr_es17.c b/Libraries/PeriphDrivers/Source/TMR/tmr_es17.c index b0322ff5bb..c7265b0113 100644 --- a/Libraries/PeriphDrivers/Source/TMR/tmr_es17.c +++ b/Libraries/PeriphDrivers/Source/TMR/tmr_es17.c @@ -37,6 +37,7 @@ void MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg) { +#ifndef MSDK_NO_GPIO_CLK_INIT int tmr_id = MXC_TMR_GET_IDX(tmr); MXC_ASSERT(tmr_id >= 0); @@ -66,6 +67,7 @@ void MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg) MXC_GPIO_Config(&gpio_cfg_tmr3); break; } +#endif MXC_TMR_RevA_Init((mxc_tmr_reva_regs_t *)tmr, cfg); } diff --git a/Libraries/PeriphDrivers/Source/TMR/tmr_me10.c b/Libraries/PeriphDrivers/Source/TMR/tmr_me10.c index 1701a958df..4e3322cc52 100644 --- a/Libraries/PeriphDrivers/Source/TMR/tmr_me10.c +++ b/Libraries/PeriphDrivers/Source/TMR/tmr_me10.c @@ -49,6 +49,7 @@ /* ************************************************************************** */ void MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg) { +#ifndef MSDK_NO_GPIO_CLK_INIT int tmr_id = MXC_TMR_GET_IDX(tmr); switch (tmr_id) { @@ -85,6 +86,7 @@ void MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg) default: return; } +#endif MXC_TMR_RevA_Init((mxc_tmr_reva_regs_t *)tmr, cfg); } diff --git a/Libraries/PeriphDrivers/Source/TMR/tmr_me11.c b/Libraries/PeriphDrivers/Source/TMR/tmr_me11.c index d11ce346b6..e0d27e4477 100644 --- a/Libraries/PeriphDrivers/Source/TMR/tmr_me11.c +++ b/Libraries/PeriphDrivers/Source/TMR/tmr_me11.c @@ -37,6 +37,7 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg) { +#ifndef MSDK_NO_GPIO_CLK_INIT int tmr_id = MXC_TMR_GET_IDX(tmr); MXC_ASSERT(tmr_id >= 0); @@ -60,6 +61,7 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg) MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_TMR2); break; } +#endif MXC_TMR_RevA_Init((mxc_tmr_reva_regs_t *)tmr, cfg); return E_NO_ERROR; diff --git a/Libraries/PeriphDrivers/Source/TMR/tmr_me12.c b/Libraries/PeriphDrivers/Source/TMR/tmr_me12.c index 41e750e175..2af26df553 100644 --- a/Libraries/PeriphDrivers/Source/TMR/tmr_me12.c +++ b/Libraries/PeriphDrivers/Source/TMR/tmr_me12.c @@ -101,6 +101,7 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins, sys_ma break; } +#ifndef MSDK_NO_GPIO_CLK_INIT //enable peripheral clock and configure gpio pins switch (tmr_id) { case 0: @@ -178,6 +179,10 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins, sys_ma default: return E_BAD_PARAM; } +#else + (void)init_pins; + (void)pin_sel; +#endif return MXC_TMR_RevB_Init((mxc_tmr_revb_regs_t *)tmr, cfg, clockSource); } diff --git a/Libraries/PeriphDrivers/Source/TMR/tmr_me13.c b/Libraries/PeriphDrivers/Source/TMR/tmr_me13.c index f6698e1e00..4c1a364b6e 100644 --- a/Libraries/PeriphDrivers/Source/TMR/tmr_me13.c +++ b/Libraries/PeriphDrivers/Source/TMR/tmr_me13.c @@ -37,6 +37,7 @@ void MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg) { +#ifndef MSDK_NO_GPIO_CLK_INIT int tmr_id = MXC_TMR_GET_IDX(tmr); MXC_ASSERT(tmr_id >= 0); @@ -113,6 +114,7 @@ void MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg) if (cfg->pins != NULL) { MXC_GPIO_Config(cfg->pins); } +#endif MXC_TMR_RevA_Init((mxc_tmr_reva_regs_t *)tmr, cfg); } diff --git a/Libraries/PeriphDrivers/Source/TMR/tmr_me14.c b/Libraries/PeriphDrivers/Source/TMR/tmr_me14.c index b09f311e9c..6869c106f7 100644 --- a/Libraries/PeriphDrivers/Source/TMR/tmr_me14.c +++ b/Libraries/PeriphDrivers/Source/TMR/tmr_me14.c @@ -37,6 +37,7 @@ void MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg) { +#ifndef MSDK_NO_GPIO_CLK_INIT int tmr_id = MXC_TMR_GET_IDX(tmr); MXC_ASSERT(tmr_id >= 0); @@ -84,6 +85,7 @@ void MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg) MXC_GPIO_Config(&gpio_cfg_tmr5); break; } +#endif MXC_TMR_RevA_Init((mxc_tmr_reva_regs_t *)tmr, cfg); } diff --git a/Libraries/PeriphDrivers/Source/TMR/tmr_me15.c b/Libraries/PeriphDrivers/Source/TMR/tmr_me15.c index 935006ad99..736eb7fd95 100644 --- a/Libraries/PeriphDrivers/Source/TMR/tmr_me15.c +++ b/Libraries/PeriphDrivers/Source/TMR/tmr_me15.c @@ -103,6 +103,7 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins) break; } +#ifndef MSDK_NO_GPIO_CLK_INIT //enable peripheral clock and configure gpio pins switch (tmr_id) { case 0: @@ -187,6 +188,9 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins) break; } +#else + (void)init_pins; +#endif return MXC_TMR_RevB_Init((mxc_tmr_revb_regs_t *)tmr, cfg, clockSource); } diff --git a/Libraries/PeriphDrivers/Source/TMR/tmr_me16.c b/Libraries/PeriphDrivers/Source/TMR/tmr_me16.c index 085a0c2f96..4dbec49d38 100644 --- a/Libraries/PeriphDrivers/Source/TMR/tmr_me16.c +++ b/Libraries/PeriphDrivers/Source/TMR/tmr_me16.c @@ -98,6 +98,7 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins) break; } +#ifndef MSDK_NO_GPIO_CLK_INIT //enable peripheral clock and configure gpio pins switch (tmr_id) { case 0: @@ -167,6 +168,9 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins) return E_NOT_SUPPORTED; break; } +#else + (void)init_pins; +#endif return MXC_TMR_RevB_Init((mxc_tmr_revb_regs_t *)tmr, cfg, clockSource); } diff --git a/Libraries/PeriphDrivers/Source/TMR/tmr_me17.c b/Libraries/PeriphDrivers/Source/TMR/tmr_me17.c index cc3e6c9b9b..e1d8fc54c0 100644 --- a/Libraries/PeriphDrivers/Source/TMR/tmr_me17.c +++ b/Libraries/PeriphDrivers/Source/TMR/tmr_me17.c @@ -97,6 +97,7 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins) break; } +#ifndef MSDK_NO_GPIO_CLK_INIT //enable peripheral clock and configure gpio pins switch (tmr_id) { case 0: @@ -165,6 +166,9 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins) MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_TMR5); break; } +#else + (void)init_pins; +#endif return MXC_TMR_RevB_Init((mxc_tmr_revb_regs_t *)tmr, cfg, clockSource); } diff --git a/Libraries/PeriphDrivers/Source/TMR/tmr_me18.c b/Libraries/PeriphDrivers/Source/TMR/tmr_me18.c index 103ac27a19..409fa61c92 100644 --- a/Libraries/PeriphDrivers/Source/TMR/tmr_me18.c +++ b/Libraries/PeriphDrivers/Source/TMR/tmr_me18.c @@ -117,6 +117,7 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins) break; } +#ifndef MSDK_NO_GPIO_CLK_INIT //enable peripheral clock and configure gpio pins switch (tmr_id) { case 0: @@ -187,6 +188,9 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins) MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_TMR5); break; } +#else + (void)init_pins; +#endif return MXC_TMR_RevB_Init((mxc_tmr_revb_regs_t *)tmr, cfg, clockSource); } diff --git a/Libraries/PeriphDrivers/Source/TMR/tmr_me21.c b/Libraries/PeriphDrivers/Source/TMR/tmr_me21.c index b557f9b6ca..11304edd81 100644 --- a/Libraries/PeriphDrivers/Source/TMR/tmr_me21.c +++ b/Libraries/PeriphDrivers/Source/TMR/tmr_me21.c @@ -98,6 +98,7 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins) break; } +#ifndef MSDK_NO_GPIO_CLK_INIT //enable peripheral clock and configure gpio pins switch (tmr_id) { case 0: @@ -181,6 +182,9 @@ int MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg, bool init_pins) default: return E_NOT_SUPPORTED; } +#else + (void)init_pins; +#endif return MXC_TMR_RevB_Init((mxc_tmr_revb_regs_t *)tmr, cfg, clockSource); } diff --git a/Libraries/PeriphDrivers/Source/TMR/tmr_me55.c b/Libraries/PeriphDrivers/Source/TMR/tmr_me55.c index 6dc8962d58..970a0aecee 100644 --- a/Libraries/PeriphDrivers/Source/TMR/tmr_me55.c +++ b/Libraries/PeriphDrivers/Source/TMR/tmr_me55.c @@ -37,6 +37,7 @@ void MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg) { +#ifndef MSDK_NO_GPIO_CLK_INIT int tmr_id = MXC_TMR_GET_IDX(tmr); MXC_ASSERT(tmr_id >= 0); @@ -78,6 +79,7 @@ void MXC_TMR_Init(mxc_tmr_regs_t *tmr, mxc_tmr_cfg_t *cfg) MXC_GPIO_Config(&gpio_cfg_tmr5); break; } +#endif MXC_TMR_RevA_Init((mxc_tmr_reva_regs_t *)tmr, cfg); } diff --git a/Libraries/PeriphDrivers/Source/UART/uart_me14.c b/Libraries/PeriphDrivers/Source/UART/uart_me14.c index e556d9ad3c..1163e37810 100644 --- a/Libraries/PeriphDrivers/Source/UART/uart_me14.c +++ b/Libraries/PeriphDrivers/Source/UART/uart_me14.c @@ -76,6 +76,7 @@ void MXC_UART_RxAsyncStop(mxc_uart_regs_t *uart) int MXC_UART_Init(mxc_uart_regs_t *uart, unsigned int baud, sys_map_t map) { +#ifndef MSDK_NO_GPIO_CLK_INIT int retval; retval = MXC_UART_Shutdown(uart); @@ -112,6 +113,9 @@ int MXC_UART_Init(mxc_uart_regs_t *uart, unsigned int baud, sys_map_t map) MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_UART2); break; } +#else + (void)map; +#endif // MSDK_NO_GPIO_CLK_INIT return MXC_UART_RevA_Init((mxc_uart_reva_regs_t *)uart, baud); } diff --git a/Libraries/PeriphDrivers/Source/UART/uart_me15.c b/Libraries/PeriphDrivers/Source/UART/uart_me15.c index e6afb68ecd..73e852bb06 100644 --- a/Libraries/PeriphDrivers/Source/UART/uart_me15.c +++ b/Libraries/PeriphDrivers/Source/UART/uart_me15.c @@ -57,6 +57,7 @@ int MXC_UART_AsyncStop(mxc_uart_regs_t *uart) int MXC_UART_Init(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clock_t clock) { +#ifndef MSDK_NO_GPIO_CLK_INIT int retval; retval = MXC_UART_Shutdown(uart); @@ -120,6 +121,7 @@ int MXC_UART_Init(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clock_t clo default: return E_NOT_SUPPORTED; } +#endif // MSDK_NO_GPIO_CLK_INIT return MXC_UART_RevB_Init((mxc_uart_revb_regs_t *)uart, baud, clock); } diff --git a/Libraries/PeriphDrivers/Source/UART/uart_me17.c b/Libraries/PeriphDrivers/Source/UART/uart_me17.c index dd8e7b21b2..e70b725bf8 100644 --- a/Libraries/PeriphDrivers/Source/UART/uart_me17.c +++ b/Libraries/PeriphDrivers/Source/UART/uart_me17.c @@ -57,6 +57,7 @@ int MXC_UART_AsyncStop(mxc_uart_regs_t *uart) int MXC_UART_Init(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clock_t clock) { +#ifndef MSDK_NO_GPIO_CLK_INIT int retval; retval = MXC_UART_Shutdown(uart); @@ -104,6 +105,7 @@ int MXC_UART_Init(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clock_t clo default: return E_BAD_PARAM; } +#endif // MSDK_NO_GPIO_CLK_INIT return MXC_UART_RevB_Init((mxc_uart_revb_regs_t *)uart, baud, clock); } diff --git a/Libraries/PeriphDrivers/Source/UART/uart_me18.c b/Libraries/PeriphDrivers/Source/UART/uart_me18.c index 52c5a4b126..dad49bff44 100644 --- a/Libraries/PeriphDrivers/Source/UART/uart_me18.c +++ b/Libraries/PeriphDrivers/Source/UART/uart_me18.c @@ -57,6 +57,7 @@ int MXC_UART_AsyncStop(mxc_uart_regs_t *uart) int MXC_UART_Init(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clock_t clock) { +#ifndef MSDK_NO_GPIO_CLK_INIT int retval; retval = MXC_UART_Shutdown(uart); @@ -106,6 +107,7 @@ int MXC_UART_Init(mxc_uart_regs_t *uart, unsigned int baud, mxc_uart_clock_t clo default: return E_BAD_PARAM; } +#endif return MXC_UART_RevB_Init((mxc_uart_revb_regs_t *)uart, baud, clock); } diff --git a/Libraries/PeriphDrivers/Source/WDT/wdt_ai87.c b/Libraries/PeriphDrivers/Source/WDT/wdt_ai87.c index cde5ae410c..777ef7e618 100644 --- a/Libraries/PeriphDrivers/Source/WDT/wdt_ai87.c +++ b/Libraries/PeriphDrivers/Source/WDT/wdt_ai87.c @@ -43,6 +43,7 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt, mxc_wdt_cfg_t *cfg) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (wdt == MXC_WDT0) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_WDT0); } else if (wdt == MXC_WDT1) { @@ -54,6 +55,7 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt, mxc_wdt_cfg_t *cfg) } else { return E_BAD_PARAM; } +#endif MXC_WDT_RevB_Init((mxc_wdt_revb_regs_t *)wdt, (mxc_wdt_revb_cfg_t *)cfg); diff --git a/Libraries/PeriphDrivers/Source/WDT/wdt_es17.c b/Libraries/PeriphDrivers/Source/WDT/wdt_es17.c index ad89acfefb..23e1b984bd 100644 --- a/Libraries/PeriphDrivers/Source/WDT/wdt_es17.c +++ b/Libraries/PeriphDrivers/Source/WDT/wdt_es17.c @@ -43,6 +43,7 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (wdt == MXC_WDT0) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_WDT0); MXC_SYS_Reset_Periph(MXC_SYS_RESET_WDT0); @@ -52,6 +53,9 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt) } else { return E_BAD_PARAM; } +#else + (void)wdt; +#endif return E_NO_ERROR; } diff --git a/Libraries/PeriphDrivers/Source/WDT/wdt_me10.c b/Libraries/PeriphDrivers/Source/WDT/wdt_me10.c index d99c9e297e..91ae30f8f7 100644 --- a/Libraries/PeriphDrivers/Source/WDT/wdt_me10.c +++ b/Libraries/PeriphDrivers/Source/WDT/wdt_me10.c @@ -48,6 +48,7 @@ /* ************************************************************************** */ int MXC_WDT_Init(mxc_wdt_regs_t *wdt) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (wdt == MXC_WDT0) { MXC_SYS_Reset_Periph(MXC_SYS_RESET_WDT); } else if (wdt == MXC_WDT1) { @@ -55,6 +56,9 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt) } else { return E_BAD_PARAM; } +#else + (void)wdt; +#endif return E_NO_ERROR; } diff --git a/Libraries/PeriphDrivers/Source/WDT/wdt_me12.c b/Libraries/PeriphDrivers/Source/WDT/wdt_me12.c index 4b37b7e967..779c99734a 100644 --- a/Libraries/PeriphDrivers/Source/WDT/wdt_me12.c +++ b/Libraries/PeriphDrivers/Source/WDT/wdt_me12.c @@ -43,11 +43,13 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt, mxc_wdt_cfg_t *cfg) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (wdt == MXC_WDT) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_WDT); } else { return E_BAD_PARAM; } +#endif MXC_WDT_RevB_Init((mxc_wdt_revb_regs_t *)wdt, (mxc_wdt_revb_cfg_t *)cfg); diff --git a/Libraries/PeriphDrivers/Source/WDT/wdt_me13.c b/Libraries/PeriphDrivers/Source/WDT/wdt_me13.c index 2dc0b1e919..4e0d661d56 100644 --- a/Libraries/PeriphDrivers/Source/WDT/wdt_me13.c +++ b/Libraries/PeriphDrivers/Source/WDT/wdt_me13.c @@ -43,6 +43,7 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (wdt == MXC_WDT0) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_WDT0); } else if (wdt == MXC_WDT1) { @@ -50,6 +51,9 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt) } else { return E_BAD_PARAM; } +#else + (void)wdt; +#endif return E_NO_ERROR; } diff --git a/Libraries/PeriphDrivers/Source/WDT/wdt_me14.c b/Libraries/PeriphDrivers/Source/WDT/wdt_me14.c index 5c8b1c7e75..64c8a27248 100644 --- a/Libraries/PeriphDrivers/Source/WDT/wdt_me14.c +++ b/Libraries/PeriphDrivers/Source/WDT/wdt_me14.c @@ -43,6 +43,7 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (wdt == MXC_WDT0) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_WDT0); } else if (wdt == MXC_WDT1) { @@ -52,6 +53,9 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt) } else { return E_BAD_PARAM; } +#else + (void)wdt; +#endif return E_NO_ERROR; } diff --git a/Libraries/PeriphDrivers/Source/WDT/wdt_me15.c b/Libraries/PeriphDrivers/Source/WDT/wdt_me15.c index 7f76120e2f..d26b330c2c 100644 --- a/Libraries/PeriphDrivers/Source/WDT/wdt_me15.c +++ b/Libraries/PeriphDrivers/Source/WDT/wdt_me15.c @@ -43,6 +43,7 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt, mxc_wdt_cfg_t *cfg) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (wdt == MXC_WDT0) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_WDT0); } else if (wdt == MXC_WDT1) { @@ -50,6 +51,7 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt, mxc_wdt_cfg_t *cfg) } else { return E_BAD_PARAM; } +#endif MXC_WDT_RevB_Init((mxc_wdt_revb_regs_t *)wdt, (mxc_wdt_revb_cfg_t *)cfg); diff --git a/Libraries/PeriphDrivers/Source/WDT/wdt_me16.c b/Libraries/PeriphDrivers/Source/WDT/wdt_me16.c index 74e7141813..57d0a3f0e5 100644 --- a/Libraries/PeriphDrivers/Source/WDT/wdt_me16.c +++ b/Libraries/PeriphDrivers/Source/WDT/wdt_me16.c @@ -43,6 +43,7 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt, mxc_wdt_cfg_t *cfg) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (wdt == MXC_WDT0) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_WDT0); } else if (wdt == MXC_WDT1) { @@ -50,6 +51,7 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt, mxc_wdt_cfg_t *cfg) } else { return E_BAD_PARAM; } +#endif MXC_WDT_RevB_Init(wdt, cfg); diff --git a/Libraries/PeriphDrivers/Source/WDT/wdt_me17.c b/Libraries/PeriphDrivers/Source/WDT/wdt_me17.c index 7f76120e2f..d26b330c2c 100644 --- a/Libraries/PeriphDrivers/Source/WDT/wdt_me17.c +++ b/Libraries/PeriphDrivers/Source/WDT/wdt_me17.c @@ -43,6 +43,7 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt, mxc_wdt_cfg_t *cfg) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (wdt == MXC_WDT0) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_WDT0); } else if (wdt == MXC_WDT1) { @@ -50,6 +51,7 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt, mxc_wdt_cfg_t *cfg) } else { return E_BAD_PARAM; } +#endif MXC_WDT_RevB_Init((mxc_wdt_revb_regs_t *)wdt, (mxc_wdt_revb_cfg_t *)cfg); diff --git a/Libraries/PeriphDrivers/Source/WDT/wdt_me18.c b/Libraries/PeriphDrivers/Source/WDT/wdt_me18.c index 7f76120e2f..d26b330c2c 100644 --- a/Libraries/PeriphDrivers/Source/WDT/wdt_me18.c +++ b/Libraries/PeriphDrivers/Source/WDT/wdt_me18.c @@ -43,6 +43,7 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt, mxc_wdt_cfg_t *cfg) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (wdt == MXC_WDT0) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_WDT0); } else if (wdt == MXC_WDT1) { @@ -50,6 +51,7 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt, mxc_wdt_cfg_t *cfg) } else { return E_BAD_PARAM; } +#endif MXC_WDT_RevB_Init((mxc_wdt_revb_regs_t *)wdt, (mxc_wdt_revb_cfg_t *)cfg); diff --git a/Libraries/PeriphDrivers/Source/WDT/wdt_me21.c b/Libraries/PeriphDrivers/Source/WDT/wdt_me21.c index 7f76120e2f..d26b330c2c 100644 --- a/Libraries/PeriphDrivers/Source/WDT/wdt_me21.c +++ b/Libraries/PeriphDrivers/Source/WDT/wdt_me21.c @@ -43,6 +43,7 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt, mxc_wdt_cfg_t *cfg) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (wdt == MXC_WDT0) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_WDT0); } else if (wdt == MXC_WDT1) { @@ -50,6 +51,7 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt, mxc_wdt_cfg_t *cfg) } else { return E_BAD_PARAM; } +#endif MXC_WDT_RevB_Init((mxc_wdt_revb_regs_t *)wdt, (mxc_wdt_revb_cfg_t *)cfg); diff --git a/Libraries/PeriphDrivers/Source/WDT/wdt_me55.c b/Libraries/PeriphDrivers/Source/WDT/wdt_me55.c index 2dc0b1e919..4e0d661d56 100644 --- a/Libraries/PeriphDrivers/Source/WDT/wdt_me55.c +++ b/Libraries/PeriphDrivers/Source/WDT/wdt_me55.c @@ -43,6 +43,7 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt) { +#ifndef MSDK_NO_GPIO_CLK_INIT if (wdt == MXC_WDT0) { MXC_SYS_ClockEnable(MXC_SYS_PERIPH_CLOCK_WDT0); } else if (wdt == MXC_WDT1) { @@ -50,6 +51,9 @@ int MXC_WDT_Init(mxc_wdt_regs_t *wdt) } else { return E_BAD_PARAM; } +#else + (void)wdt; +#endif return E_NO_ERROR; }