AvrIO  1.4.5
Bibliothèque C modulaire pour ATMEL AVR
bisrelay.h
1 
21 #ifndef _AVRIO_BISRELAY_H_
22 #define _AVRIO_BISRELAY_H_
23 #include <avrio/defs.h>
24 
25 __BEGIN_C_DECLS
26 /* ========================================================================== */
60 /* constants ================================================================ */
61 #define BISRELAY_ALL 0xFF
62 
63 /* structures =============================================================== */
67 typedef struct xBisRelay {
68  uint8_t ucOn;
69  uint8_t ucOff;
70  volatile uint8_t *pPort;
71 } xBisRelay;
72 
73 /* internal public functions ================================================ */
79 void vBisRelayInit (void);
80 
87 void vBisRelaySet (uint8_t ucMask);
88 
95 void vBisRelayClear (uint8_t ucMask);
96 
103 void vBisRelayToggle (uint8_t ucMask);
104 
111 void vBisRelaySetAll (uint8_t ucMask);
112 
113 // -----------------------------------------------------------------------------
114 # if defined(__DOXYGEN__)
115 /*
116  * __DOXYGEN__ defined
117  * Partie documentation ne devant pas être compilée.
118  * =============================================================================
119  */
120 
127 uint8_t ucBisRelayGetAll (void);
128 
134 #else
135 /*
136  * __DOXYGEN__ not defined
137  * Partie ne devant pas être documentée.
138  * =============================================================================
139  */
140 #include "avrio-board-bisrelay.h"
141 extern uint8_t ucBisRelayCurrent;
142 
143 INLINE uint8_t
144 ucBisRelayGetAll (void) {
145 
146  return ucBisRelayCurrent;
147 }
148 # endif /* __DOXYGEN__ not defined */
149 
150 /* ========================================================================== */
151 __END_C_DECLS
152 #endif /* _AVRIO_BISRELAY_H_ not defined */
void vBisRelayClear(uint8_t ucMask)
Arrêt d&#39;un relais d&#39;un ou plusieurs relais.
uint8_t ucBisRelayGetAll(void)
Lecture de l&#39;état des relais.
volatile uint8_t * pPort
Port des broches du relais.
Definition: bisrelay.h:70
void vBisRelaySet(uint8_t ucMask)
Mise en marche d&#39;un ou plusieurs relais.
struct xBisRelay xBisRelay
void vBisRelayToggle(uint8_t ucMask)
Basculement d&#39;un ou plusieurs relais.
void vBisRelayInit(void)
Initialise le module.
uint8_t ucOn
Masque de la broche Set.
Definition: bisrelay.h:68
uint8_t ucOff
Masque de la broche Reset.
Definition: bisrelay.h:69
void vBisRelaySetAll(uint8_t ucMask)
Modification de l&#39;état des relais.