AvrIO  1.4.5
Bibliothèque C modulaire pour ATMEL AVR
iface.h
1 
21 #ifndef _AVRIO_WUSB_IFACE_H_
22 #define _AVRIO_WUSB_IFACE_H_
23 
24 #include <avrio/defs.h>
25 
26 __BEGIN_C_DECLS
27  /* ======================================================================== */
28 
29 /* internal public functions ================================================ */
30 void vWIfcInit (void);
31 void vWIfcReset (void);
32 uint8_t ucWIfcRead (uint8_t ucAddress);
33 void vWIfcWrite (uint8_t ucAddress, uint8_t ucData);
34 void vWIfcBurstRead (uint8_t ucAddress, uint8_t * pucData, uint8_t ucLength);
35 void vWIfcBurstWrite (uint8_t ucAddress, const uint8_t * pucData, uint8_t ucLength);
36 void vWIfcBurstWrite_P ( uint8_t ucAddress, const uint8_t * pucData, uint8_t ucLength);
37 
38 # if ! defined(__DOXYGEN__)
39 
40 #include "avrio-config.h"
41 
42 #ifdef AVRIO_WUSB_ENABLE
43 /* ========================================================================== */
44 # include <avrio/delay.h>
45 # include "avrio-board-wusb.h"
46 # include "wusb-config.h"
47 
48  // ---------------------------------------------------------------------------
49  __STATIC_ALWAYS_INLINE(void
50  vWIfcSleep (void)) {
51 
52  vWusbIoSet (WUSBIO_PD);
53  }
54 
55  // ---------------------------------------------------------------------------
56  __STATIC_ALWAYS_INLINE(void
57  vWIfcWakeup (void)) {
58 
59  vWusbIoClear (WUSBIO_PD);
60  delay_ms (5);
61  }
62 
63 #endif /* AVRIO_WUSB_ENABLE defined */
64 
65 # endif /* __DOXYGEN__ not defined */
66  /* ======================================================================== */
67 __END_C_DECLS
68 #endif /* _AVRIO_WUSB_IFACE_H_ defined */
#define delay_ms(__ms)
Temporisation en millisecondes.
Definition: delay.h:65