![]() |
HT32SX Monarch Scan
Monarch Scan application for HT32SX
|
: This file provides code for the configuration of all used GPIO pins. More...
#include "gpio.h"Functions | |
| void | MX_GPIO_Init (void) |
| void | S2LPShutdownEnter (void) |
| Puts at logic 1 the SDN pin. More... | |
| void | S2LPShutdownInit (void) |
| Init shutdown pin on the uC and set it to 1 (Shutdown active). 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 | ST_MCU_API_Shutdown (sfx_u8 value) |
| Set on or off the S2-LP by GPIO. 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... | |
| void | ST_MCU_API_GpioIRQ (sfx_u8 pin, sfx_u8 new_state, sfx_u8 trigger) |
| Enables or Disables the external interrupt on the microcontroller side. The interrupt must be set on the rising or falling edge of the input signal according to the trigger_flag. The pin number passed represents the GPIO number of the S2-LP. More... | |
| void | ST_MCU_API_LowPower (sfx_u8 low_power_flag) |
| This function instructs the mcu_api to send the microcontroller in sleep or not during the protocol operations. It is mainly used for debugging purposes. More... | |
| uint8_t | getLowPowerFlag (void) |
| Get low power flag to check the S2LP state. More... | |
| void | HAL_GPIO_EXTI_Callback (uint16_t GPIO_Pin) |
| 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... | |
Variables | |
| GPIO_PinState | csd_pin_inst |
| GPIO_PinState | cps_pin_inst |
| GPIO_PinState | ctx_pin_inst |
: This file provides code for the configuration of all used GPIO pins.
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
| uint8_t getLowPowerFlag | ( | void | ) |
Get low power flag to check the S2LP state.
| [in] | none | |
| [out] | none |
| low_power | 1 if it's low power, else 0 |
| uint8_t getS2lpIrqRaisedFlag | ( | void | ) |
Get S2LP IRQ raised flag.
| [in] | none | |
| [out] | none |
| s2lp_irq_raised | 1 if it's raised, else 0 |
| void MX_GPIO_Init | ( | void | ) |
Configure pins as Analog Input Output EVENT_OUT EXTI
| void S2LPIRQEnable | ( | uint8_t | state, |
| uint8_t | edge_direction | ||
| ) |
Enables or disables the interrupt on GPIO .
| state | Specifies the State. This parameter can be one of following parameters:
|
| edge_direction | Specifies the sensitive edge. This parameter can be one of following parameters:
|
| None. |
| void S2LPIRQInit | ( | void | ) |
Configures MCU GPIO and EXTI Line for GPIOs.
| None. |
| None. |
| uint8_t S2LPShutdownCheck | ( | void | ) |
check the logic (0 or 1) at the SDN pin.
| None. |
| FlagStatus. |
| void S2LPShutdownEnter | ( | void | ) |
Puts at logic 1 the SDN pin.
| None. |
| None. |
| void S2LPShutdownExit | ( | void | ) |
Put at logic 0 the SDN pin.
| None. |
| None. |
| void S2LPShutdownInit | ( | void | ) |
Init shutdown pin on the uC and set it to 1 (Shutdown active).
| None. |
| None. |
| void setS2lpIrqRaisedFlag | ( | uint8_t | s2lpIrqRaised | ) |
Get low power flag to check the S2LP state.
| [in] | s2lpIrqRaised | 1 if it's raised, else 0 |
| [out] | none |
| none |
| void ST_MCU_API_GpioIRQ | ( | sfx_u8 | pin, |
| sfx_u8 | new_state, | ||
| sfx_u8 | trigger | ||
| ) |
Enables or Disables the external interrupt on the microcontroller side. The interrupt must be set on the rising or falling edge of the input signal according to the trigger_flag. The pin number passed represents the GPIO number of the S2-LP.
| [in] | uint8_t | pin: the GPIO pin of the S2-LP (integer from 0 to 3). |
| [in] | uint8_t | new_state: enable or disable the EXTI (can be 0 or 1). |
| [in] | uint8_t | trigger: trigger_flag: 1: rising edge 0: falling edge |
| None |
| void ST_MCU_API_LowPower | ( | sfx_u8 | low_power_flag | ) |
This function instructs the mcu_api to send the microcontroller in sleep or not during the protocol operations. It is mainly used for debugging purposes.
| [in] | uint8_t | low_power_flag : enable the low power (1, default setting) or not (0). |
| None. |
| void ST_MCU_API_Shutdown | ( | sfx_u8 | value | ) |
Set on or off the S2-LP by GPIO.
| [in] | sfx_u8 | value: if 1, the device should enter shutdown (OFF). if 0, the device should exit from shutdown (ON). |
| None |