/* ################################################################### ** This component module is generated by Processor Expert. Do not modify it. ** Filename : EN2.h ** Project : FRDM-K64F_Generator ** Processor : MK64FN1M0VLL12 ** Component : SDK_BitIO ** Version : Component 01.030, Driver 01.00, CPU db: 3.00.000 ** Compiler : GNU C Compiler ** Date/Time : 2024-07-29, 05:47, # CodeGen: 836 ** Abstract : ** GPIO component usable with NXP SDK ** Settings : ** Component name : EN2 ** SDK : McuLib ** GPIO Name : GPIOA ** PORT Name : PORTA ** Pin Number : 0 ** Pin Symbol : LED_RED ** Do Pin Muxing : no ** Init Direction : Output ** Pull Resistor : no pull resistor ** Init Value : 0 ** Contents : ** GetDir - bool EN2_GetDir(void); ** SetDir - void EN2_SetDir(bool Dir); ** SetInput - void EN2_SetInput(void); ** SetOutput - void EN2_SetOutput(void); ** GetVal - bool EN2_GetVal(void); ** PutVal - void EN2_PutVal(bool Val); ** ClrVal - void EN2_ClrVal(void); ** SetVal - void EN2_SetVal(void); ** NegVal - void EN2_NegVal(void); ** Init - void EN2_Init(void); ** Deinit - void EN2_Deinit(void); ** ** * Copyright (c) 2015-2024, Erich Styger ** * Web: https://mcuoneclipse.com ** * SourceForge: https://sourceforge.net/projects/mcuoneclipse ** * Git: https://github.com/ErichStyger/McuOnEclipse_PEx ** * All rights reserved. ** * ** * Redistribution and use in source and binary forms, with or without modification, ** * are permitted provided that the following conditions are met: ** * ** * - Redistributions of source code must retain the above copyright notice, this list ** * of conditions and the following disclaimer. ** * ** * - Redistributions in binary form must reproduce the above copyright notice, this ** * list of conditions and the following disclaimer in the documentation and/or ** * other materials provided with the distribution. ** * ** * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ** * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ** * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ** * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ** * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ** * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ** * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ** * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** ###################################################################*/ /*! ** @file EN2.h ** @version 01.00 ** @brief ** GPIO component usable with NXP SDK */ /*! ** @addtogroup EN2_module EN2 module documentation ** @{ */ #ifndef __EN2_H #define __EN2_H /* MODULE EN2. */ #include "McuLib.h" /* SDK and API used */ #include "EN2config.h" /* configuration */ #if McuLib_CONFIG_SDK_VERSION_USED == McuLib_CONFIG_SDK_KINETIS_1_3 #include "fsl_gpio_driver.h" /* only GPIOA, GPIOB, GPIOC, GPIOD, GPIOE, GPIOF and GPIOG are currently supported */ #define EN2_GPIO_IDX GPIOA_IDX /* GPIOA */ enum EN2_pinNames{ EN2_CONFIG_PIN_SYMBOL = GPIO_MAKE_PIN(EN2_GPIO_IDX, EN2_CONFIG_PIN_NUMBER), }; extern const gpio_output_pin_user_config_t EN2_OutputConfig[]; extern const gpio_input_pin_user_config_t EN2_InputConfig[]; #endif void EN2_Init(void); /* ** =================================================================== ** Method : Init (component SDK_BitIO) ** ** Description : ** Driver initialization method ** Parameters : None ** Returns : Nothing ** =================================================================== */ void EN2_ClrVal(void); /* ** =================================================================== ** Method : ClrVal (component SDK_BitIO) ** ** Description : ** Clears the pin value (sets it to a low level) ** Parameters : None ** Returns : Nothing ** =================================================================== */ void EN2_SetVal(void); /* ** =================================================================== ** Method : SetVal (component SDK_BitIO) ** ** Description : ** Sets the pin value to a high value. ** Parameters : None ** Returns : Nothing ** =================================================================== */ void EN2_NegVal(void); /* ** =================================================================== ** Method : NegVal (component SDK_BitIO) ** ** Description : ** Toggles/negates the pin value ** Parameters : None ** Returns : Nothing ** =================================================================== */ void EN2_Deinit(void); /* ** =================================================================== ** Method : Deinit (component SDK_BitIO) ** ** Description : ** Driver de-initialization method ** Parameters : None ** Returns : Nothing ** =================================================================== */ bool EN2_GetVal(void); /* ** =================================================================== ** Method : GetVal (component SDK_BitIO) ** ** Description : ** Returns the pin value ** Parameters : None ** Returns : ** --- - Returns the value of the pin: ** FALSE/logical level '0' or TRUE/logical ** level '1' ** =================================================================== */ bool EN2_GetDir(void); /* ** =================================================================== ** Method : GetDir (component SDK_BitIO) ** ** Description : ** Return the direction of the pin (input/output) ** Parameters : None ** Returns : ** --- - FALSE if port is input, TRUE if port is ** output ** =================================================================== */ void EN2_SetDir(bool Dir); /* ** =================================================================== ** Method : SetDir (component SDK_BitIO) ** ** Description : ** Sets the direction of the pin (input or output) ** Parameters : ** NAME - DESCRIPTION ** Dir - FALSE: input, TRUE: output ** Returns : Nothing ** =================================================================== */ void EN2_SetInput(void); /* ** =================================================================== ** Method : SetInput (component SDK_BitIO) ** ** Description : ** Sets the pin as input ** Parameters : None ** Returns : Nothing ** =================================================================== */ void EN2_SetOutput(void); /* ** =================================================================== ** Method : SetOutput (component SDK_BitIO) ** ** Description : ** Sets the pin as output ** Parameters : None ** Returns : Nothing ** =================================================================== */ void EN2_PutVal(bool Val); /* ** =================================================================== ** Method : PutVal (component SDK_BitIO) ** ** Description : ** Sets the pin value ** Parameters : ** NAME - DESCRIPTION ** Val - Value to set. FALSE/logical '0' or ** TRUE/logical '1' ** Returns : Nothing ** =================================================================== */ /* END EN2. */ #endif /* ifndef __EN2_H */ /*! ** @} */