Skip to content

Commit 53cfeb0

Browse files
author
Gang He
committed
module: hal_sifli: Add IPC zephyr porting header file.
Add SF32LB IPC zephyr porting header file. Signed-off-by: Gang He <[email protected]>
1 parent fcca571 commit 53cfeb0

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

modules/hal_sifli/ipc_os_port.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2019-2022 SiFli Technologies(Nanjing) Co., Ltd
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#ifndef IPC_OS_PORT_H
8+
#define IPC_OS_PORT_H
9+
#include <stdint.h>
10+
11+
#undef IS_ALIGNED
12+
#include <zephyr/kernel.h>
13+
14+
#ifdef __cplusplus
15+
extern "C" {
16+
#endif
17+
18+
#define os_interrupt_disable() irq_lock()
19+
#define os_interrupt_enable(mask) irq_unlock(mask)
20+
#define os_interrupt_enter()
21+
#define os_interrupt_exit()
22+
23+
#define os_interrupt_start(irq_number, priority, sub_priority) irq_enable(irq_number)
24+
#define os_interrupt_stop(irq_number) irq_disable(irq_number)
25+
26+
#ifdef __cplusplus
27+
}
28+
#endif
29+
30+
#endif

0 commit comments

Comments
 (0)