AvrIO  1.4.5
Bibliothèque C modulaire pour ATMEL AVR
hih6130.h
1 
21 #ifndef _AVRIO_HIH6130_H_
22 #define _AVRIO_HIH6130_H_
23 
24 #include <avrio/twi.h>
25 
41 /* constants ================================================================ */
42 
50 #define HIH6130_ADDR (0x27<<1)
51 
56 typedef enum {
62 
66 typedef struct xHih6130Data {
67  int16_t iHum;
68  int16_t iTemp;
69 } xHih6130Data;
70 
71 /* internal public functions ================================================ */
72 
79 eHih6130Error eHih6130Init (uint8_t ucConfig);
80 
88 
96 
97 
98 #if defined(__DOXYGEN__)
99 /*
100  * __DOXYGEN__ defined
101  * Partie documentation ne devant pas être compilée.
102  * =============================================================================
103  */
108 inline eTwiStatus eHih613LastTwiError (void);
109 
114 #else
115 /*
116  * __DOXYGEN__ not defined
117  * Partie ne devant pas être documentée.
118  * =============================================================================
119  */
120 
121 /* public variables ========================================================= */
122 extern eTwiStatus eHih6130LastTwiErrorValue;
123 
124 /* macros =================================================================== */
125 
126 /* inline public functions ================================================== */
127 // -----------------------------------------------------------------------------
128 __STATIC_ALWAYS_INLINE (eTwiStatus
129 eHih6130LastTwiError (void)) {
130 
131  return eHih6130LastTwiErrorValue;
132 }
133 
134 #endif /* __DOXYGEN__ not defined */
135 /* ========================================================================== */
136 __END_C_DECLS
137 #endif /* _AVRIO_HIH6130_H_ defined */
eHih6130Error
Codes d&#39;erreur renvoyés par les fonctions du module.
Definition: hih6130.h:56
int16_t iHum
Definition: hih6130.h:67
eTwiStatus
Codes d&#39;erreur et d&#39;état.
Definition: twi.h:94
Données de mesure fournies par un capteur HIH6130.
Definition: hih6130.h:66
eHih6130Error eHih6130Start(void)
Démarrer la conversion Le temps de conversion est de 36.65 ms d&#39;après la documentation (vérifié par l...
eTwiStatus eHih613LastTwiError(void)
Lecture de la dernière erreur I2C.
eHih6130Error eHih6130Init(uint8_t ucConfig)
Initialise le circuit HIH6130.
eHih6130Error eHih6130Read(xHih6130Data *pxData)
Lecture des derniers résultats de conversion.
struct xHih6130Data xHih6130Data
Données de mesure fournies par un capteur HIH6130.
int16_t iTemp
Definition: hih6130.h:68