36 lines
538 B
C
36 lines
538 B
C
/*
|
|
* Copyright (c) 2021-2022 Amlogic, Inc. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
#include "suspend.h"
|
|
#include "sed.h"
|
|
#include "interrupt.h"
|
|
|
|
static void SED_isr_wakeup(void)
|
|
{
|
|
uint32_t wakeup_buffer = SED_WAKEUP;
|
|
|
|
STR_Wakeup_src_Queue_Send_FromISR(&wakeup_buffer);
|
|
|
|
}
|
|
|
|
#define SED_IRQ 21
|
|
|
|
void vSEDInit(void)
|
|
{
|
|
RegisterIrq(SED_IRQ, 2, SED_isr_wakeup);
|
|
EnableIrq(SED_IRQ);
|
|
}
|
|
|
|
void vSEDDeinit(void)
|
|
{
|
|
UnRegisterIrq(SED_IRQ);
|
|
DisableIrq(SED_IRQ);
|
|
}
|
|
|