Fixed missing semicolon in the ATAVRUSBRF01 LED board driver code, changed LED board...
[pub/USBasp.git] / LUFA / DriverStubs / HWB.h
1 /*
2 LUFA Library
3 Copyright (C) Dean Camera, 2009.
4
5 dean [at] fourwalledcubicle [dot] com
6 www.fourwalledcubicle.com
7 */
8
9 /*
10 Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
11
12 Permission to use, copy, modify, and distribute this software
13 and its documentation for any purpose and without fee is hereby
14 granted, provided that the above copyright notice appear in all
15 copies and that both that the copyright notice and this
16 permission notice and warranty disclaimer appear in supporting
17 documentation, and that the name of the author not be used in
18 advertising or publicity pertaining to distribution of the
19 software without specific, written prior permission.
20
21 The author disclaim all warranties with regard to this
22 software, including all implied warranties of merchantability
23 and fitness. In no event shall the author be liable for any
24 special, indirect or consequential damages or any damages
25 whatsoever resulting from loss of use, data or profits, whether
26 in an action of contract, negligence or other tortious action,
27 arising out of or in connection with the use or performance of
28 this software.
29 */
30
31 /*
32 This is a stub driver header file, for implementing custom board
33 layout hardware with compatible LUFA board specific drivers. If
34 the library is configured to use the BOARD_USER board mode, this
35 driver file should be completed and copied into the "/Board/" folder
36 inside the application's folder.
37
38 This stub is for the board-specific component of the LUFA HWB (Hardware
39 Button, a physical button on most Atmel USB boards) driver. This could
40 alternately be driven from any button connected to the USB AVR.
41 */
42
43 #ifndef __HWB_USER_H__
44 #define __HWB_USER_H__
45
46 /* Includes: */
47 #include <avr/io.h>
48 #include <stdbool.h>
49
50 #include "../../../Common/Common.h"
51
52 // TODO: Add any required includes here
53
54 /* Enable C linkage for C++ Compilers: */
55 #if defined(__cplusplus)
56 extern "C" {
57 #endif
58
59 /* Preprocessor Checks: */
60 #if !defined(INCLUDE_FROM_HWB_H)
61 #error Do not include this file directly. Include LUFA/Drivers/Board/HWB.h instead.
62 #endif
63
64 /* Public Interface - May be used in end-application: */
65 /* Inline Functions: */
66 #if !defined(__DOXYGEN__)
67 static inline void HWB_Init(void)
68 {
69 // TODO: Initialize the appropriate port pin as an input here, with pull-up
70 }
71
72 static inline bool HWB_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
73 static inline bool HWB_GetStatus(void)
74 {
75 // TODO: Return current button status here, debounced if required
76 }
77 #endif
78
79 /* Disable C linkage for C++ Compilers: */
80 #if defined(__cplusplus)
81 }
82 #endif
83
84 #endif