Обновление платы на V2

This commit is contained in:
cfif 2026-05-18 10:43:58 +03:00
parent f10ee8bcbd
commit 0418968560
1 changed files with 9 additions and 9 deletions

View File

@ -13,22 +13,22 @@ void StandBy_Init(tStandBy *env) {
PORT_InitType tInitStruct = {0}; PORT_InitType tInitStruct = {0};
PORT_InterruptType tIntStruct = {0}; PORT_InterruptType tIntStruct = {0};
// wakeup source: Key1/PortA9; MUX = GPIO input // wakeup source: Key1/PortE16; MUX = GPIO input
tInitStruct.u32PortPins = PORT_PIN_9; tInitStruct.u32PortPins = PORT_PIN_16;
tInitStruct.uPortPinMux.u32PortPinMode = PORT_GPIO_MODE; tInitStruct.uPortPinMux.u32PortPinMode = PORT_GPIO_MODE;
tInitStruct.bPullEn = true; tInitStruct.bPullEn = true;
tInitStruct.ePullSel = PORT_PULL_UP; tInitStruct.ePullSel = PORT_PULL_UP;
PORT_InitPins(PORT_A, &tInitStruct); PORT_InitPins(PORT_E, &tInitStruct);
// enable PortA9 interrupt // enable PortE16 interrupt
tIntStruct.u32PortPins = PORT_PIN_9; tIntStruct.u32PortPins = PORT_PIN_16;
tIntStruct.ePortIsrMode = PORT_IRQ_BOTH_EDGE; tIntStruct.ePortIsrMode = PORT_IRQ_BOTH_EDGE;
tIntStruct.pIsrNotify = Bsp_GpioFInt_CallbackFunction; tIntStruct.pIsrNotify = Bsp_GpioFInt_CallbackFunction;
PORT_InitInterrupt(PORT_A, &tIntStruct); PORT_InitInterrupt(PORT_E, &tIntStruct);
WKU_EnableWakeupSource(WKU_INPUT_GPIOA); WKU_EnableWakeupSource(WKU_INPUT_GPIOE);
NVIC_SetPriority(PORTA_IRQn, 0xFF); NVIC_SetPriority(PORTE_IRQn, 0xFF);
NVIC_EnableIRQ(PORTA_IRQn); NVIC_EnableIRQ(PORTE_IRQn);
} }