Blame view

RIOT/cpu/mips32r2_common/periph/pm.c 728 Bytes
a752c7ab   elopes   add first test an...
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
  /*
   * Copyright 2016, Imagination Technologies Limited and/or its
   *                 affiliated group companies.
   * This file is subject to the terms and conditions of the GNU Lesser
   * General Public License v2.1. See the file LICENSE in the top level
   * directory for more details.
   */
  
  /**
   * @ingroup     cpu_mips32r2_common
   * @ingroup     drivers_periph_pm
   * @{
   *
   * @file
   * @brief        common periph/pm functions
   *
   * @author       Neil Jones <neil.jones@imgtec.com>
   *
   * @}
   */
  
  #include <mips/m32c0.h>
  #include "periph/pm.h"
  
  void pm_set_lowest(void)
  {
      /* Dont wait if interrupts are not enabled - we would never return!*/
      if (mips32_get_c0(C0_STATUS) & SR_IE) {
          __asm volatile ("wait");
      }
  }