Обновление платы на V2
This commit is contained in:
parent
f10ee8bcbd
commit
0418968560
18
standby.c
18
standby.c
|
|
@ -13,22 +13,22 @@ 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;
|
||||
// wakeup source: Key1/PortE16; MUX = GPIO input
|
||||
tInitStruct.u32PortPins = PORT_PIN_16;
|
||||
tInitStruct.uPortPinMux.u32PortPinMode = PORT_GPIO_MODE;
|
||||
tInitStruct.bPullEn = true;
|
||||
tInitStruct.ePullSel = PORT_PULL_UP;
|
||||
PORT_InitPins(PORT_A, &tInitStruct);
|
||||
PORT_InitPins(PORT_E, &tInitStruct);
|
||||
|
||||
// enable PortA9 interrupt
|
||||
tIntStruct.u32PortPins = PORT_PIN_9;
|
||||
// enable PortE16 interrupt
|
||||
tIntStruct.u32PortPins = PORT_PIN_16;
|
||||
tIntStruct.ePortIsrMode = PORT_IRQ_BOTH_EDGE;
|
||||
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_EnableIRQ(PORTA_IRQn);
|
||||
NVIC_SetPriority(PORTE_IRQn, 0xFF);
|
||||
NVIC_EnableIRQ(PORTE_IRQn);
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue