dio.h File Reference

Definitions for digital input / output. More...

Go to the source code of this file.

Defines

#define _PORT_A   1
 Port A.
#define _PORT_B   2
 Port B.
#define _PORT_C   3
 Port C.
#define _PORT_D   4
 Port D.
#define _PORT_E   5
 Port E.
#define _PORT_F   6
 Port F.
#define _PORT_G   7
 Port G.
#define _PIN_A0   8
 Pin A0.
#define _PIN_A1   9
 Pin A1.
#define _PIN_A2   10
 Pin A2.
#define _PIN_A3   11
 Pin A3.
#define _PIN_A4   12
 Pin A4.
#define _PIN_A5   13
 Pin A5.
#define _PIN_A6   14
 Pin A6.
#define _PIN_A7   15
 Pin A7.
#define _PIN_B0   16
 Pin B0.
#define _PIN_B1   17
 Pin B1.
#define _PIN_B2   18
 Pin B2.
#define _PIN_B3   19
 Pin B3.
#define _PIN_B4   20
 Pin B4.
#define _PIN_B5   21
 Pin B5.
#define _PIN_B6   22
 Pin B6.
#define _PIN_B7   23
 Pin B7.
#define _PIN_C0   24
 Pin C0.
#define _PIN_C1   25
 Pin C1.
#define _PIN_C2   26
 Pin C2.
#define _PIN_C3   27
 Pin C3.
#define _PIN_C4   28
 Pin C4.
#define _PIN_C5   29
 Pin C5.
#define _PIN_C6   30
 Pin C6.
#define _PIN_C7   31
 Pin C7.
#define _PIN_D0   32
 Pin D0.
#define _PIN_D1   33
 Pin D1.
#define _PIN_D2   34
 Pin D2.
#define _PIN_D3   35
 Pin D3.
#define _PIN_D4   36
 Pin D4.
#define _PIN_D5   37
 Pin D5.
#define _PIN_D6   38
 Pin D6.
#define _PIN_D7   39
 Pin D7.
#define _PIN_E0   40
 Pin E0.
#define _PIN_E1   41
 Pin E1.
#define _PIN_E2   42
 Pin E2.
#define _PIN_E3   43
 Pin E3.
#define _PIN_E4   44
 Pin E4.
#define _PIN_E5   45
 Pin E5.
#define _PIN_E6   46
 Pin E6.
#define _PIN_E7   47
 Pin E7.
#define _PIN_F0   48
 Pin F0.
#define _PIN_F1   49
 Pin F1.
#define _PIN_F2   50
 Pin F2.
#define _PIN_F3   51
 Pin F3.
#define _PIN_F4   52
 Pin F4.
#define _PIN_F5   53
 Pin F5.
#define _PIN_F6   54
 Pin F6.
#define _PIN_F7   55
 Pin F7.
#define _PIN_G0   56
 Pin G0.
#define _PIN_WR   56
 Pin WR.
#define _PIN_G1   57
 Pin G1.
#define _PIN_RD   57
 Pin RD.
#define _PIN_G2   58
 Pin G2.
#define _PIN_ALE   58
 Pin ALE.
#define _PIN_G3   59
 Pin G3.
#define _PIN_TOSC2   59
 Pin TOSC2.
#define _PIN_G4   60
 Pin G4.
#define _PIN_TOSC1   60
 Pin TOSC1.
#define PIN_A0   8
 Pin A0.
#define PIN_A1   9
 Pin A1.
#define PIN_A2   10
 Pin A2.
#define PIN_A3   11
 Pin A3.
#define PIN_A4   12
 Pin A4.
#define PIN_A5   13
 Pin A5.
#define PIN_A6   14
 Pin A6.
#define PIN_A7   15
 Pin A7.
#define PIN_SS   16
 Pin SS.
#define PIN_SCK   17
 Pin SCK.
#define PIN_MOSI   18
 Pin MOSI.
#define PIN_MISO   19
 Pin MISO.
#define PIN_LCD_COMMAND   20
 LCD Command Pin.
#define PIN_C0   24
 Pin C0.
#define PIN_C1   25
 Pin C1.
#define PIN_C2   26
 Pin C2.
#define PIN_C3   27
 Pin C3.
#define PIN_C4   28
 Pin C4.
#define PIN_C5   29
 Pin C5.
#define PIN_C6   30
 Pin C6.
#define PIN_C7   31
 Pin C7.
#define PIN_SCL   32
 Pin SCL.
#define PIN_SDA   33
 Pin SDA.
#define PIN_RX0   40
 Pin RX0.
#define PIN_TX0   41
 Pin TX0.
#define PIN_LCD_RESET   42
 LCD Reset Pin.
#define PIN_E6   46
 Pin E6.
#define PIN_EXT_DIO1   46
 Pin EXT_DIO1.
#define PIN_E7   47
 Pin E7.
#define PIN_EXT_DIO2   48
 Pin EXT_DIO2.
#define PIN_AN0   48
 Pin AN0.
#define PIN_ADC0   48
 Pin ADC0.
#define PIN_AN1   49
 Pin AN1.
#define PIN_ADC1   49
 Pin ADC1.
#define PIN_AN2   50
 Pin AN2.
#define PIN_ADC2   50
 Pin ADC2.
#define PIN_AN3   51
 Pin AN3.
#define PIN_ADC3   51
 Pin ADC3.
#define PIN_AN4   52
 Pin AN4.
#define PIN_ADC4   52
 Pin ADC4.
#define PIN_AN5   53
 Pin AN5.
#define PIN_ADC5   53
 Pin ADC5.
#define PIN_AN6   54
 Pin AN6.
#define PIN_ADC6   54
 Pin ADC6.
#define PIN_AN7   55
 Pin AN7.
#define PIN_ADC7   55
 Pin ADC7.
#define PIN_WHEEL   54
 Wheel Pin.
#define PIN_BATT   55
 Battery Voltage Monitor Pin.
#define PIN_BTN1   56
 button1 Pin
#define PIN_BTN2   57
 button2 Pin
#define PIN_LED1   58
 LED1 Pin.
#define PIN_BTN   PING
 Button Pin.
#define BTN2   PING1
 button2 Pin
#define BTN1   PING0
 button1 Pin

Functions

int digital_input (int)
 Read a portpin.
void digital_output (int bit, int val)
 Output to a portpin.
void digital_pull_up (int)
 Pullup a portpin.
int button1_read (void)
 Check if button1 is pressed.
int button1_click (void)
 Check if button1 is clicked.
void button1_wait (void)
 Wait until button1 is pressed.
int button2_read (void)
 Check if button2 is pressed.
int button2_click (void)
 Check if button2 is clicked.
void button2_wait (void)
 Wait until button2 is pressed.


Detailed Description

Definitions for digital input / output.

Copyright (c) 2007 Colony Project

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

This file contains definitions and functions for dealing with digital input and output.

Author:
Colony Project, CMU Robotics Club Based on Tom Lauwer's Firefly Library

Generated on Mon Sep 7 19:07:28 2009 for libdragonfly by  doxygen 1.5.9