aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32-wpan/src/wba/ll_sys/ll_sys_cs.rs
blob: 30103ba27c2f33adc6b9bc85472c184955b0ddcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
use crate::bindings::link_layer::{
    LINKLAYER_PLAT_DisableIRQ, LINKLAYER_PLAT_DisableSpecificIRQ, LINKLAYER_PLAT_EnableIRQ,
    LINKLAYER_PLAT_EnableSpecificIRQ, LINKLAYER_PLAT_PhyStartClbr, LINKLAYER_PLAT_PhyStopClbr,
};

// /**
//   ******************************************************************************
//   * @file    ll_sys_cs.c
//   * @author  MCD Application Team
//   * @brief   Link Layer IP system interface critical sections management
//   ******************************************************************************
//   * @attention
//   *
//   * Copyright (c) 2022 STMicroelectronics.
//   * All rights reserved.
//   *
//   * This software is licensed under terms that can be found in the LICENSE file
//   * in the root directory of this software component.
//   * If no LICENSE file comes with this software, it is provided AS-IS.
//   *
//   ******************************************************************************
//   */
//
// #include "linklayer_plat.h"
// #include "ll_sys.h"
// #include <stdint.h>
//
/**
 * @brief  Enable interrupts
 * @param  None
 * @retval None
 */
#[unsafe(no_mangle)]
unsafe extern "C" fn ll_sys_enable_irq() {
    LINKLAYER_PLAT_EnableIRQ();
}
//
// /**
//   * @brief  Disable interrupts
//   * @param  None
//   * @retval None
//   */
#[unsafe(no_mangle)]
unsafe extern "C" fn ll_sys_disable_irq() {
    LINKLAYER_PLAT_DisableIRQ();
}
//
// /**
//   * @brief  Set the Current Interrupt Priority Mask.
//   *         All interrupts with low priority level will be masked.
//   * @param  None
//   * @retval None
//   */
#[unsafe(no_mangle)]
unsafe extern "C" fn ll_sys_enable_specific_irq(isr_type: u8) {
    LINKLAYER_PLAT_EnableSpecificIRQ(isr_type);
}
//
// /**
//   * @brief  Restore the previous interrupt priority level
//   * @param  None
//   * @retval None
//   */
#[unsafe(no_mangle)]
unsafe extern "C" fn ll_sys_disable_specific_irq(isr_type: u8) {
    LINKLAYER_PLAT_DisableSpecificIRQ(isr_type);
}
//
#[unsafe(no_mangle)]
unsafe extern "C" fn ll_sys_phy_start_clbr() {
    LINKLAYER_PLAT_PhyStartClbr();
}
//
#[unsafe(no_mangle)]
unsafe extern "C" fn ll_sys_phy_stop_clbr() {
    LINKLAYER_PLAT_PhyStopClbr();
}