RelayBoard.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. LUFA Library
  3. Copyright (C) Dean Camera, 2018.
  4. dean [at] fourwalledcubicle [dot] com
  5. www.lufa-lib.org
  6. */
  7. /*
  8. Copyright 2010 OBinou (obconseil [at] gmail [dot] com)
  9. Copyright 2018 Dean Camera (dean [at] fourwalledcubicle [dot] com)
  10. Permission to use, copy, modify, distribute, and sell this
  11. software and its documentation for any purpose is hereby granted
  12. without fee, provided that the above copyright notice appear in
  13. all copies and that both that the copyright notice and this
  14. permission notice and warranty disclaimer appear in supporting
  15. documentation, and that the name of the author not be used in
  16. advertising or publicity pertaining to distribution of the
  17. software without specific, written prior permission.
  18. The author disclaims all warranties with regard to this
  19. software, including all implied warranties of merchantability
  20. and fitness. In no event shall the author be liable for any
  21. special, indirect or consequential damages or any damages
  22. whatsoever resulting from loss of use, data or profits, whether
  23. in an action of contract, negligence or other tortious action,
  24. arising out of or in connection with the use or performance of
  25. this software.
  26. */
  27. /** \file
  28. *
  29. * Header file for RelayBoard.c.
  30. */
  31. #ifndef _RELAYBOARD_H_
  32. #define _RELAYBOARD_H_
  33. /* Includes: */
  34. #include <avr/io.h>
  35. #include <avr/wdt.h>
  36. #include <avr/power.h>
  37. #include <avr/interrupt.h>
  38. #include "Descriptors.h"
  39. #include <LUFA/Drivers/Board/LEDs.h>
  40. #include <LUFA/Drivers/USB/USB.h>
  41. #include <LUFA/Platform/Platform.h>
  42. /* Macros: */
  43. #define RELAY1 (1 << 7)
  44. #define RELAY2 (1 << 6)
  45. #define RELAY3 (1 << 5)
  46. #define RELAY4 (1 << 4)
  47. #define ALL_RELAYS (RELAY1 | RELAY2 | RELAY3 | RELAY4)
  48. /* Function Prototypes: */
  49. void SetupHardware(void);
  50. void EVENT_USB_Device_ControlRequest(void);
  51. #endif