Appiko
|
GPIO Configuration used in the Software Development Kit eval board to drive GPIOs. More...
#include "cube_hal.h"
Go to the source code of this file.
Macros | |
#define | M2S_GPIO_NUMBER 5 |
Number of MCU GPIO pins used for GPIO. | |
Enumerations | |
enum | M2SGpioPin { M2S_GPIO_0 = 0x00, M2S_GPIO_1 = 0x01, M2S_GPIO_2 = 0x02, M2S_GPIO_3 = 0x03, M2S_GPIO_SDN = 0x04 } |
MCU GPIO pin enumeration for GPIO. More... | |
enum | M2SGpioMode { M2S_MODE_GPIO_IN = 0x00, M2S_MODE_EXTI_IN, M2S_MODE_GPIO_OUT } |
MCU GPIO pin working mode for GPIO. More... | |
Functions | |
void | SdkEvalM2SGpioInit (M2SGpioPin xGpio, M2SGpioMode xGpioMode) |
Configures MCU GPIO and EXTI Line for GPIOs. More... | |
void | SdkEvalM2SGpioInterruptCmd (M2SGpioPin xGpio, uint8_t nPreemption, uint8_t nSubpriority, FunctionalState xNewState) |
Enables or disables the interrupt on GPIO . More... | |
FlagStatus | SdkEvalGpioGetLevel (M2SGpioPin xGpio) |
Returns the level of a specified GPIO. More... | |
void | SdkEvalGpioSetLevel (M2SGpioPin xGpio, FlagStatus xLevel) |
Sets the level of a specified GPIO. More... | |
void | SdkEvalEnterShutdown (void) |
Puts at logic 1 the SDN pin. More... | |
void | SdkEvalExitShutdown (void) |
Put at logic 0 the SDN pin. More... | |
void | SdkEvalM2SGpioTriggerRising (M2SGpioPin xGpio, FunctionalState xNewState) |
Enables or disables trigger on rising edge for that GPIO . More... | |
FunctionalState | SdkEvalM2SGpioGetTriggerRising (M2SGpioPin xGpio) |
To assert if the rising edge IRQ is enabled for that GPIO . More... | |
void | SdkEvalM2SGpioTriggerFalling (M2SGpioPin xGpio, FunctionalState xNewState) |
Enables or disables trigger on falling edge for that GPIO . More... | |
FunctionalState | SdkEvalM2SGpioGetTriggerFalling (M2SGpioPin xGpio) |
To assert if the falling edge IRQ is enabled for that GPIO . More... | |
uint16_t | SdkEvalGpioGetPin (M2SGpioPin xGpio) |
Gets the GPIO_PIN of the M2SGpioPin. More... | |
void | SdkEvalTcxoInit (void) |
Initialize the TCXO enable pin. More... | |
void | SdkEvalTcxoOn (void) |
Puts at logic 1 the TCXO pin. More... | |
void | SdkEvalTcxoOff (void) |
Put at logic 0 the TCXO pin. More... | |
This module exports API to manage the GPIO from the micro side. The following example shows how to configure the shutdown pin and the GPIO 3 as an EXTI input.
Example:
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
THIS SOURCE CODE IS PROTECTED BY A LICENSE. FOR MORE INFORMATION PLEASE CAREFULLY READ THE LICENSE AGREEMENT FILE LOCATED IN THE ROOT DIRECTORY OF THIS FIRMWARE PACKAGE.
Definition in file SDK_EVAL_Gpio.h.