HT32SX Monarch Scan
Monarch Scan application for HT32SX
gpio.h File Reference

: This file contains all the functions prototypes for the gpio
More...

#include "main.h"
#include "usart.h"
#include "st_rf_api.h"
#include "st_mcu_api.h"

Go to the source code of this file.

Functions

void MX_GPIO_Init (void)
 
void S2LPShutdownInit (void)
 Init shutdown pin on the uC and set it to 1 (Shutdown active). More...
 
void S2LPShutdownEnter (void)
 Puts at logic 1 the SDN pin. More...
 
void S2LPShutdownExit (void)
 Put at logic 0 the SDN pin. More...
 
uint8_t S2LPShutdownCheck (void)
 check the logic (0 or 1) at the SDN pin. More...
 
void S2LPIRQInit (void)
 Configures MCU GPIO and EXTI Line for GPIOs. More...
 
void S2LPIRQEnable (uint8_t state, uint8_t edge_direction)
 Enables or disables the interrupt on GPIO . More...
 
uint8_t getLowPowerFlag (void)
 Get low power flag to check the S2LP state. More...
 
void setS2lpIrqRaisedFlag (uint8_t s2lpIrqRaised)
 Get low power flag to check the S2LP state. More...
 
uint8_t getS2lpIrqRaisedFlag (void)
 Get S2LP IRQ raised flag. More...
 

Detailed Description

: This file contains all the functions prototypes for the gpio

Attention

© Copyright (c) 2019 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Function Documentation

◆ getLowPowerFlag()

uint8_t getLowPowerFlag ( void  )

Get low power flag to check the S2LP state.


Parameters
[in]none
[out]none
Return values
low_power1 if it's low power, else 0

◆ getS2lpIrqRaisedFlag()

uint8_t getS2lpIrqRaisedFlag ( void  )

Get S2LP IRQ raised flag.


Parameters
[in]none
[out]none
Return values
s2lp_irq_raised1 if it's raised, else 0

◆ MX_GPIO_Init()

void MX_GPIO_Init ( void  )

Configure pins as Analog Input Output EVENT_OUT EXTI

◆ S2LPIRQEnable()

void S2LPIRQEnable ( uint8_t  state,
uint8_t  edge_direction 
)

Enables or disables the interrupt on GPIO .

Parameters
stateSpecifies the State. This parameter can be one of following parameters:
  • 0: disable
  • >0: enable
edge_directionSpecifies the sensitive edge. This parameter can be one of following parameters:
  • 0: falling edge
  • 1: rising edge
Return values
None.

◆ S2LPIRQInit()

void S2LPIRQInit ( void  )

Configures MCU GPIO and EXTI Line for GPIOs.

Parameters
None.
Return values
None.

◆ S2LPShutdownCheck()

uint8_t S2LPShutdownCheck ( void  )

check the logic (0 or 1) at the SDN pin.

Parameters
None.
Return values
FlagStatus.

◆ S2LPShutdownEnter()

void S2LPShutdownEnter ( void  )

Puts at logic 1 the SDN pin.

Parameters
None.
Return values
None.

◆ S2LPShutdownExit()

void S2LPShutdownExit ( void  )

Put at logic 0 the SDN pin.

Parameters
None.
Return values
None.

◆ S2LPShutdownInit()

void S2LPShutdownInit ( void  )

Init shutdown pin on the uC and set it to 1 (Shutdown active).

Parameters
None.
Return values
None.

◆ setS2lpIrqRaisedFlag()

void setS2lpIrqRaisedFlag ( uint8_t  s2lpIrqRaised)

Get low power flag to check the S2LP state.


Parameters
[in]s2lpIrqRaised1 if it's raised, else 0
[out]none
Return values
none