Appiko
SDK_EVAL_Gpio.h
Go to the documentation of this file.
1 
43 /* Define to prevent recursive inclusion -------------------------------------*/
44 #ifndef __SDK_EVAL_GPIO_H
45 #define __SDK_EVAL_GPIO_H
46 
47 
48  /* Includes ------------------------------------------------------------------*/
49 #include "cube_hal.h"
50 
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
56 
77 #define M2S_GPIO_NUMBER 5
78 
79 
83 typedef enum
84 {
85  M2S_GPIO_0 = 0x00,
86  M2S_GPIO_1 = 0x01,
87  M2S_GPIO_2 = 0x02,
88  M2S_GPIO_3 = 0x03,
89  M2S_GPIO_SDN = 0x04
91 }M2SGpioPin;
92 
93 #define IS_M2S_GPIO_PIN(PIN) (((PIN) == M2S_GPIO_0) || \
94  ((PIN) == M2S_GPIO_1) || \
95  ((PIN) == M2S_GPIO_2) || \
96  ((PIN) == M2S_GPIO_3) || \
97  ((PIN) == M2S_GPIO_SDN))
98 
102 typedef enum
103 {
109 }M2SGpioMode;
110 
111 #define IS_M2S_GPIO_MODE(MODE) (((MODE) == M2S_MODE_GPIO_IN) || \
112  ((MODE) == M2S_MODE_EXTI_IN) || \
113  ((MODE) == M2S_MODE_GPIO_OUT))
114 
115 
145 void SdkEvalM2SGpioInit(M2SGpioPin xGpio, M2SGpioMode xGpioMode);
146 void SdkEvalM2SGpioInterruptCmd(M2SGpioPin xGpio, uint8_t nPreemption, uint8_t nSubpriority, FunctionalState xNewState);
147 FlagStatus SdkEvalGpioGetLevel(M2SGpioPin xGpio);
148 void SdkEvalGpioSetLevel(M2SGpioPin xGpio, FlagStatus xLevel);
149 void SdkEvalEnterShutdown(void);
150 void SdkEvalExitShutdown(void);
151 void SdkEvalM2SGpioTriggerRising(M2SGpioPin xGpio, FunctionalState xNewState);
152 FunctionalState SdkEvalM2SGpioGetTriggerRising(M2SGpioPin xGpio);
153 void SdkEvalM2SGpioTriggerFalling(M2SGpioPin xGpio, FunctionalState xNewState);
154 FunctionalState SdkEvalM2SGpioGetTriggerFalling(M2SGpioPin xGpio);
155 uint16_t SdkEvalGpioGetPin(M2SGpioPin xGpio);
156 void SdkEvalTcxoInit(void);
157 void SdkEvalTcxoOn(void);
158 void SdkEvalTcxoOff(void);
159 
175 #ifdef __cplusplus
176 }
177 #endif
178 
179 #endif
180 
181 /******************* (C) COPYRIGHT 2013 STMicroelectronics *****END OF FILE****/
FlagStatus SdkEvalGpioGetLevel(M2SGpioPin xGpio)
Returns the level of a specified GPIO.
void SdkEvalM2SGpioInterruptCmd(M2SGpioPin xGpio, uint8_t nPreemption, uint8_t nSubpriority, FunctionalState xNewState)
Enables or disables the interrupt on GPIO .
M2SGpioPin
MCU GPIO pin enumeration for GPIO.
Definition: SDK_EVAL_Gpio.h:83
FunctionalState SdkEvalM2SGpioGetTriggerFalling(M2SGpioPin xGpio)
To assert if the falling edge IRQ is enabled for that GPIO .
M2SGpioMode
MCU GPIO pin working mode for GPIO.
uint16_t SdkEvalGpioGetPin(M2SGpioPin xGpio)
Gets the GPIO_PIN of the M2SGpioPin.
FunctionalState SdkEvalM2SGpioGetTriggerRising(M2SGpioPin xGpio)
To assert if the rising edge IRQ is enabled for that GPIO .
void SdkEvalGpioSetLevel(M2SGpioPin xGpio, FlagStatus xLevel)
Sets the level of a specified GPIO.
void SdkEvalM2SGpioTriggerFalling(M2SGpioPin xGpio, FunctionalState xNewState)
Enables or disables trigger on falling edge for that GPIO .
void SdkEvalTcxoOff(void)
Put at logic 0 the TCXO pin.
void SdkEvalExitShutdown(void)
Put at logic 0 the SDN pin.
void SdkEvalTcxoInit(void)
Initialize the TCXO enable pin.
void SdkEvalTcxoOn(void)
Puts at logic 1 the TCXO pin.
void SdkEvalM2SGpioInit(M2SGpioPin xGpio, M2SGpioMode xGpioMode)
Configures MCU GPIO and EXTI Line for GPIOs.
void SdkEvalEnterShutdown(void)
Puts at logic 1 the SDN pin.
void SdkEvalM2SGpioTriggerRising(M2SGpioPin xGpio, FunctionalState xNewState)
Enables or disables trigger on rising edge for that GPIO .