diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-05-06 07:50:34 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-05-06 07:50:34 +0000 |
commit | 63a8f66d92b5d7018a4d962f4f7b23774a621771 (patch) | |
tree | 49359656bc06962f6508e5896551343842461e36 /LUFA/DriverStubs | |
parent | f11f69fd2989899b3088ea7d11b981f2d68c05e0 (diff) | |
download | lufa-63a8f66d92b5d7018a4d962f4f7b23774a621771.tar.gz lufa-63a8f66d92b5d7018a4d962f4f7b23774a621771.tar.bz2 lufa-63a8f66d92b5d7018a4d962f4f7b23774a621771.zip |
Changed HWB board driver to Buttons driver, to allow for the support of future boards with more than one mounted GPIO button.
Diffstat (limited to 'LUFA/DriverStubs')
-rw-r--r-- | LUFA/DriverStubs/Buttons.h (renamed from LUFA/DriverStubs/HWB.h) | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/LUFA/DriverStubs/HWB.h b/LUFA/DriverStubs/Buttons.h index 4b7f20542..0d02e5c71 100644 --- a/LUFA/DriverStubs/HWB.h +++ b/LUFA/DriverStubs/Buttons.h @@ -35,13 +35,12 @@ driver file should be completed and copied into the "/Board/" folder
inside the application's folder.
- This stub is for the board-specific component of the LUFA HWB (Hardware
- Button, a physical button on most Atmel USB boards) driver. This could
- alternately be driven from any button connected to the USB AVR.
+ This stub is for the board-specific component of the LUFA Buttons driver,
+ for the control of physical board-mounted GPIO pushbuttons.
*/
-#ifndef __HWB_USER_H__
-#define __HWB_USER_H__
+#ifndef __BUTTONS_USER_H__
+#define __BUTTONS_USER_H__
/* Includes: */
#include <avr/io.h>
@@ -57,20 +56,24 @@ #endif
/* Preprocessor Checks: */
- #if !defined(INCLUDE_FROM_HWB_H)
- #error Do not include this file directly. Include LUFA/Drivers/Board/HWB.h instead.
+ #if !defined(INCLUDE_FROM_BUTTONS_H)
+ #error Do not include this file directly. Include LUFA/Drivers/Board/Buttons.h instead.
#endif
/* Public Interface - May be used in end-application: */
+ /* Macros: */
+ /** Button mask for the first button on the board. */
+ #define BUTTONS_BUTTON1 // TODO: Add mask for first board buton here
+
/* Inline Functions: */
#if !defined(__DOXYGEN__)
- static inline void HWB_Init(void)
+ static inline void Buttons_Init(void)
{
- // TODO: Initialize the appropriate port pin as an input here, with pull-up
+ // TODO: Initialize the appropriate port pins as an inputs here, with pull-ups
}
- static inline bool HWB_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
- static inline bool HWB_GetStatus(void)
+ static inline uint8_t Buttons_GetStatus(void) ATTR_WARN_UNUSED_RESULT;
+ static inline uint8_t Buttons_GetStatus(void)
{
// TODO: Return current button status here, debounced if required
}
|