Blame view

RIOT/drivers/include/ltc4150.h 1.83 KB
fb11e647   vrobic   reseau statique a...
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
  /*
   * Copyright 2014 Freie Universitรคt Berlin
   *
   * 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.
   */
  
  /**
   * @defgroup    drivers_ltc4150 LTC4150 Coulomb Counter
   * @ingroup     drivers_sensors
   * @brief       Device driver for LTC4150 coulomb counters
   *
   * @deprecated  This driver should be ported to the peripheral driver interface
   *              (@ref drivers_periph)
   *
   * @{
   *
   * @file
   * @brief       Driver interface for the LTC4150 driver
   *
   * @author      Heiko Will <heiko.will@fu-berlin.de>
   */
  
  
  #ifndef LTC4150_H
  #define LTC4150_H
  
  #include "ltc4150_arch.h"
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  /**
   * @brief   Initialize the counter
   */
  void ltc4150_init(void);
  
  /**
   * @brief   Start a measurement
   */
  void ltc4150_start(void);
  
  /**
   * @brief   End the ongoing measurement
   */
  void ltc4150_stop(void);
  
  /**
   * @brief   Get the current electrical current
   *
   * @return  electrical current in mA
   */
  double ltc4150_get_current_mA(void);
  
  /**
   * @brief   Get the total power used since @p ltc4150_start was called
   *
   * @return  power used in mAh
   */
  double ltc4150_get_total_mAh(void);
  
  /**
   * @brief   Get the total energy used since @p ltc4150_start was called
   *
   * @return  energy used in Joule
   */
  double ltc4150_get_total_Joule(void);
  
  /**
   * @brief   Get the average electrical current sine @p ltc4150_start was called
   *
   * @return  average current in mA
   */
  double ltc4150_get_avg_mA(void);
  
  /**
   * @brief   Get the time the current measurement is going on
   *
   * @return  time
   */
  int ltc4150_get_interval(void);
  
  /**
   * @brief   Get the number of samples taken
   *
   * @return  number of samples in the current interval
   */
  long ltc4150_get_intcount(void);
  
  #ifdef __cplusplus
  }
  #endif
  
  #endif /* LTC4150_H */
  /** @} */