AvrIO  1.4.5
Bibliothèque C modulaire pour ATMEL AVR
ow.h
1 
18 #include <avrio/defs.h>
19 __BEGIN_C_DECLS
20 /* ========================================================================== */
21 
60 /* structures =============================================================== */
64 typedef struct {
65  uint8_t id[8];
66 } xOwDevice;
67 
68 /* internal public functions ================================================ */
72 void vOwInit(void);
73 
81 int8_t iOwSearchDevices (xOwDevice * devices, uint8_t len);
82 
88 void vOwMatch (const xOwDevice * device);
89 
96 void vOwSkip (void);
97 
106 void vOwReadRomId (xOwDevice * device);
107 
116 void vOwWrite (uint8_t data);
117 
125 uint8_t ucOwRead (void);
126 
131 bool bOwReset(void);
132 
141 int8_t iOwCheckCRC8(uint8_t * buffer, uint8_t len);
142 
154 uint8_t ucOwComputeCRC8(uint8_t data, uint8_t seed);
155 
156 // -----------------------------------------------------------------------------
157 # if defined(__DOXYGEN__)
158 /*
159  * __DOXYGEN__ defined
160  * Partie documentation ne devant pas être compilée.
161  * =============================================================================
162  */
170 static inline bool bOwIsPartOfFamily (const xOwDevice * d, uint8_t family);
175 # else
176 /*
177  * __DOXYGEN__ not defined
178  * Partie ne devant pas être documentée.
179  * =============================================================================
180  */
181 INLINE bool
182 bOwIsPartOfFamily (const xOwDevice * d, uint8_t family) {
183  return d->id[0] == family;
184 }
185 # endif /* __DOXYGEN__ not defined */
186 
187 /* ========================================================================== */
188 __END_C_DECLS
int8_t iOwCheckCRC8(uint8_t *buffer, uint8_t len)
Calcul et vérification du CRC8 d&#39;une suite d&#39;octets.
void vOwReadRomId(xOwDevice *device)
Lecture de l&#39;identifiant d&#39;un circuit unique.
int8_t iOwSearchDevices(xOwDevice *devices, uint8_t len)
Recherche des circuits sur le bus.
uint8_t ucOwRead(void)
Lecture d&#39;un octet sur le bus.
bool bOwReset(void)
Génère un reset sur le bus et vérifie la présence de circuits.
uint8_t ucOwComputeCRC8(uint8_t data, uint8_t seed)
Calcul du CRC8.
static bool bOwIsPartOfFamily(const xOwDevice *d, uint8_t family)
Teste si un circuit appartient à une famille.
Circuit sur le bus 1wire.
Definition: ow.h:64
void vOwInit(void)
Initialisation du module 1wire.
void vOwSkip(void)
Accès sans identification.
void vOwMatch(const xOwDevice *device)
Sélection d&#39;un circuit sur le bus.
void vOwWrite(uint8_t data)
Ecriture d&#39;un octet sur le bus.
uint8_t id[8]
Definition: ow.h:65