Sensorian  1.0
C API Reference Guide Library
Utilities.h File Reference
#include <bcm2835.h>
#include <stdio.h>
#include <stdint.h>

Go to the source code of this file.

Macros

#define ALPHA_BOARD
 
#define MPL_PIN   RPI_V2_GPIO_P1_07
 
#define LUX_PIN   RPI_V2_GPIO_P1_11
 
#define ACLM_PIN   RPI_V2_GPIO_P1_12
 
#define ALERT_PIN   RPI_V2_GPIO_P1_13
 
#define LED_PIN   RPI_V2_GPIO_P1_15
 
#define MFP_PIN   RPI_V2_GPIO_P1_18
 

Typedefs

typedef uint8_t PIN_t
 
typedef enum PinLev PinLevel_t
 

Enumerations

enum  PinLev {
  LOWLEVEL = 0, HIGHLEVEL, LOWLEVEL = 0, HIGHLEVEL,
  LOWLEVEL = 0, HIGHLEVEL, LOWLEVEL = 0, HIGHLEVEL,
  LOWLEVEL = 0, HIGHLEVEL, LOWLEVEL = 0, HIGHLEVEL,
  LOWLEVEL = 0, HIGHLEVEL, LOWLEVEL = 0, HIGHLEVEL,
  LOWLEVEL = 0, HIGHLEVEL, LOWLEVEL = 0, HIGHLEVEL,
  LOWLEVEL = 0, HIGHLEVEL, LOWLEVEL = 0, HIGHLEVEL,
  LOWLEVEL = 0, HIGHLEVEL, LOWLEVEL = 0, HIGHLEVEL,
  LOWLEVEL = 0, HIGHLEVEL, LOWLEVEL = 0, HIGHLEVEL,
  LOWLEVEL = 0, HIGHLEVEL, LOWLEVEL = 0, HIGHLEVEL,
  LOWLEVEL = 0, HIGHLEVEL, LOWLEVEL = 0, HIGHLEVEL,
  LOWLEVEL = 0, HIGHLEVEL, LOWLEVEL = 0, HIGHLEVEL,
  LOWLEVEL = 0, HIGHLEVEL, LOWLEVEL = 0, HIGHLEVEL,
  LOWLEVEL = 0, HIGHLEVEL
}
 

Functions

void delay_ms (unsigned int ms)
 Delay in ms. More...
 
PinLevel_t ReadPinStatus (PIN_t pin)
 Configures the pins as input and returns the pin status. More...
 
void pinModeOutput (PIN_t pin)
 Configures the given pin as output. More...
 
void digitalWrite (PIN_t pin, unsigned char level)
 Write a logic level to the pin. The pin should be confgured as output. More...
 
void EnableDetectRisingEdge (PIN_t pin)
 Enables detection of rising edge. More...
 
void DisableDetectRisingEdge (PIN_t pin)
 Disables detection of rising edge. More...
 
void EnableDetectFallingEdge (PIN_t pin)
 Enables detection of falling edge. More...
 
void DisableDetectFallinggEdge (PIN_t pin)
 Dsiables detection of falling edge. More...
 
void EnableDetectHighLevel (PIN_t pin)
 Enables detection of high level on pin. More...
 
void DisableDetectHighLevel (PIN_t pin)
 Disables detection of high level. More...
 
void EnableDetectLowLevel (PIN_t pin)
 Enables detection of low level. More...
 
void DisableDetectLowLevel (PIN_t pin)
 Disables detection of low level. More...
 
void EnableDetectRisingInterrupt (PIN_t pin)
 Enables detection of rising edge interrupt. More...
 
void DisableDetectRisingInterrupt (PIN_t pin)
 Disables detection of rising edge interrupt. More...
 

Macro Definition Documentation

#define ACLM_PIN   RPI_V2_GPIO_P1_12

Definition at line 18 of file Utilities.h.

#define ALERT_PIN   RPI_V2_GPIO_P1_13

Definition at line 19 of file Utilities.h.

#define ALPHA_BOARD

Definition at line 8 of file Utilities.h.

#define LED_PIN   RPI_V2_GPIO_P1_15

Definition at line 20 of file Utilities.h.

#define LUX_PIN   RPI_V2_GPIO_P1_11

Definition at line 17 of file Utilities.h.

#define MFP_PIN   RPI_V2_GPIO_P1_18

Definition at line 21 of file Utilities.h.

#define MPL_PIN   RPI_V2_GPIO_P1_07

Definition at line 16 of file Utilities.h.

Typedef Documentation

typedef uint8_t PIN_t

Definition at line 10 of file Utilities.h.

typedef enum PinLev PinLevel_t

Enumeration Type Documentation

enum PinLev
Enumerator
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 
LOWLEVEL 
HIGHLEVEL 

Definition at line 12 of file Utilities.h.