Blame view

build4/epsilon-master/ion/src/device/wakeup.h 1.77 KB
6663b6c9   adorian   projet complet av...
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
  #ifndef ION_DEVICE_WAKE_UP_H
  #define ION_DEVICE_WAKE_UP_H
  
  #include "regs/regs.h"
  
  namespace Ion {
  namespace WakeUp {
  namespace Device {
  
  /* All wakeup functions can be called together without overwriting the same
   * register. All togethed, they will set SYSCFG and EXTi registers as follow:
   *
   * GPIO Pin Number|EXTI_EMR|EXTI_FTSR|EXTI_RTSR|EXTICR1|EXTICR2|EXTICR3| Wake up
   * ---------------+--------+---------+---------+-------+-------+-------+-------------------------
   *        0       |   1    |    0    |    1    |   A   | ***** | ***** | Rising edge GPIO A pin 0
   *        1       |   1    |    1    |    0    |   C   | ***** | ***** | Falling edge GPIO C pin 1
   *        2       |   0    |    0    |    0    |   A   | ***** | ***** |
   *        3       |   0    |    0    |    0    |   A   | ***** | ***** |
   *        4       |   0    |    0    |    0    | ***** |   A   | ***** |
   *        5       |   0    |    0    |    0    | ***** |   A   | ***** |
   *        6       |   0    |    0    |    0    | ***** |   A   | ***** |
   *        7       |   0    |    0    |    0    | ***** |   A   | ***** |
   *        8       |   0    |    0    |    0    | ***** | ***** |   A   |
   *        9       |   1    |    1    |    1    | ***** | ***** |   A   | Falling/Rising edge GPIO A pin 9
   *       10       |   0    |    0    |    0    | ***** | ***** |   A   |
   *       11       |   0    |    0    |    0    | ***** | ***** |   A   |
   *       12       |   0    |    0    |    0    | ***** | ***** | ***** |
   *       13       |   0    |    0    |    0    | ***** | ***** | ***** |
   *       14       |   0    |    0    |    0    | ***** | ***** | ***** |
   *       15       |   0    |    0    |    0    | ***** | ***** | ***** |
   */
  
  void onChargingEvent();
  void onUSBPlugging();
  void onPowerKeyDown();
  
  }
  }
  }
  
  #endif