Sensorian  1.0
C API Reference Guide Library
Utilities

Functions

void delay_ms (unsigned int ms)
 Delay in ms. 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...
 
PinLevel_t ReadPinStatus (PIN_t pin)
 Configures the pins as input and returns the pin status. 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...
 
unsigned char CheckPinforEvent (PIN_t pin)
 Checks fro even on given pin. More...
 

Detailed Description

These are common helper functions that are used to read and write GPIO pins and for timing delays.

Function Documentation

unsigned char CheckPinforEvent ( PIN_t  pin)

Checks fro even on given pin.

Parameters
pinPin to be configured, Available pin definitons are defined in the Utitlies.h
Returns
none

Definition at line 183 of file Utilities.c.

void delay_ms ( unsigned int  ms)

Delay in ms.

Parameters
msDelay in milliseconds
Returns
none
Examples:
Blinky.c, and CapacitiveTouch.c.

Definition at line 39 of file Utilities.c.

void digitalWrite ( PIN_t  pin,
unsigned char  level 
)

Write a logic level to the pin. The pin should be confgured as output.

Parameters
pinPin to be configured, Available pin definitons are defined in the Utitlies.h
levelLogic level can be HIGH or LOW.
Returns
none
Parameters
pinPin to be configured, Available pin definitons are defined in the Utitlies.h level Logic level can be HIGH or LOW.
Returns
none
Examples:
Blinky.c.

Definition at line 60 of file Utilities.c.

void DisableDetectFallinggEdge ( PIN_t  pin)

Dsiables detection of falling edge.

Parameters
pinPin to be configured, Available pin definitons are defined in the Utitlies.h
Returns
none

Definition at line 113 of file Utilities.c.

void DisableDetectHighLevel ( PIN_t  pin)

Disables detection of high level.

Parameters
pinPin to be configured, Available pin definitons are defined in the Utitlies.h
Returns
none

Definition at line 133 of file Utilities.c.

void DisableDetectLowLevel ( PIN_t  pin)

Disables detection of low level.

Parameters
pinPin to be configured, Available pin definitons are defined in the Utitlies.h
Returns
none

Definition at line 153 of file Utilities.c.

void DisableDetectRisingEdge ( PIN_t  pin)

Disables detection of rising edge.

Parameters
pinPin to be configured, Available pin definitons are defined in the Utitlies.h
Returns
none

Definition at line 93 of file Utilities.c.

void DisableDetectRisingInterrupt ( PIN_t  pin)

Disables detection of rising edge interrupt.

Parameters
pinPin to be configured, Available pin definitons are defined in the Utitlies.h
Returns
none

Definition at line 173 of file Utilities.c.

void EnableDetectFallingEdge ( PIN_t  pin)

Enables detection of falling edge.

Parameters
pinPin to be configured, Available pin definitons are defined in the Utitlies.h
Returns
none

Definition at line 103 of file Utilities.c.

void EnableDetectHighLevel ( PIN_t  pin)

Enables detection of high level on pin.

Parameters
pinPin to be configured, Available pin definitons are defined in the Utitlies.h
Returns
none

Definition at line 123 of file Utilities.c.

void EnableDetectLowLevel ( PIN_t  pin)

Enables detection of low level.

Parameters
pinPin to be configured, Available pin definitons are defined in the Utitlies.h
Returns
none

Definition at line 143 of file Utilities.c.

void EnableDetectRisingEdge ( PIN_t  pin)

Enables detection of rising edge.

Parameters
pinPin to be configured, Available pin definitons are defined in the Utitlies.h
Returns
none

Definition at line 83 of file Utilities.c.

void EnableDetectRisingInterrupt ( PIN_t  pin)

Enables detection of rising edge interrupt.

Parameters
pinPin to be configured, Available pin definitons are defined in the Utitlies.h
Returns
none

Definition at line 163 of file Utilities.c.

void pinModeOutput ( PIN_t  pin)

Configures the given pin as output.

Parameters
pinPIN_t type
Returns
none
Examples:
Blinky.c.

Definition at line 49 of file Utilities.c.

PinLevel_t ReadPinStatus ( PIN_t  pin)

Configures the pins as input and returns the pin status.

Parameters
pinPin to be configured, Available pin definitons are defined in the Utitlies.h
Returns
status Pin level can be HIGH or LOW.

Definition at line 70 of file Utilities.c.