Обновление
This commit is contained in:
commit
f10ee8bcbd
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"dep": [
|
||||
|
||||
],
|
||||
"cmake": {
|
||||
"inc_dirs": [
|
||||
"./"
|
||||
],
|
||||
"srcs": [
|
||||
"./**.c"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
//
|
||||
// Created by cfif on 17.12.2025.
|
||||
//
|
||||
|
||||
#include "standby.h"
|
||||
|
||||
|
||||
static void Bsp_GpioFInt_CallbackFunction(void) {
|
||||
SMC_SetSystemMode(SMC_MODE_RUN);
|
||||
}
|
||||
|
||||
void StandBy_Init(tStandBy *env) {
|
||||
PORT_InitType tInitStruct = {0};
|
||||
PORT_InterruptType tIntStruct = {0};
|
||||
|
||||
// wakeup source: Key1/PortA9; MUX = GPIO input
|
||||
tInitStruct.u32PortPins = PORT_PIN_9;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORT_GPIO_MODE;
|
||||
tInitStruct.bPullEn = true;
|
||||
tInitStruct.ePullSel = PORT_PULL_UP;
|
||||
PORT_InitPins(PORT_A, &tInitStruct);
|
||||
|
||||
// enable PortA9 interrupt
|
||||
tIntStruct.u32PortPins = PORT_PIN_9;
|
||||
tIntStruct.ePortIsrMode = PORT_IRQ_BOTH_EDGE;
|
||||
tIntStruct.pIsrNotify = Bsp_GpioFInt_CallbackFunction;
|
||||
PORT_InitInterrupt(PORT_A, &tIntStruct);
|
||||
|
||||
WKU_EnableWakeupSource(WKU_INPUT_GPIOA);
|
||||
|
||||
NVIC_SetPriority(PORTA_IRQn, 0xFF);
|
||||
NVIC_EnableIRQ(PORTA_IRQn);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
//
|
||||
// Created by cfif on 17.12.2025.
|
||||
//
|
||||
|
||||
#ifndef HVAC_M7_STANDBY_H
|
||||
#define HVAC_M7_STANDBY_H
|
||||
|
||||
#include "fc7xxx_driver_scm.h"
|
||||
#include "fc7xxx_driver_port.h"
|
||||
#include "fc7xxx_driver_wku.h"
|
||||
#include "fc7xxx_driver_smc.h"
|
||||
#include "fc7xxx_driver_gpio.h"
|
||||
#include "fc7xxx_driver_tstmp.h"
|
||||
|
||||
typedef struct {
|
||||
|
||||
|
||||
} tStandBy;
|
||||
|
||||
|
||||
void StandBy_Init(tStandBy *env);
|
||||
|
||||
#endif //HVAC_M7_STANDBY_H
|
||||
Loading…
Reference in New Issue