roneos
Operating System for the r-one robot
 All Data Structures Files Functions Variables Typedefs Groups
buttons.h File Reference

Functions for 3 buttons on the top of the robot (R,G,B) that can be programmed by the user. More...

Go to the source code of this file.

Functions

void buttonsInit (void)
 Initializes the buttons. More...
 
uint32 buttonsGet (uint32 button)
 Gets the state of the specified button. More...
 
void buttonsBuildMessage (uint8 *msg)
 Build a message containing the states of each button. More...
 

Detailed Description

Functions for 3 buttons on the top of the robot (R,G,B) that can be programmed by the user.

Since
Mar 19, 2011
Author
James McLurkin

Function Documentation

void buttonsBuildMessage ( uint8 *  msg)

Build a message containing the states of each button.

3 bits of message used. Blue, green, red.

Parameters
msgthe address where the message is placed
Returns
void
uint32 buttonsGet ( uint32  button)

Gets the state of the specified button.

Tells you whether the specified button is on or off

Parameters
buttonspecifies which button to check (BUTTON_RED, BUTTON_BLUE, or BUTTON_GREEN)
Returns
void
void buttonsInit ( void  )

Initializes the buttons.

Initializes the red, green, and blue buttons as input.

Returns
void