100         M2S_GPIO_2_EXTI_IRQN,
   101         M2S_GPIO_3_EXTI_IRQN,
   136   GPIO_InitTypeDef GPIO_InitStructure, EXTI_InitStructure;
   139   assert_param(IS_M2S_GPIO_PIN(xGpio));
   140   assert_param(IS_M2S_GPIO_MODE(xGpioMode));
   145     M2S_GPIO_0_CLOCK_NUCLEO();
   148     M2S_GPIO_1_CLOCK_NUCLEO();
   151     M2S_GPIO_2_CLOCK_NUCLEO();
   154     M2S_GPIO_3_CLOCK_NUCLEO();
   157     M2S_GPIO_SDN_CLOCK_NUCLEO();
   163     GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;
   165     GPIO_InitStructure.Mode = GPIO_MODE_INPUT;
   167   GPIO_InitStructure.Pull = s_vectxM2SGpioPuPd[xGpio];
   168   GPIO_InitStructure.Speed = s_vectxM2SGpioSpeed[xGpio];
   169   GPIO_InitStructure.Pin = s_vectnM2SGpioPin[xGpio];
   173   EXTI_InitStructure.Pull = s_vectxM2SGpioPuPd[xGpio];
   174   EXTI_InitStructure.Mode = s_vectxM2sGpioExtiMode[xGpio];
   175   EXTI_InitStructure.Pin = s_vectnM2SGpioPin[xGpio];
   176   EXTI_InitStructure.Speed = s_vectxM2SGpioSpeed[xGpio];
   203   if (xNewState == ENABLE)  {
   204     HAL_NVIC_EnableIRQ(s_vectcM2SGpioExtiIrqn[xGpio]);
   205   HAL_NVIC_SetPriority(s_vectcM2SGpioExtiIrqn[xGpio], nPreemption, nSubpriority);
   209     HAL_NVIC_DisableIRQ(s_vectcM2SGpioExtiIrqn[xGpio]);
   230     EXTI->RTSR |= (uint16_t)s_vectnM2SGpioPin[xGpio];
   232     EXTI->RTSR &= ~(uint16_t)s_vectnM2SGpioPin[xGpio];
   249   if(EXTI->RTSR & (uint16_t)s_vectnM2SGpioPin[xGpio])
   272     EXTI->FTSR |= (uint16_t)s_vectnM2SGpioPin[xGpio];
   274     EXTI->FTSR &= ~(uint16_t)s_vectnM2SGpioPin[xGpio];
   291   if(EXTI->FTSR & (uint16_t)s_vectnM2SGpioPin[xGpio])
   311   GPIO_PinState ret = HAL_GPIO_ReadPin(
vectpxM2SGpioPort[xGpio], s_vectnM2SGpioPin[xGpio]);
   313   return (FlagStatus)ret;
   331   HAL_GPIO_WritePin(
vectpxM2SGpioPort[xGpio], s_vectnM2SGpioPin[xGpio], (GPIO_PinState)xLevel);
   342   HAL_GPIO_WritePin(M2S_GPIO_SDN_PORT, M2S_GPIO_SDN_PIN, GPIO_PIN_SET);
   354   HAL_GPIO_WritePin(M2S_GPIO_SDN_PORT, M2S_GPIO_SDN_PIN, GPIO_PIN_RESET);
   357   for(
volatile uint32_t i=0;i<0x1E00;i++);
   377   return s_vectnM2SGpioPin[xGpio];
   388   GPIO_InitTypeDef GPIO_InitStructure;
   393   GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP;
   394   GPIO_InitStructure.Pull = GPIO_NOPULL;
   395   GPIO_InitStructure.Speed = GPIO_SPEED_HIGH;
   396   GPIO_InitStructure.Pin = TCXO_EN_PIN;
   397   HAL_GPIO_Init(TCXO_EN_PORT, &GPIO_InitStructure);
   408   HAL_GPIO_WritePin(TCXO_EN_PORT, TCXO_EN_PIN, GPIO_PIN_SET);
   420   HAL_GPIO_WritePin(TCXO_EN_PORT, TCXO_EN_PIN, GPIO_PIN_RESET);
 void SdkEvalEnterShutdown(void)
Puts at logic 1 the SDN pin.
 
M2SGpioPin
MCU GPIO pin enumeration for GPIO.
 
This file contains SDK EVAL configuration and useful defines.
 
void SdkEvalExitShutdown(void)
Put at logic 0 the SDN pin.
 
void SdkEvalGpioSetLevel(M2SGpioPin xGpio, FlagStatus xLevel)
Sets the level of a specified GPIO.
 
M2SGpioMode
MCU GPIO pin working mode for GPIO.
 
#define M2S_GPIO_NUMBER
Number of MCU GPIO pins used for GPIO.
 
FunctionalState SdkEvalM2SGpioGetTriggerFalling(M2SGpioPin xGpio)
To assert if the falling edge IRQ is enabled for that GPIO .
 
void SdkEvalTcxoOff(void)
Put at logic 0 the TCXO pin.
 
void SdkEvalM2SGpioInterruptCmd(M2SGpioPin xGpio, uint8_t nPreemption, uint8_t nSubpriority, FunctionalState xNewState)
Enables or disables the interrupt on GPIO .
 
GPIO_TypeDef * vectpxM2SGpioPort[M2S_GPIO_NUMBER]
M2S GPio Port array.
 
void SdkEvalM2SGpioTriggerRising(M2SGpioPin xGpio, FunctionalState xNewState)
Enables or disables trigger on rising edge for that GPIO .
 
void SdkEvalM2SGpioTriggerFalling(M2SGpioPin xGpio, FunctionalState xNewState)
Enables or disables trigger on falling edge for that GPIO .
 
FunctionalState SdkEvalM2SGpioGetTriggerRising(M2SGpioPin xGpio)
To assert if the rising edge IRQ is enabled for that GPIO .
 
GPIO Configuration used in the Software Development Kit eval board to drive GPIOs.
 
void SdkEvalM2SGpioInit(M2SGpioPin xGpio, M2SGpioMode xGpioMode)
Configures MCU GPIO and EXTI Line for GPIOs.
 
uint16_t SdkEvalGpioGetPin(M2SGpioPin xGpio)
Gets the GPIO_PIN of the M2SGpioPin.
 
void SdkEvalTcxoInit(void)
Initialize the TCXO enable pin.
 
FlagStatus SdkEvalCheckShutdown(void)
check the logic(0 or 1) at the SDN pin.
 
void SdkEvalTcxoOn(void)
Puts at logic 1 the TCXO pin.
 
FlagStatus SdkEvalGpioGetLevel(M2SGpioPin xGpio)
Returns the level of a specified GPIO.