Hubo Library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Structures | Enumerations | Functions | Variables
BCM2835 Namespace Reference

Data Structures

class  BCM2835_Config
 Use to configure BCM2835 specific parameters. More...
 

Enumerations

enum  FunctionSelectType {
  Input = 0x00, Output = 0x01, Alternate0 = 0x04, Alternate1 = 0x05,
  Alternate2 = 0x06, Alternate3 = 0x07, Alternate4 = 0x03, Alternate5 = 0x02,
  FSEL_MASK = 0x07
}
 Prior to using a GPIO pin it requires to get defined for its use as input, output or one of the alternative functions. More...
 
enum  PullUpDownType { PUD_OFF = 0x00, PUD_DOWN = 0x01, PUD_UP = 0x02 }
 Pins configured as input can make use of internal pull up or down resistors. More...
 

Functions

bool IsGPIOInitialized ()
 Returns the status of the initialisation of the GPIO part of the library. More...
 
void FunctionSelectPin (unsigned char pin, FunctionSelectType mode)
 Use FunctionSelect() to configure the mode of a BCM2835 pin. More...
 
void WritePin (unsigned char pin, unsigned char value)
 Sets or clears a pin configured to be an output. More...
 
void SetPin (unsigned char pin)
 Sets a pin configured as output to 1. More...
 
void ClearPin (unsigned char pin)
 Resets a pin configured as output to 0. More...
 
void SetPullUpDown (unsigned char pin, PullUpDownType pud)
 Enables or disables the BCM2835 internal pull -up or -down resistors for a pin configured as an input. More...
 
unsigned short ReadPin (unsigned short pin)
 Reads the value of an (input) pin. More...
 

Variables

BCM2835_Config g_bcm2835Config
 

Variable Documentation

BCM2835_Config BCM2835::g_bcm2835Config