buttons.h File Reference

The header file describes the buttons interface. More...

Go to the source code of this file.

Functions

result_t BSP_OpenButtons (void(*pressed)(uint8_t bn), void(*released)(uint8_t bn))
 Registers handlers for button events.
result_t BSP_CloseButtons (void)
 Cancel buttons handlers.
uint8_t BSP_ReadButtonsState (void)
 Reads state of the buttons.


Detailed Description

The header file describes the buttons interface.

Author:
Atmel Corporation: http://www.atmel.com
Support email: avr@atmel.com
Copyright (c) 2008 , Atmel Corporation. All rights reserved. Licensed under Atmel's Limited License Agreement (BitCloudTM).

Definition in file buttons.h.


Function Documentation

result_t BSP_OpenButtons ( void(*)(uint8_t bn)  pressed,
void(*)(uint8_t bn)  released 
)

Registers handlers for button events.

Parameters:
[in] pressed - the handler to process pressing of the button
bn - button number.
[in] released - the handler to process releasing of the button
bn - button number.
Returns:
FAIL - buttons module is busy,
SUCCESS - otherwise.

result_t BSP_CloseButtons ( void   ) 

Cancel buttons handlers.

Returns:
FAIL - buttons module was not opened,
SUCCESS - otherwise.

uint8_t BSP_ReadButtonsState ( void   ) 

Reads state of the buttons.

Returns:
Current buttons state in a binary way.
Bit 0 defines the state of button 1, bit 1 defines the state of button 2.


Generated on Mon Feb 16 17:53:40 2009 for BitCloud Stack Documentation by  doxygen 1.5.1-p1