first commit

This commit is contained in:
Arturo Corro 2021-12-01 22:41:59 -06:00
commit ad68ba1cac
208 changed files with 42683 additions and 0 deletions

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# Arduino Temporizador SSR DS3231 LCD2004

View File

@ -0,0 +1,982 @@
/*****************************************
* Dosificador_LCD2004_4buttons *
* 15/03/2021 *
* Versión 0.1.0 *
* koneko.mx *
*****************************************/
#include "Timer_lite.h"
#include <LiquidCrystal_I2C.h>
#define arr_len(x) (sizeof(x)/sizeof(*x))
/**************************************************
* PINOUT / MEMORY ADDRESS
**************************************************/
#define LCD_I2C_ADDRESS 0x27
#define RELAY_PIN 4
#define SETTINGS_BUTTONS_PIN A3
/**************************************************
* BOTONES
**************************************************/
#define SETTING_BUTTON_IN_VAL 16
#define SETTING_BUTTON_OUT_VAL 91
#define SETTING_BUTTON_UP_VAL 41
#define SETTING_BUTTON_DOWN_VAL 69
#define SETTING_BUTTON_TOLERANCE_READ 8
#define SETTING_BUTTON_CONFIRMATION_REPEATS_MILLIS 1
#define SETTING_BUTTON_DELAY_MILLIS 350
// 4-button configuration
uint8_t button_values[] = {SETTING_BUTTON_IN_VAL, SETTING_BUTTON_OUT_VAL, SETTING_BUTTON_UP_VAL, SETTING_BUTTON_DOWN_VAL};
uint32_t _bt[sizeof(button_values)]; // millis
uint32_t confirmation_repeats_millis;
/**************************************************
* MENÚ
**************************************************/
#define ALL_SETTINGS 0
#define VIEW 0
#define UPDATE 1
#define POSITION_ONE 0
#define POSITION_TWO 1
#define POSITION_THREE 2
#define POSITION_FOUR 3
#define POSITION_FIVE 4
#define POSITION_SIX 5
#define YEARS_DATETIME 2020
#define AUTO_EXIT_MENU_MILLIS 15000
// MENÚ
#define OUT_OF_MENU -1
#define MENU_SALIR 0
#define MENU_T_ESPERA_INICIAL 1
#define MENU_T_ARRANQUE 2
#define MENU_T_ARRANQUE_ESPERA 3
#define MENU_T_ENCENDIDO 4
#define MENU_T_ENCENDIDO_ESPERA 5
#define MENU_FECHA_Y_HORA 6
#define MENU_DETENER_PROCESO 7
#define MENU_REANUDAR_PROCESO 8
#define MENU_REINICIAR_EQUIPO 9
#define MENU_VALORES_DE_FABRICA 10
#define DETENER 0
#define REANUDAR 1
#define REINICIAR 2
#define RESTAURAR 3
#define CANCELAR 4
// Menú navegación
int8_t menu_section;
uint8_t menu_edition;
uint8_t menu_cursor_var;
uint8_t setup_var[6];
uint32_t last_change_menu_millis;
/**************************************************
* LCD
**************************************************/
#define BLINK_MILLIS 1600
#define LCD_PROCESS_REFRESH_MILLIS 250
// LCD2004
LiquidCrystal_I2C lcd(LCD_I2C_ADDRESS, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
String menu[] = {
"SALIR",
"T. ESPERA INICIAL",
"T. ARRANQUE",
"T. ESPERA ARRANQUE",
"T. ENCENDIDO",
"T. ESPERA ENCENDIDO",
"CAMBIAR FECHA Y HORA",
"DETENER PROCESO",
"REANUDAR PROCESO",
"REINICIAR EQUIPO",
"VALORES DE FABRICA",
};
String timer_text[] = {
"DETENIDO",
"INICIARA EN",
"ARRANQUE",
"ESPERA A.",
"ENCENDIDO",
"ESPERA E.",
};
String text_info[] = {
"DETENER",
"REANUDAR",
"REINICIAR",
"RESTAURAR",
"CANCELAR",
};
boolean refresh_lcd_menu;
uint32_t blink_millis;
/***************************************************
* Timer_lite
***************************************************/
#define TIMER_FIRST_EEPROM_ADREESS 0
#define TIEMPO_INICIO_ESPERA_DEFAULT 60
#define TIEMPO_ARRRANQUE_DEFAULT 10
#define TIEMPO_ARRRANQUE_ESPERA_DEFAULT 20
#define TIEMPO_ENCENDIDO_DEFAULT 10
#define TIEMPO_ENCENDIDO_ESPERA_DEFAULT 10
#define PROCESO_DETENIDO_DEFAULT 0
uint8_t Timer_lite::_instancias_num;
RTC_DS3231 Timer_lite::_RTC;
DateTime Timer_lite::_now;
Timer_lite myTimer_lite(RELAY_PIN, TIMER_FIRST_EEPROM_ADREESS);
/**************************************************
* Define DEBUG_SERIAL_ENABLE to enable debug serial.
* Comment it to disable debug serial.
**************************************************/
#define DEBUG_SERIAL_ENABLE
#define dbSerial Serial
#ifdef DEBUG_SERIAL_ENABLE
#define serialPrint(a) dbSerial.print(a)
#define serialPrintln(a) dbSerial.println(a)
#define serialBegin(a) dbSerial.begin(a)
#define serialBeginWhile(a) while(!dbSerial) delay(1)
#else
#define serialPrint(a) do{}while(0)
#define serialPrintln(a) do{}while(0)
#define serialBegin(a) do{}while(0)
#define serialBeginWhile(a) do{}while(0)
#endif
/**************************************************
* FRONT PANEL OF CONFIGURATIONS
**************************************************/
// button methods and memory spaces
void loop_panel_buttons()
{
// Leemos valor analogo del botón
uint16_t button_value = analogRead(SETTINGS_BUTTONS_PIN);
// Comprobamos el valor obtenido con un rago de tolerancia SETTING_BUTTON_TOLERANCE_READ
for (uint8_t i = 0; i < sizeof button_values / sizeof button_values[0]; i++) {
if(button_values[i] >= (button_value - SETTING_BUTTON_TOLERANCE_READ) && button_values[i] <= (button_value + SETTING_BUTTON_TOLERANCE_READ))
button_value = button_values[i];
}
serialPrintln(button_value);
//Valoramos si se presiono un botón y ejecutamos el metodo correspondiente
switch(button_value) {
case SETTING_BUTTON_IN_VAL:
if(millis() >= _bt[0] + SETTING_BUTTON_DELAY_MILLIS) {
if(confirmation_repeats_millis == 0)
confirmation_repeats_millis = millis() + SETTING_BUTTON_CONFIRMATION_REPEATS_MILLIS;
if(millis() > confirmation_repeats_millis){
action_button(SETTING_BUTTON_IN_VAL);
_bt[0] = millis();
}
}
break;
case SETTING_BUTTON_OUT_VAL:
if(millis() >= _bt[1] + SETTING_BUTTON_DELAY_MILLIS) {
if(confirmation_repeats_millis == 0)
confirmation_repeats_millis = millis() + SETTING_BUTTON_CONFIRMATION_REPEATS_MILLIS;
if(millis() > confirmation_repeats_millis){
action_button(SETTING_BUTTON_OUT_VAL);
_bt[1] = millis();
}
}
break;
case SETTING_BUTTON_UP_VAL:
if(millis() >= _bt[2] + SETTING_BUTTON_DELAY_MILLIS) {
if(confirmation_repeats_millis == 0)
confirmation_repeats_millis = millis() + SETTING_BUTTON_CONFIRMATION_REPEATS_MILLIS;
if(millis() > confirmation_repeats_millis){
action_button(SETTING_BUTTON_UP_VAL);
_bt[2] = millis();
}
}
break;
case SETTING_BUTTON_DOWN_VAL:
if(millis() >= _bt[3] + SETTING_BUTTON_DELAY_MILLIS) {
if(confirmation_repeats_millis == 0)
confirmation_repeats_millis = millis() + SETTING_BUTTON_CONFIRMATION_REPEATS_MILLIS;
if(millis() > confirmation_repeats_millis){
action_button(SETTING_BUTTON_DOWN_VAL);
_bt[3] = millis();
}
}
break;
default:
confirmation_repeats_millis = 0;
_bt[0] = 0;
_bt[1] = 0;
_bt[2] = 0;
_bt[3] = 0;
}
// Verificamos y salimos del menú si a pasan AUTO_EXIT_MENU_MILLIS
if((menu_section != OUT_OF_MENU) && (millis() >= last_change_menu_millis + AUTO_EXIT_MENU_MILLIS)){
load_menu_variables(OUT_OF_MENU);
refresh_lcd_menu = true;
serialPrintln("AUTO_EXIT_MENU_MILLIS");
}
}
void action_button(uint8_t button_value)
{
switch(button_value) {
case SETTING_BUTTON_IN_VAL:
switch(menu_section) {
case OUT_OF_MENU:
load_menu_variables(1);
break;
case MENU_DETENER_PROCESO:
case MENU_REANUDAR_PROCESO:
case MENU_REINICIAR_EQUIPO:
case MENU_VALORES_DE_FABRICA:
if(menu_edition == VIEW)
menu_edition = UPDATE;
else if(++menu_cursor_var > POSITION_ONE)
save_setting(menu_section);
break;
case MENU_T_ESPERA_INICIAL:
if(menu_edition == VIEW)
menu_edition = UPDATE;
else if(++menu_cursor_var > POSITION_TWO)
save_setting(menu_section);
break;
case MENU_T_ARRANQUE_ESPERA:
case MENU_T_ARRANQUE:
case MENU_T_ENCENDIDO_ESPERA:
case MENU_T_ENCENDIDO:
if(menu_edition == VIEW)
menu_edition = UPDATE;
else if(++menu_cursor_var > POSITION_THREE)
save_setting(menu_section);
break;
case MENU_FECHA_Y_HORA:
if(menu_edition == VIEW)
menu_edition = UPDATE;
else if(++menu_cursor_var > POSITION_SIX)
save_setting(menu_section);
break;
case MENU_SALIR:
load_menu_variables(OUT_OF_MENU);
break;
}
break;
case SETTING_BUTTON_OUT_VAL:
switch(menu_edition){
case VIEW:
load_menu_variables(OUT_OF_MENU);
break;
case UPDATE:
if(menu_cursor_var == 0)
load_menu_variables(menu_section);
else
menu_cursor_var--;
}
break;
case SETTING_BUTTON_UP_VAL:
switch(menu_section) {
case OUT_OF_MENU:
load_menu_variables(arr_len(menu) -1);
break;
case MENU_T_ESPERA_INICIAL:
if(menu_edition == VIEW){
load_menu_variables(MENU_SALIR);
}else{// UPDATE
if(menu_cursor_var == POSITION_ONE)
setup_var[0] = setup_var[0] >= 60 ? 0 : ++setup_var[0]; // Minutos
else if(menu_cursor_var == POSITION_TWO)
setup_var[1] = setup_var[1] >= 59 ? 0 : ++setup_var[1]; // Segundos
}
break;
case MENU_T_ARRANQUE_ESPERA:
case MENU_T_ARRANQUE:
case MENU_T_ENCENDIDO_ESPERA:
case MENU_T_ENCENDIDO:
if(menu_edition == VIEW){
load_menu_variables(menu_section -1);
}else{// UPDATE
if(menu_cursor_var == POSITION_ONE)
setup_var[0] = setup_var[0] >= 23 ? 0 : ++setup_var[0]; // Horas
else if(menu_cursor_var == POSITION_TWO)
setup_var[1] = setup_var[1] >= 59 ? 0 : ++setup_var[1]; // Minutos
else if(menu_cursor_var == POSITION_THREE)
setup_var[2] = setup_var[2] >= 59 ? 0 : ++setup_var[2]; // Segundos
}
break;
case MENU_FECHA_Y_HORA:
if(menu_edition == VIEW){
load_menu_variables(menu_section -1);
}else{ // UPDATE
if(menu_cursor_var == POSITION_ONE)
setup_var[0] = setup_var[0] >= 23 ? 1 : ++setup_var[0]; // Horas
else if(menu_cursor_var == POSITION_TWO)
setup_var[1] = setup_var[1] >= 59 ? 0 : ++setup_var[1]; // Minutos
else if(menu_cursor_var == POSITION_THREE)
setup_var[2] = setup_var[2] >= 59 ? 0 : ++setup_var[2]; // Segundo
else if(menu_cursor_var == POSITION_FOUR)
setup_var[3] = setup_var[3] >= 31 ? 0 : ++setup_var[3]; // Día
else if(menu_cursor_var == POSITION_FIVE)
setup_var[4] = setup_var[4] >= 12 ? 0 : ++setup_var[4]; // Mes
else if(menu_cursor_var == POSITION_SIX)
setup_var[5] = setup_var[5] >= 10 ? 0 : ++setup_var[5]; // año
}
break;
case MENU_DETENER_PROCESO:
if(menu_edition == VIEW)
load_menu_variables(menu_section -1);
else // UPDATE
setup_var[0] = setup_var[0] >= 1 ? 0 : ++setup_var[0];
break;
case MENU_REANUDAR_PROCESO:
if(menu_edition == VIEW)
load_menu_variables(menu_section -2);
else // UPDATE
setup_var[0] = setup_var[0] >= 1 ? 0 : ++setup_var[0];
break;
case MENU_REINICIAR_EQUIPO:
if(menu_edition == VIEW)
load_menu_variables(menu_section + (myTimer_lite.getTimerDetenido()? -1: -2));
else // UPDATE
setup_var[0] = setup_var[0] >= 1 ? 0 : ++setup_var[0];
break;
case MENU_VALORES_DE_FABRICA:
if(menu_edition == VIEW)
load_menu_variables(menu_section -1);
else // UPDATE
setup_var[0] = setup_var[0] >= 1 ? 0 : ++setup_var[0];
break;
case MENU_SALIR:
load_menu_variables(arr_len(menu) -1);
break;
}
break;
case SETTING_BUTTON_DOWN_VAL:
switch(menu_section) {
case OUT_OF_MENU:
load_menu_variables(1);
break;
case MENU_T_ESPERA_INICIAL:
if(menu_edition == VIEW){
load_menu_variables(menu_section +1);
}else{ // UPDATE
if(menu_cursor_var == POSITION_ONE)
setup_var[0] = setup_var[0] <= 0 ? 60 : --setup_var[0]; // Minutos
else if(menu_cursor_var == POSITION_TWO)
setup_var[1] = setup_var[1] <= 0 ? 59 : --setup_var[1]; // Segundos
}
break;
case MENU_T_ARRANQUE:
case MENU_T_ARRANQUE_ESPERA:
case MENU_T_ENCENDIDO:
case MENU_T_ENCENDIDO_ESPERA:
if(menu_edition == VIEW){
load_menu_variables(menu_section +1);
}else{ // UPDATE
if(menu_cursor_var == POSITION_ONE)
setup_var[0] = setup_var[0] <= 0 ? 23 : --setup_var[0]; // Horas
else if(menu_cursor_var == POSITION_TWO)
setup_var[1] = setup_var[1] <= 0 ? 59 : --setup_var[1]; // Minutos
else if(menu_cursor_var == POSITION_THREE)
setup_var[2] = setup_var[2] <= 0 ? 59 : --setup_var[2]; // Segundos
}
break;
case MENU_FECHA_Y_HORA:
if(menu_edition == VIEW){
load_menu_variables(menu_section + (myTimer_lite.getTimerDetenido()? 2: 1));
}else{ // UPDATE
if(menu_cursor_var == POSITION_ONE)
setup_var[0] = setup_var[0] <= 0 ? 23 : --setup_var[0]; // Horas
else if(menu_cursor_var == POSITION_TWO)
setup_var[1] = setup_var[1] <= 0 ? 59 : --setup_var[1]; // Minutos
else if(menu_cursor_var == POSITION_THREE)
setup_var[2] = setup_var[2] <= 0 ? 59 : --setup_var[2]; // Segundos
else if(menu_cursor_var == POSITION_FOUR)
setup_var[3] = setup_var[3] <= 0? 31 : --setup_var[3]; // Día
else if(menu_cursor_var == POSITION_FIVE)
setup_var[4] = setup_var[4] <= 0? 12 : --setup_var[4]; // Mes
else if(menu_cursor_var == POSITION_SIX)
setup_var[5] = setup_var[5] <= 0? 10 : --setup_var[5]; // año
}
break;
case MENU_DETENER_PROCESO:
if(menu_edition == VIEW)
load_menu_variables(menu_section +2);
else // UPDATE
setup_var[0] = setup_var[0] <= 0 ? 1 : --setup_var[0];
break;
case MENU_REANUDAR_PROCESO:
if(menu_edition == VIEW)
load_menu_variables(menu_section +1);
else // UPDATE
setup_var[0] = setup_var[0] <= 0 ? 1 : --setup_var[0];
break;
case MENU_REINICIAR_EQUIPO:
if(menu_edition == VIEW)
load_menu_variables(menu_section +1);
else // UPDATE
setup_var[0] = setup_var[0] <= 0 ? 1 : --setup_var[0];
break;
case MENU_VALORES_DE_FABRICA:
if(menu_edition == VIEW)
load_menu_variables(MENU_SALIR);
else // UPDATE
setup_var[0] = setup_var[0] <= 0 ? 1 : --setup_var[0];
break;
case MENU_SALIR:
load_menu_variables(1);
break;
}
break;
}
refresh_lcd_menu = true;
last_change_menu_millis = millis();
serialPrint("menu_section: ");
serialPrint(menu_section);
serialPrint(", menu_edition: ");
serialPrint(menu_edition);
serialPrint(", menu_cursor_var: ");
serialPrint(menu_cursor_var);
serialPrint(", setup_var[0]: ");
serialPrint(setup_var[0]);
serialPrint(", setup_var[1]: ");
serialPrint(setup_var[1]);
serialPrint(", setup_var[2]: ");
serialPrint(setup_var[2]);
serialPrint(", setup_var[3]: ");
serialPrint(setup_var[3]);
serialPrint(", setup_var[4]: ");
serialPrint(setup_var[4]);
serialPrint(", setup_var[5]: ");
serialPrintln(setup_var[5]);
}
void save_setting(uint8_t _setting)
{
menu_edition = VIEW;
menu_cursor_var = POSITION_ONE;
switch(_setting){
case MENU_T_ESPERA_INICIAL:
myTimer_lite.setTiempoInicioEspera(setup_var[0], setup_var[1]);
break;
case MENU_T_ARRANQUE:
myTimer_lite.setTiempoArranque(setup_var[0], setup_var[1], setup_var[2]);
break;
case MENU_T_ARRANQUE_ESPERA:
myTimer_lite.setTiempoArranqueEspera(setup_var[0], setup_var[1], setup_var[2]);
break;
case MENU_T_ENCENDIDO:
myTimer_lite.setTiempoEncendido(setup_var[0], setup_var[1], setup_var[2]);
break;
case MENU_T_ENCENDIDO_ESPERA:
myTimer_lite.setTiempoEncendidoEspera(setup_var[0], setup_var[1], setup_var[2]);
break;
case MENU_FECHA_Y_HORA:
myTimer_lite.setFechaHora(YEARS_DATETIME + setup_var[5], setup_var[4], setup_var[3], setup_var[0], setup_var[1], setup_var[2]);
break;
case MENU_DETENER_PROCESO:
if(setup_var[0]){
myTimer_lite.detener();
load_menu_variables(MENU_REANUDAR_PROCESO);
}
break;
case MENU_REANUDAR_PROCESO:
if(setup_var[0]){
myTimer_lite.reanudar();
load_menu_variables(MENU_DETENER_PROCESO);
}
break;
case MENU_REINICIAR_EQUIPO:
if(setup_var[0]){
myTimer_lite.reiniciar();
load_menu_variables(OUT_OF_MENU);
}
break;
case MENU_VALORES_DE_FABRICA:
if(setup_var[0]){
myTimer_lite.setTiempoInicioEspera(TIEMPO_INICIO_ESPERA_DEFAULT);
myTimer_lite.setTiempoArranque(TIEMPO_ARRRANQUE_DEFAULT);
myTimer_lite.setTiempoArranqueEspera(TIEMPO_ARRRANQUE_ESPERA_DEFAULT);
myTimer_lite.setTiempoEncendido(TIEMPO_ENCENDIDO_DEFAULT);
myTimer_lite.setTiempoEncendidoEspera(TIEMPO_ENCENDIDO_ESPERA_DEFAULT);
myTimer_lite.reanudar();
myTimer_lite.reiniciar();
load_menu_variables(1);
}
break;
}
}
void load_menu_variables(int8_t _menu_section)
{
menu_section = _menu_section;
menu_edition = VIEW;
menu_cursor_var = POSITION_ONE;
setup_var[0] = 0;
setup_var[1] = 0;
setup_var[2] = 0;
setup_var[3] = 0;
setup_var[4] = 0;
setup_var[5] = 0;
uint32_t valor_guardado;
switch(_menu_section){
case MENU_T_ESPERA_INICIAL:
valor_guardado = myTimer_lite.getTiempoInicioEspera();
setup_var[0] = uint8_t(valor_guardado / 60); // Minutos
setup_var[1] = uint8_t(valor_guardado - (setup_var[0] * 60)); // Segundos
break;
case int8_t(MENU_T_ARRANQUE):
valor_guardado = myTimer_lite.getTiempoArranque();
setup_var[0] = uint8_t(valor_guardado / 3600); // horas
setup_var[1] = uint8_t((valor_guardado - (setup_var[0] * 3600)) / 60); // Minutos
setup_var[2] = uint8_t(valor_guardado - (setup_var[0] * 3600) - (setup_var[1] * 60)); // Segundos
break;
case MENU_T_ARRANQUE_ESPERA:
valor_guardado = myTimer_lite.getTiempoArranqueEspera();
setup_var[0] = uint8_t(valor_guardado / 3600); // horas
setup_var[1] = uint8_t((valor_guardado - (setup_var[0] * 3600)) / 60); // Minutos
setup_var[2] = uint8_t(valor_guardado - (setup_var[0] * 3600) - (setup_var[1] * 60)); // Segundos
break;
case MENU_T_ENCENDIDO:
valor_guardado = myTimer_lite.getTiempoEncendido();
setup_var[0] = uint8_t(valor_guardado / 3600); // horas
setup_var[1] = uint8_t((valor_guardado - (setup_var[0] * 3600)) / 60); // Minutos
setup_var[2] = uint8_t(valor_guardado - (setup_var[0] * 3600) - (setup_var[1] * 60)); // Segundos
break;
case MENU_T_ENCENDIDO_ESPERA:
valor_guardado = myTimer_lite.getTiempoEncendidoEspera();
setup_var[0] = uint8_t(valor_guardado / 3600); // horas
setup_var[1] = uint8_t((valor_guardado - (setup_var[0] * 3600)) / 60); // Minutos
setup_var[2] = uint8_t(valor_guardado - (setup_var[0] * 3600) - (setup_var[1] * 60)); // Segundos
break;
case MENU_FECHA_Y_HORA:
setup_var[0] = Timer_lite::_now.hour();
setup_var[1] = Timer_lite::_now.minute();
setup_var[2] = Timer_lite::_now.second();
setup_var[3] = Timer_lite::_now.day();
setup_var[4] = Timer_lite::_now.month();
if(Timer_lite::_now.year() >= 2020)
setup_var[5] = (Timer_lite::_now.year() - YEARS_DATETIME);
break;
}
}
/**************************************************
* LCD2004 rendering
**************************************************/
// Helpers
String fill_string_ws(String _text_info, uint8_t _length, uint8_t _first_spaces = 0, String _char = " ")
{
if(_text_info.length() >= _length)
return _text_info.substring(0, _length);
for(uint8_t i = 0; _first_spaces > i; i++)
if(_text_info.length() < _length)
_text_info = _char + _text_info;
while(_text_info.length() < _length)
_text_info = _text_info + _char;
return _text_info;
}
String min_seg_to_string(uint8_t _min, uint8_t _seg)
{
String min = String(_min < 10? "0": "") + String(_min);
String seg = String(_seg < 10? "0": "") + String(_seg);
return min + ":" + seg;
}
String hrs_min_seg_to_string(uint8_t _hrs, uint8_t _min, uint8_t _seg)
{
String hrs = String(_hrs < 10? "0": "") + String(_hrs);
String min = String(_min < 10? "0": "") + String(_min);
String seg = String(_seg < 10? "0": "") + String(_seg);
return hrs + ":" + min + ":" + seg;
}
String hrs_min_seg_dia_mes_ano_to_string(uint8_t _hrs, uint8_t _min, uint8_t _seg, uint8_t _dia, uint8_t _mes, uint8_t _ano)
{
String hrs = String(_hrs < 10? "0": "") + String(_hrs);
String min = String(_min < 10? "0": "") + String(_min);
String seg = String(_seg < 10? "0": "") + String(_seg);
String dia = String(_dia < 10? "0": "") + String(_dia);
String mes = String(_mes < 10? "0": "") + String(_mes);
String ano = String(YEARS_DATETIME + _ano);
return hrs + ":" + min + ":" + seg + " " + dia + "/" + mes + "/" + ano;
}
String seg_to_string(uint32_t _seg)
{
uint32_t hrs = _seg / 3600;
uint16_t min = (_seg - (hrs * 3600)) / 60;
uint8_t seg = _seg - (hrs * 3600) - (min * 60);
String hrs_s = hrs >= 1? String(hrs) + ":": "";
String min_s = min >= 1? (hrs >= 1 && min <= 9? "0": "") + String(min) + (min >= 1? ":": ""): "";
String seg_s = (min >= 1 && seg <= 9? "0": "") + String(seg);
return hrs_s + min_s + seg_s;
}
// Methods
void loop_screen_rendering()
{
if(refresh_lcd_menu){
print_lcd_menu();
refresh_lcd_menu = false;
}
if(millis() % LCD_PROCESS_REFRESH_MILLIS == 0){
print_lcd_datetime();
print_lcd_process();
setCursor_lcd_menu();
}
}
void print_lcd_menu()
{
lcd.noCursor();
// Menú de configuraciones
lcd.setCursor(0, 1);
menu_section == OUT_OF_MENU?
lcd.print(fill_string_ws("", 20)):
lcd.print(fill_string_ws(menu[menu_section], 20));
// Detalles de configuraciones
lcd.setCursor(0, 2);
uint8_t text_info_idx;
switch(menu_section){
case OUT_OF_MENU:
case MENU_SALIR:
lcd.print(fill_string_ws("", 20));
break;
case MENU_T_ESPERA_INICIAL:
lcd.print(fill_string_ws(min_seg_to_string(setup_var[0], setup_var[1]), 20, 6));
break;
case MENU_T_ARRANQUE:
case MENU_T_ARRANQUE_ESPERA:
case MENU_T_ENCENDIDO:
case MENU_T_ENCENDIDO_ESPERA:
lcd.print(fill_string_ws(hrs_min_seg_to_string(setup_var[0], setup_var[1], setup_var[2]), 20, 3));
break;
case MENU_FECHA_Y_HORA:
if(menu_edition == UPDATE){
text_info_idx = setup_var[0]? DETENER: CANCELAR;
lcd.print(hrs_min_seg_dia_mes_ano_to_string(setup_var[0], setup_var[1], setup_var[2], setup_var[3], setup_var[4], setup_var[5]));
}else
lcd.print(fill_string_ws("", 20));
break;
case MENU_DETENER_PROCESO:
if(menu_edition == UPDATE){
text_info_idx = setup_var[0]? DETENER: CANCELAR;
lcd.print(fill_string_ws(text_info[text_info_idx], 20, 3));
}else
lcd.print(fill_string_ws("", 20));
break;
case MENU_REANUDAR_PROCESO:
if(menu_edition == UPDATE){
text_info_idx = setup_var[0]? REANUDAR: CANCELAR;
lcd.print(fill_string_ws(text_info[text_info_idx], 20, 3));
}else
lcd.print(fill_string_ws("", 20));
break;
case MENU_REINICIAR_EQUIPO:
if(menu_edition == UPDATE){
text_info_idx = setup_var[0]? REINICIAR: CANCELAR;
lcd.print(fill_string_ws(text_info[text_info_idx], 20, 3));
}else
lcd.print(fill_string_ws("", 20));
break;
case MENU_VALORES_DE_FABRICA:
if(menu_edition == UPDATE){
text_info_idx = setup_var[0]? RESTAURAR: CANCELAR;
lcd.print(fill_string_ws(text_info[text_info_idx], 20, 3));
}else
lcd.print(fill_string_ws("", 20));
break;
}
/*
// Limpiamos línea de proceso
if(menu_edition == UPDATE){
lcd.setCursor(0, 2);
lcd.print(fill_string_ws("", 20));
lcd.setCursor(0, 3);
lcd.print(fill_string_ws("", 20));
}
*/
}
void print_lcd_datetime()
{
/*
lcd.setCursor(0, 0);
lcd.print(myTimer_lite.getHora());
lcd.setCursor(10, 0);
lcd.print(myTimer_lite.getFecha());
*/
}
void print_lcd_process()
{
lcd.setCursor(0, 3);
if(myTimer_lite.getTimerDetenido() != true){
// Estado del Temporizador
lcd.print(fill_string_ws(timer_text[myTimer_lite.getPeriodo()], 12));
// Tiempo del periodo del temporizador
lcd.print(fill_string_ws(seg_to_string(myTimer_lite.getRestantePeriodoSeg()), 8));
}else{
if(millis() >= blink_millis)
blink_millis = millis() + (BLINK_MILLIS * 2);
if(blink_millis - millis() >= BLINK_MILLIS)
lcd.print(fill_string_ws(timer_text[0], 11));
}
}
void setCursor_lcd_menu()
{
if(menu_edition == UPDATE){
switch(menu_section){
case MENU_T_ESPERA_INICIAL:
// Posicionamos el cursos, para la edición
if(menu_cursor_var == POSITION_ONE)
lcd.setCursor(6, 2);
else if(menu_cursor_var == POSITION_TWO)
lcd.setCursor(9, 2);
break;
case MENU_T_ARRANQUE:
case MENU_T_ARRANQUE_ESPERA:
case MENU_T_ENCENDIDO:
case MENU_T_ENCENDIDO_ESPERA:
// Posicionamos el cursos, para la edición
if(menu_cursor_var == POSITION_ONE)
lcd.setCursor(3, 2);
else if(menu_cursor_var == POSITION_TWO)
lcd.setCursor(6, 2);
else if(menu_cursor_var == POSITION_THREE)
lcd.setCursor(9, 2);
break;
case MENU_FECHA_Y_HORA:
// Posicionamos el cursos, para la edición
if(menu_cursor_var == POSITION_ONE)
lcd.setCursor(0, 2);
else if(menu_cursor_var == POSITION_TWO)
lcd.setCursor(3, 2);
else if(menu_cursor_var == POSITION_THREE)
lcd.setCursor(6, 2);
else if(menu_cursor_var == POSITION_FOUR)
lcd.setCursor(10, 2);
else if(menu_cursor_var == POSITION_FIVE)
lcd.setCursor(13, 2);
else if(menu_cursor_var == POSITION_SIX)
lcd.setCursor(16, 2);
break;
case MENU_DETENER_PROCESO:
case MENU_REANUDAR_PROCESO:
case MENU_REINICIAR_EQUIPO:
case MENU_VALORES_DE_FABRICA:
lcd.setCursor(3, 2);
break;
}
lcd.cursor();
}
}
/**************************************************
* Setup / Loop
**************************************************/
void setup() {
pinMode(SETTINGS_BUTTONS_PIN, INPUT_PULLUP);
// Salida Serial
serialBegin(9600);
serialBeginWhile();
// Iniciamos la pantalla
lcd.begin(20, 4);
lcd.setCursor(0, 0);
lcd.print("DIKEN INTERNATIONAL");
myTimer_lite.initialize();
//myTimer_lite.setFechaHoraSistema();
}
void loop() {
myTimer_lite.process_loop();
loop_panel_buttons();
loop_screen_rendering();
}

View File

@ -0,0 +1,13 @@
# Contribution Guidelines
This library is the culmination of the expertise of many members of the open source community who have dedicated their time and hard work. The best way to ask for help or propose a new idea is to [create a new issue](https://github.com/NorthernWidget/DS3231/issues/new) while creating a Pull Request with your code changes allows you to share your own innovations with the rest of the community.
The following are some guidelines to observe when creating issues or PRs:
- Be friendly; it is important that we can all enjoy a safe space as we are all working on the same project and it is okay for people to have different ideas
- [Use code blocks](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code); it helps us help you when we can read your code! On that note also refrain from pasting more than 30 lines of code in a post, instead [create a gist](https://gist.github.com/) if you need to share large snippets
- Use reasonable titles; refrain from using overly long or capitalized titles as they are usually annoying and do little to encourage others to help :smile:
- Be detailed; refrain from mentioning code problems without sharing your source code and always give information regarding your board and version of the library.

747
libraries/DS3231/DS3231.cpp Normal file
View File

@ -0,0 +1,747 @@
/*
DS3231.cpp: DS3231 Real-Time Clock library
Eric Ayars
4/1/11
Spliced in DateTime all-at-once reading (to avoid rollover) and unix time
from Jean-Claude Wippler and Limor Fried
Andy Wickert
5/15/11
Fixed problem with SD processors(no function call) by replacing all occurences of the term PM, which
is defined as a macro on SAMD controllers by PM_time.
Simon Gassner
11/28/2017
Fixed setting 12-hour clock in setHour function so that 12:xx AM is not stored as 00:xx and corrected
the setting of the PM flag for 12:xx PM. These address certain DS3231 errors in properly setting the
AM/PM (bit 5) flag in the 02h register when passing from AM to PM and PM to AM.
David Merrifield
04/14/2020
Released into the public domain.
*/
#include <DS3231.h>
// These included for the DateTime class inclusion; will try to find a way to
// not need them in the future...
#if defined(__AVR__)
#include <avr/pgmspace.h>
#elif defined(ESP8266)
#include <pgmspace.h>
#endif
// Changed the following to work on 1.0
//#include "WProgram.h"
#include <Arduino.h>
#define CLOCK_ADDRESS 0x68
#define SECONDS_FROM_1970_TO_2000 946684800
// Constructor
DS3231::DS3231() {
// nothing to do for this constructor.
}
// Utilities from JeeLabs/Ladyada
////////////////////////////////////////////////////////////////////////////////
// utility code, some of this could be exposed in the DateTime API if needed
// DS3231 is smart enough to know this, but keeping it for now so I don't have
// to rewrite their code. -ADW
static const uint8_t daysInMonth [] PROGMEM = { 31,28,31,30,31,30,31,31,30,31,30,31 };
// number of days since 2000/01/01, valid for 2001..2099
static uint16_t date2days(uint16_t y, uint8_t m, uint8_t d) {
if (y >= 2000)
y -= 2000;
uint16_t days = d;
for (uint8_t i = 1; i < m; ++i)
days += pgm_read_byte(daysInMonth + i - 1);
if (m > 2 && isleapYear(y))
++days;
return days + 365 * y + (y + 3) / 4 - 1;
}
static long time2long(uint16_t days, uint8_t h, uint8_t m, uint8_t s) {
return ((days * 24L + h) * 60 + m) * 60 + s;
}
/*****************************************
Public Functions
*****************************************/
/*******************************************************************************
* TO GET ALL DATE/TIME INFORMATION AT ONCE AND AVOID THE CHANCE OF ROLLOVER
* DateTime implementation spliced in here from Jean-Claude Wippler's (JeeLabs)
* RTClib, as modified by Limor Fried (Ladyada); source code at:
* https://github.com/adafruit/RTClib
******************************************************************************/
////////////////////////////////////////////////////////////////////////////////
// DateTime implementation - ignores time zones and DST changes
// NOTE: also ignores leap seconds, see http://en.wikipedia.org/wiki/Leap_second
DateTime::DateTime (uint32_t t) {
t -= SECONDS_FROM_1970_TO_2000; // bring to 2000 timestamp from 1970
ss = t % 60;
t /= 60;
mm = t % 60;
t /= 60;
hh = t % 24;
uint16_t days = t / 24;
uint8_t leap;
for (yOff = 0; ; ++yOff) {
leap = isleapYear(yOff);
if (days < 365 + leap)
break;
days -= 365 + leap;
}
for (m = 1; ; ++m) {
uint8_t daysPerMonth = pgm_read_byte(daysInMonth + m - 1);
if (leap && m == 2)
++daysPerMonth;
if (days < daysPerMonth)
break;
days -= daysPerMonth;
}
d = days + 1;
}
DateTime::DateTime (uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t min, uint8_t sec) {
if (year >= 2000)
year -= 2000;
yOff = year;
m = month;
d = day;
hh = hour;
mm = min;
ss = sec;
}
// supported formats are date "Mmm dd yyyy" and time "hh:mm:ss" (same as __DATE__ and __TIME__)
DateTime::DateTime(const char* date, const char* time) {
static const char month_names[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
static const char buff[4]={'0','0','0','0'};
int y;
sscanf(date, "%s %d %d", buff, &d, &y);
yOff = y >= 2000 ? y - 2000 : y;
m = (strstr(month_names, buff) - month_names) / 3 + 1;
sscanf(time, "%d:%d:%d", &hh, &mm, &ss);
}
static uint8_t conv2d(const char* p) {
uint8_t v = 0;
if ('0' <= *p && *p <= '9')
v = *p - '0';
return 10 * v + *++p - '0';
}
// UNIX time: IS CORRECT ONLY WHEN SET TO UTC!!!
uint32_t DateTime::unixtime(void) const {
uint32_t t;
uint16_t days = date2days(yOff, m, d);
t = time2long(days, hh, mm, ss);
t += SECONDS_FROM_1970_TO_2000; // seconds from 1970 to 2000
return t;
}
// Slightly modified from JeeLabs / Ladyada
// Get all date/time at once to avoid rollover (e.g., minute/second don't match)
static uint8_t bcd2bin (uint8_t val) { return val - 6 * (val >> 4); }
static uint8_t bin2bcd (uint8_t val) { return val + 6 * (val / 10); }
bool isleapYear(const uint8_t y) {
if(y&3)//check if divisible by 4
return false;
//only check other, when first failed
return (y % 100 || y % 400 == 0);
}
DateTime RTClib::now() {
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0); // This is the first register address (Seconds)
// We'll read from here on for 7 bytes: secs reg, minutes reg, hours, days, months and years.
Wire.endTransmission();
Wire.requestFrom(CLOCK_ADDRESS, 7);
uint8_t ss = bcd2bin(Wire.read() & 0x7F);
uint8_t mm = bcd2bin(Wire.read());
uint8_t hh = bcd2bin(Wire.read());
Wire.read();
uint8_t d = bcd2bin(Wire.read());
uint8_t m = bcd2bin(Wire.read());
uint16_t y = bcd2bin(Wire.read()) + 2000;
return DateTime (y, m, d, hh, mm, ss);
}
///// ERIC'S ORIGINAL CODE FOLLOWS /////
byte DS3231::getSecond() {
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x00);
Wire.endTransmission();
Wire.requestFrom(CLOCK_ADDRESS, 1);
return bcdToDec(Wire.read());
}
byte DS3231::getMinute() {
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x01);
Wire.endTransmission();
Wire.requestFrom(CLOCK_ADDRESS, 1);
return bcdToDec(Wire.read());
}
byte DS3231::getHour(bool& h12, bool& PM_time) {
byte temp_buffer;
byte hour;
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x02);
Wire.endTransmission();
Wire.requestFrom(CLOCK_ADDRESS, 1);
temp_buffer = Wire.read();
h12 = temp_buffer & 0b01000000;
if (h12) {
PM_time = temp_buffer & 0b00100000;
hour = bcdToDec(temp_buffer & 0b00011111);
} else {
hour = bcdToDec(temp_buffer & 0b00111111);
}
return hour;
}
byte DS3231::getDoW() {
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x03);
Wire.endTransmission();
Wire.requestFrom(CLOCK_ADDRESS, 1);
return bcdToDec(Wire.read());
}
byte DS3231::getDate() {
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x04);
Wire.endTransmission();
Wire.requestFrom(CLOCK_ADDRESS, 1);
return bcdToDec(Wire.read());
}
byte DS3231::getMonth(bool& Century) {
byte temp_buffer;
byte hour;
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x05);
Wire.endTransmission();
Wire.requestFrom(CLOCK_ADDRESS, 1);
temp_buffer = Wire.read();
Century = temp_buffer & 0b10000000;
return (bcdToDec(temp_buffer & 0b01111111)) ;
}
byte DS3231::getYear() {
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x06);
Wire.endTransmission();
Wire.requestFrom(CLOCK_ADDRESS, 1);
return bcdToDec(Wire.read());
}
void DS3231::setSecond(byte Second) {
// Sets the seconds
// This function also resets the Oscillator Stop Flag, which is set
// whenever power is interrupted.
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x00);
Wire.write(decToBcd(Second));
Wire.endTransmission();
// Clear OSF flag
byte temp_buffer = readControlByte(1);
writeControlByte((temp_buffer & 0b01111111), 1);
}
void DS3231::setMinute(byte Minute) {
// Sets the minutes
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x01);
Wire.write(decToBcd(Minute));
Wire.endTransmission();
}
// Following setHour revision by David Merrifield 4/14/2020 correcting handling of 12-hour clock
void DS3231::setHour(byte Hour) {
// Sets the hour, without changing 12/24h mode.
// The hour must be in 24h format.
bool h12;
byte temp_hour;
// Start by figuring out what the 12/24 mode is
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x02);
Wire.endTransmission();
Wire.requestFrom(CLOCK_ADDRESS, 1);
h12 = (Wire.read() & 0b01000000);
// if h12 is true, it's 12h mode; false is 24h.
if (h12) {
// 12 hour
bool am_pm = (Hour > 11);
temp_hour = Hour;
if (temp_hour > 11) {
temp_hour = temp_hour - 12;
}
if (temp_hour == 0) {
temp_hour = 12;
}
temp_hour = decToBcd(temp_hour) | (am_pm << 5) | 0b01000000;
} else {
// 24 hour
temp_hour = decToBcd(Hour) & 0b10111111;
}
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x02);
Wire.write(temp_hour);
Wire.endTransmission();
}
void DS3231::setDoW(byte DoW) {
// Sets the Day of Week
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x03);
Wire.write(decToBcd(DoW));
Wire.endTransmission();
}
void DS3231::setDate(byte Date) {
// Sets the Date
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x04);
Wire.write(decToBcd(Date));
Wire.endTransmission();
}
void DS3231::setMonth(byte Month) {
// Sets the month
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x05);
Wire.write(decToBcd(Month));
Wire.endTransmission();
}
void DS3231::setYear(byte Year) {
// Sets the year
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x06);
Wire.write(decToBcd(Year));
Wire.endTransmission();
}
void DS3231::setClockMode(bool h12) {
// sets the mode to 12-hour (true) or 24-hour (false).
// One thing that bothers me about how I've written this is that
// if the read and right happen at the right hourly millisecnd,
// the clock will be set back an hour. Not sure how to do it better,
// though, and as long as one doesn't set the mode frequently it's
// a very minimal risk.
// It's zero risk if you call this BEFORE setting the hour, since
// the setHour() function doesn't change this mode.
byte temp_buffer;
// Start by reading byte 0x02.
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x02);
Wire.endTransmission();
Wire.requestFrom(CLOCK_ADDRESS, 1);
temp_buffer = Wire.read();
// Set the flag to the requested value:
if (h12) {
temp_buffer = temp_buffer | 0b01000000;
} else {
temp_buffer = temp_buffer & 0b10111111;
}
// Write the byte
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x02);
Wire.write(temp_buffer);
Wire.endTransmission();
}
float DS3231::getTemperature() {
// Checks the internal thermometer on the DS3231 and returns the
// temperature as a floating-point value.
// Updated / modified a tiny bit from "Coding Badly" and "Tri-Again"
// http://forum.arduino.cc/index.php/topic,22301.0.html
byte tMSB, tLSB;
float temp3231;
// temp registers (11h-12h) get updated automatically every 64s
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x11);
Wire.endTransmission();
Wire.requestFrom(CLOCK_ADDRESS, 2);
// Should I do more "if available" checks here?
if(Wire.available()) {
tMSB = Wire.read(); //2's complement int portion
tLSB = Wire.read(); //fraction portion
int16_t itemp = ( tMSB << 8 | (tLSB & 0xC0) ); // Shift upper byte, add lower
temp3231 = ( (float)itemp / 256.0 ); // Scale and return
}
else {
temp3231 = -9999; // Impossible temperature; error value
}
return temp3231;
}
void DS3231::getA1Time(byte& A1Day, byte& A1Hour, byte& A1Minute, byte& A1Second, byte& AlarmBits, bool& A1Dy, bool& A1h12, bool& A1PM) {
byte temp_buffer;
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x07);
Wire.endTransmission();
Wire.requestFrom(CLOCK_ADDRESS, 4);
temp_buffer = Wire.read(); // Get A1M1 and A1 Seconds
A1Second = bcdToDec(temp_buffer & 0b01111111);
// put A1M1 bit in position 0 of DS3231_AlarmBits.
AlarmBits = AlarmBits | (temp_buffer & 0b10000000)>>7;
temp_buffer = Wire.read(); // Get A1M2 and A1 minutes
A1Minute = bcdToDec(temp_buffer & 0b01111111);
// put A1M2 bit in position 1 of DS3231_AlarmBits.
AlarmBits = AlarmBits | (temp_buffer & 0b10000000)>>6;
temp_buffer = Wire.read(); // Get A1M3 and A1 Hour
// put A1M3 bit in position 2 of DS3231_AlarmBits.
AlarmBits = AlarmBits | (temp_buffer & 0b10000000)>>5;
// determine A1 12/24 mode
A1h12 = temp_buffer & 0b01000000;
if (A1h12) {
A1PM = temp_buffer & 0b00100000; // determine am/pm
A1Hour = bcdToDec(temp_buffer & 0b00011111); // 12-hour
} else {
A1Hour = bcdToDec(temp_buffer & 0b00111111); // 24-hour
}
temp_buffer = Wire.read(); // Get A1M4 and A1 Day/Date
// put A1M3 bit in position 3 of DS3231_AlarmBits.
AlarmBits = AlarmBits | (temp_buffer & 0b10000000)>>4;
// determine A1 day or date flag
A1Dy = (temp_buffer & 0b01000000)>>6;
if (A1Dy) {
// alarm is by day of week, not date.
A1Day = bcdToDec(temp_buffer & 0b00001111);
} else {
// alarm is by date, not day of week.
A1Day = bcdToDec(temp_buffer & 0b00111111);
}
}
void DS3231::getA2Time(byte& A2Day, byte& A2Hour, byte& A2Minute, byte& AlarmBits, bool& A2Dy, bool& A2h12, bool& A2PM) {
byte temp_buffer;
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x0b);
Wire.endTransmission();
Wire.requestFrom(CLOCK_ADDRESS, 3);
temp_buffer = Wire.read(); // Get A2M2 and A2 Minutes
A2Minute = bcdToDec(temp_buffer & 0b01111111);
// put A2M2 bit in position 4 of DS3231_AlarmBits.
AlarmBits = AlarmBits | (temp_buffer & 0b10000000)>>3;
temp_buffer = Wire.read(); // Get A2M3 and A2 Hour
// put A2M3 bit in position 5 of DS3231_AlarmBits.
AlarmBits = AlarmBits | (temp_buffer & 0b10000000)>>2;
// determine A2 12/24 mode
A2h12 = temp_buffer & 0b01000000;
if (A2h12) {
A2PM = temp_buffer & 0b00100000; // determine am/pm
A2Hour = bcdToDec(temp_buffer & 0b00011111); // 12-hour
} else {
A2Hour = bcdToDec(temp_buffer & 0b00111111); // 24-hour
}
temp_buffer = Wire.read(); // Get A2M4 and A1 Day/Date
// put A2M4 bit in position 6 of DS3231_AlarmBits.
AlarmBits = AlarmBits | (temp_buffer & 0b10000000)>>1;
// determine A2 day or date flag
A2Dy = (temp_buffer & 0b01000000)>>6;
if (A2Dy) {
// alarm is by day of week, not date.
A2Day = bcdToDec(temp_buffer & 0b00001111);
} else {
// alarm is by date, not day of week.
A2Day = bcdToDec(temp_buffer & 0b00111111);
}
}
void DS3231::setA1Time(byte A1Day, byte A1Hour, byte A1Minute, byte A1Second, byte AlarmBits, bool A1Dy, bool A1h12, bool A1PM) {
// Sets the alarm-1 date and time on the DS3231, using A1* information
byte temp_buffer;
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x07); // A1 starts at 07h
// Send A1 second and A1M1
Wire.write(decToBcd(A1Second) | ((AlarmBits & 0b00000001) << 7));
// Send A1 Minute and A1M2
Wire.write(decToBcd(A1Minute) | ((AlarmBits & 0b00000010) << 6));
// Figure out A1 hour
if (A1h12) {
// Start by converting existing time to h12 if it was given in 24h.
if (A1Hour > 12) {
// well, then, this obviously isn't a h12 time, is it?
A1Hour = A1Hour - 12;
A1PM = true;
}
if (A1PM) {
// Afternoon
// Convert the hour to BCD and add appropriate flags.
temp_buffer = decToBcd(A1Hour) | 0b01100000;
} else {
// Morning
// Convert the hour to BCD and add appropriate flags.
temp_buffer = decToBcd(A1Hour) | 0b01000000;
}
} else {
// Now for 24h
temp_buffer = decToBcd(A1Hour);
}
temp_buffer = temp_buffer | ((AlarmBits & 0b00000100)<<5);
// A1 hour is figured out, send it
Wire.write(temp_buffer);
// Figure out A1 day/date and A1M4
temp_buffer = ((AlarmBits & 0b00001000)<<4) | decToBcd(A1Day);
if (A1Dy) {
// Set A1 Day/Date flag (Otherwise it's zero)
temp_buffer = temp_buffer | 0b01000000;
}
Wire.write(temp_buffer);
// All done!
Wire.endTransmission();
}
void DS3231::setA2Time(byte A2Day, byte A2Hour, byte A2Minute, byte AlarmBits, bool A2Dy, bool A2h12, bool A2PM) {
// Sets the alarm-2 date and time on the DS3231, using A2* information
byte temp_buffer;
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(0x0b); // A1 starts at 0bh
// Send A2 Minute and A2M2
Wire.write(decToBcd(A2Minute) | ((AlarmBits & 0b00010000) << 3));
// Figure out A2 hour
if (A2h12) {
// Start by converting existing time to h12 if it was given in 24h.
if (A2Hour > 12) {
// well, then, this obviously isn't a h12 time, is it?
A2Hour = A2Hour - 12;
A2PM = true;
}
if (A2PM) {
// Afternoon
// Convert the hour to BCD and add appropriate flags.
temp_buffer = decToBcd(A2Hour) | 0b01100000;
} else {
// Morning
// Convert the hour to BCD and add appropriate flags.
temp_buffer = decToBcd(A2Hour) | 0b01000000;
}
} else {
// Now for 24h
temp_buffer = decToBcd(A2Hour);
}
// add in A2M3 bit
temp_buffer = temp_buffer | ((AlarmBits & 0b00100000)<<2);
// A2 hour is figured out, send it
Wire.write(temp_buffer);
// Figure out A2 day/date and A2M4
temp_buffer = ((AlarmBits & 0b01000000)<<1) | decToBcd(A2Day);
if (A2Dy) {
// Set A2 Day/Date flag (Otherwise it's zero)
temp_buffer = temp_buffer | 0b01000000;
}
Wire.write(temp_buffer);
// All done!
Wire.endTransmission();
}
void DS3231::turnOnAlarm(byte Alarm) {
// turns on alarm number "Alarm". Defaults to 2 if Alarm is not 1.
byte temp_buffer = readControlByte(0);
// modify control byte
if (Alarm == 1) {
temp_buffer = temp_buffer | 0b00000101;
} else {
temp_buffer = temp_buffer | 0b00000110;
}
writeControlByte(temp_buffer, 0);
}
void DS3231::turnOffAlarm(byte Alarm) {
// turns off alarm number "Alarm". Defaults to 2 if Alarm is not 1.
// Leaves interrupt pin alone.
byte temp_buffer = readControlByte(0);
// modify control byte
if (Alarm == 1) {
temp_buffer = temp_buffer & 0b11111110;
} else {
temp_buffer = temp_buffer & 0b11111101;
}
writeControlByte(temp_buffer, 0);
}
bool DS3231::checkAlarmEnabled(byte Alarm) {
// Checks whether the given alarm is enabled.
byte result = 0x0;
byte temp_buffer = readControlByte(0);
if (Alarm == 1) {
result = temp_buffer & 0b00000001;
} else {
result = temp_buffer & 0b00000010;
}
return result;
}
bool DS3231::checkIfAlarm(byte Alarm) {
// Checks whether alarm 1 or alarm 2 flag is on, returns T/F accordingly.
// Turns flag off, also.
// defaults to checking alarm 2, unless Alarm == 1.
byte result;
byte temp_buffer = readControlByte(1);
if (Alarm == 1) {
// Did alarm 1 go off?
result = temp_buffer & 0b00000001;
// clear flag
temp_buffer = temp_buffer & 0b11111110;
} else {
// Did alarm 2 go off?
result = temp_buffer & 0b00000010;
// clear flag
temp_buffer = temp_buffer & 0b11111101;
}
writeControlByte(temp_buffer, 1);
return result;
}
void DS3231::enableOscillator(bool TF, bool battery, byte frequency) {
// turns oscillator on or off. True is on, false is off.
// if battery is true, turns on even for battery-only operation,
// otherwise turns off if Vcc is off.
// frequency must be 0, 1, 2, or 3.
// 0 = 1 Hz
// 1 = 1.024 kHz
// 2 = 4.096 kHz
// 3 = 8.192 kHz (Default if frequency byte is out of range)
if (frequency > 3) frequency = 3;
// read control byte in, but zero out current state of RS2 and RS1.
byte temp_buffer = readControlByte(0) & 0b11100111;
if (battery) {
// turn on BBSQW flag
temp_buffer = temp_buffer | 0b01000000;
} else {
// turn off BBSQW flag
temp_buffer = temp_buffer & 0b10111111;
}
if (TF) {
// set ~EOSC to 0 and INTCN to zero.
temp_buffer = temp_buffer & 0b01111011;
} else {
// set ~EOSC to 1, leave INTCN as is.
temp_buffer = temp_buffer | 0b10000000;
}
// shift frequency into bits 3 and 4 and set.
frequency = frequency << 3;
temp_buffer = temp_buffer | frequency;
// And write the control bits
writeControlByte(temp_buffer, 0);
}
void DS3231::enable32kHz(bool TF) {
// turn 32kHz pin on or off
byte temp_buffer = readControlByte(1);
if (TF) {
// turn on 32kHz pin
temp_buffer = temp_buffer | 0b00001000;
} else {
// turn off 32kHz pin
temp_buffer = temp_buffer & 0b11110111;
}
writeControlByte(temp_buffer, 1);
}
bool DS3231::oscillatorCheck() {
// Returns false if the oscillator has been off for some reason.
// If this is the case, the time is probably not correct.
byte temp_buffer = readControlByte(1);
bool result = true;
if (temp_buffer & 0b10000000) {
// Oscillator Stop Flag (OSF) is set, so return false.
result = false;
}
return result;
}
/*****************************************
Private Functions
*****************************************/
byte DS3231::decToBcd(byte val) {
// Convert normal decimal numbers to binary coded decimal
return ( (val/10*16) + (val%10) );
}
byte DS3231::bcdToDec(byte val) {
// Convert binary coded decimal to normal decimal numbers
return ( (val/16*10) + (val%16) );
}
byte DS3231::readControlByte(bool which) {
// Read selected control byte
// first byte (0) is 0x0e, second (1) is 0x0f
Wire.beginTransmission(CLOCK_ADDRESS);
if (which) {
// second control byte
Wire.write(0x0f);
} else {
// first control byte
Wire.write(0x0e);
}
Wire.endTransmission();
Wire.requestFrom(CLOCK_ADDRESS, 1);
return Wire.read();
}
void DS3231::writeControlByte(byte control, bool which) {
// Write the selected control byte.
// which=false -> 0x0e, true->0x0f.
Wire.beginTransmission(CLOCK_ADDRESS);
if (which) {
Wire.write(0x0f);
} else {
Wire.write(0x0e);
}
Wire.write(control);
Wire.endTransmission();
}

188
libraries/DS3231/DS3231.h Normal file
View File

@ -0,0 +1,188 @@
/*
* DS3231.h
*
* Arduino Library for the DS3231 Real-Time Clock chip
*
* (c) Eric Ayars
* 4/1/11
* released into the public domain. If you use this, please let me know
* (just out of pure curiosity!) by sending me an email:
* eric@ayars.org
*
*/
// Modified by Andy Wickert 5/15/11: Spliced in stuff from RTClib
// Modified by Simon Gassner 11/28/2017: Changed Term "PM" to "PM_time" for compability with SAMD Processors
#ifndef DS3231_h
#define DS3231_h
// Changed the following to work on 1.0
//#include "WProgram.h"
#include <Arduino.h>
#include <Wire.h>
// DateTime (get everything at once) from JeeLabs / Adafruit
// Simple general-purpose date/time class (no TZ / DST / leap second handling!)
class DateTime {
public:
DateTime (uint32_t t =0);
DateTime (uint16_t year, uint8_t month, uint8_t day,
uint8_t hour =0, uint8_t min =0, uint8_t sec =0);
DateTime (const char* date, const char* time);
uint16_t year() const { return 2000 + yOff; }
uint8_t month() const { return m; }
uint8_t day() const { return d; }
uint8_t hour() const { return hh; }
uint8_t minute() const { return mm; }
uint8_t second() const { return ss; }
uint8_t dayOfTheWeek() const;
// 32-bit times as seconds since 1/1/2000
long secondstime() const;
// 32-bit times as seconds since 1/1/1970
// THE ABOVE COMMENT IS CORRECT FOR LOCAL TIME; TO USE THIS COMMAND TO
// OBTAIN TRUE UNIX TIME SINCE EPOCH, YOU MUST CALL THIS COMMAND AFTER
// SETTING YOUR CLOCK TO UTC
uint32_t unixtime(void) const;
protected:
uint8_t yOff, m, d, hh, mm, ss;
};
//checks if a year is a leap year
bool isleapYear(const uint8_t);
class RTClib {
public:
// Get date and time snapshot
static DateTime now();
};
// Eric's original code is everything below this line
class DS3231 {
public:
//Constructor
DS3231();
// Time-retrieval functions
// the get*() functions retrieve current values of the registers.
byte getSecond();
byte getMinute();
byte getHour(bool& h12, bool& PM_time);
// In addition to returning the hour register, this function
// returns the values of the 12/24-hour flag and the AM/PM flag.
byte getDoW();
byte getDate();
byte getMonth(bool& Century);
// Also sets the flag indicating century roll-over.
byte getYear();
// Last 2 digits only
// Time-setting functions
// Note that none of these check for sensibility: You can set the
// date to July 42nd and strange things will probably result.
void setSecond(byte Second);
// In addition to setting the seconds, this clears the
// "Oscillator Stop Flag".
void setMinute(byte Minute);
// Sets the minute
void setHour(byte Hour);
// Sets the hour
void setDoW(byte DoW);
// Sets the Day of the Week (1-7);
void setDate(byte Date);
// Sets the Date of the Month
void setMonth(byte Month);
// Sets the Month of the year
void setYear(byte Year);
// Last two digits of the year
void setClockMode(bool h12);
// Set 12/24h mode. True is 12-h, false is 24-hour.
// Temperature function
float getTemperature();
// Alarm functions
void getA1Time(byte& A1Day, byte& A1Hour, byte& A1Minute, byte& A1Second, byte& AlarmBits, bool& A1Dy, bool& A1h12, bool& A1PM);
/* Retrieves everything you could want to know about alarm
* one.
* A1Dy true makes the alarm go on A1Day = Day of Week,
* A1Dy false makes the alarm go on A1Day = Date of month.
*
* byte AlarmBits sets the behavior of the alarms:
* Dy A1M4 A1M3 A1M2 A1M1 Rate
* X 1 1 1 1 Once per second
* X 1 1 1 0 Alarm when seconds match
* X 1 1 0 0 Alarm when min, sec match
* X 1 0 0 0 Alarm when hour, min, sec match
* 0 0 0 0 0 Alarm when date, h, m, s match
* 1 0 0 0 0 Alarm when DoW, h, m, s match
*
* Dy A2M4 A2M3 A2M2 Rate
* X 1 1 1 Once per minute (at seconds = 00)
* X 1 1 0 Alarm when minutes match
* X 1 0 0 Alarm when hours and minutes match
* 0 0 0 0 Alarm when date, hour, min match
* 1 0 0 0 Alarm when DoW, hour, min match
*/
void getA2Time(byte& A2Day, byte& A2Hour, byte& A2Minute, byte& AlarmBits, bool& A2Dy, bool& A2h12, bool& A2PM);
// Same as getA1Time();, but A2 only goes on seconds == 00.
void setA1Time(byte A1Day, byte A1Hour, byte A1Minute, byte A1Second, byte AlarmBits, bool A1Dy, bool A1h12, bool A1PM);
// Set the details for Alarm 1
void setA2Time(byte A2Day, byte A2Hour, byte A2Minute, byte AlarmBits, bool A2Dy, bool A2h12, bool A2PM);
// Set the details for Alarm 2
void turnOnAlarm(byte Alarm);
// Enables alarm 1 or 2 and the external interrupt pin.
// If Alarm != 1, it assumes Alarm == 2.
void turnOffAlarm(byte Alarm);
// Disables alarm 1 or 2 (default is 2 if Alarm != 1);
// and leaves the interrupt pin alone.
bool checkAlarmEnabled(byte Alarm);
// Returns T/F to indicate whether the requested alarm is
// enabled. Defaults to 2 if Alarm != 1.
bool checkIfAlarm(byte Alarm);
// Checks whether the indicated alarm (1 or 2, 2 default);
// has been activated.
// Oscillator functions
void enableOscillator(bool TF, bool battery, byte frequency);
// turns oscillator on or off. True is on, false is off.
// if battery is true, turns on even for battery-only operation,
// otherwise turns off if Vcc is off.
// frequency must be 0, 1, 2, or 3.
// 0 = 1 Hz
// 1 = 1.024 kHz
// 2 = 4.096 kHz
// 3 = 8.192 kHz (Default if frequency byte is out of range);
void enable32kHz(bool TF);
// Turns the 32kHz output pin on (true); or off (false).
bool oscillatorCheck();;
// Checks the status of the OSF (Oscillator Stop Flag);.
// If this returns false, then the clock is probably not
// giving you the correct time.
// The OSF is cleared by function setSecond();.
private:
byte decToBcd(byte val);
// Convert normal decimal numbers to binary coded decimal
byte bcdToDec(byte val);
// Convert binary coded decimal to normal decimal numbers
protected:
byte readControlByte(bool which);
// Read selected control byte: (0); reads 0x0e, (1) reads 0x0f
void writeControlByte(byte control, bool which);
// Write the selected control byte.
// which == false -> 0x0e, true->0x0f.
};
#endif

Binary file not shown.

24
libraries/DS3231/LICENSE Normal file
View File

@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
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 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.
For more information, please refer to <http://unlicense.org/>

121
libraries/DS3231/README.md Normal file
View File

@ -0,0 +1,121 @@
# DS3231
## Description
Arduino library for the DS3231 real-time clock (RTC). Abstracts functionality for clock reading, clock setting, and alarms for the DS3231 high-precision real-time clock. This is a splice of [Ayars'](http://hacks.ayars.org/2011/04/ds3231-real-time-clock.html) and [Jeelabs/Ladyada's](https://github.com/adafruit/RTClib) libraries.
## Installation
### First Method
![image](https://user-images.githubusercontent.com/36513474/68038497-eae68200-fceb-11e9-9812-b47ff6e06e2f.png)
1. In the Arduino IDE, navigate to Sketch > Include Library > Manage Libraries
1. Then the Library Manager will open and you will find a list of libraries that are already installed or ready for installation.
1. Then search for DS3231 using the search bar.
1. Click on the text area and then select the specific version and install it.
### Second Method
1. Navigate to the [Releases page](https://github.com/NorthernWidget/DS3231/releases).
1. Download the latest release.
1. Extract the zip file
1. In the Arduino IDE, navigate to Sketch > Include Library > Add .ZIP Library
## Requirements
This library depends on the wire header file. To use this library functions, the user has to include **wire.h** (header) file.
## Features
- ### Easy Interface
DS3231 library has a very easy to use interface
- ### Low-cost
DS3231 is a low-cost module
- ### Accuracy
DS3231 is an extremely accurate I2C realtime clock (RTC) with an integrated temperature-compensated crystal oscillator (TCXO) and crystal.
- ### Time Fomat
The clock operates in either the 24-hour or 12-hour format with an AM/PM indicator.
- ### Information
The RTC maintains seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year.
## Functions
- date2days()
- time2long()
- conv2d()
- unixtime()
- bcd2bin()
- bin2bcd()
- now()
- getSecond()
- getMinute()
- getHour()
- getDoW()
- getDate()
- getMonth()
- getYear()
- setSecond()
- setMinute()
- setHour()
- setDoW()
- setDate()
- setMonth()
- setYear()
- setClockMode()
- getTemperature()
- getA1Time()
- getA2Time()
- setA1Time()
- setA2Time()
- turnOnAlarm()
- turnOffAlarm()
- checkAlarmEnabled()
- checkIfAlarm()
- enableOscillator()
- enable32kHz()
- oscillatorCheck()
- decToBcd()
- bcdToDec()
- readControlByte()
- writeControlByte()
## Example
There are many examples implemented where this library is used. You can find other examples from [Github-DS3231](https://github.com/NorthernWidget/DS3231/tree/master/examples)
## Contributing
If you want to contribute to this project:
- Report bugs and errors
- Ask for enhancements
- Create issues and pull requests
- Tell others about this library
- Contribute new protocols
Please read [CONTRIBUTING.md](https://github.com/NorthernWidget/DS3231/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Credits
The authors of this library are A. Wickert <awickert@umn.edu>, E. Ayars, J. C. Wippler, N. W. LLC <info@northernwidget.com> and it is maintained by A. Wickert. This library is released into the public domain by Jeelabs, Ladyada, and E. Ayar.
Based on previous work by:
- S. T. Andersen
- SimGas
- Per1234
- Glownt
## License
DS3231 is licensed under [The Unlicense](https://github.com/NorthernWidget/DS3231/blob/master/LICENSE).

View File

@ -0,0 +1,38 @@
/*
oscillator_test.pde
Eric Ayars
4/11
Test/demo of oscillator routines for a DS3231 RTC.
Use a scope after loading this to check if things are
working as they should.
*/
#include <DS3231.h>
#include <Wire.h>
DS3231 Clock;
byte j;
bool on = false;
void setup() {
// Start the I2C interface
Wire.begin();
// Start the serial interface
Serial.begin(9600);
}
void loop() {
for (j=0;j<4;j++) {
// invert state of 32kHz oscillator.
on = !on;
Clock.enable32kHz(on);
// Turn on oscillator pin, frequency j
Clock.enableOscillator(true, false, j);
delay(4000);
}
// So... The 32kHz oscillator (pin 1) will turn on or off once each 2s,
// and the oscillator out pin (pin 3) will cycle through frequencies.
}

View File

@ -0,0 +1,113 @@
/*
DS3231_set.pde
Eric Ayars
4/11
Test of set-time routines for a DS3231 RTC
*/
#include <DS3231.h>
#include <Wire.h>
DS3231 Clock;
byte Year;
byte Month;
byte Date;
byte DoW;
byte Hour;
byte Minute;
byte Second;
void GetDateStuff(byte& Year, byte& Month, byte& Day, byte& DoW,
byte& Hour, byte& Minute, byte& Second) {
// Call this if you notice something coming in on
// the serial port. The stuff coming in should be in
// the order YYMMDDwHHMMSS, with an 'x' at the end.
boolean GotString = false;
char InChar;
byte Temp1, Temp2;
char InString[20];
byte j=0;
while (!GotString) {
if (Serial.available()) {
InChar = Serial.read();
InString[j] = InChar;
j += 1;
if (InChar == 'x') {
GotString = true;
}
}
}
Serial.println(InString);
// Read Year first
Temp1 = (byte)InString[0] -48;
Temp2 = (byte)InString[1] -48;
Year = Temp1*10 + Temp2;
// now month
Temp1 = (byte)InString[2] -48;
Temp2 = (byte)InString[3] -48;
Month = Temp1*10 + Temp2;
// now date
Temp1 = (byte)InString[4] -48;
Temp2 = (byte)InString[5] -48;
Day = Temp1*10 + Temp2;
// now Day of Week
DoW = (byte)InString[6] - 48;
// now Hour
Temp1 = (byte)InString[7] -48;
Temp2 = (byte)InString[8] -48;
Hour = Temp1*10 + Temp2;
// now Minute
Temp1 = (byte)InString[9] -48;
Temp2 = (byte)InString[10] -48;
Minute = Temp1*10 + Temp2;
// now Second
Temp1 = (byte)InString[11] -48;
Temp2 = (byte)InString[12] -48;
Second = Temp1*10 + Temp2;
}
void setup() {
// Start the serial port
Serial.begin(9600);
// Start the I2C interface
Wire.begin();
}
void loop() {
// If something is coming in on the serial line, it's
// a time correction so set the clock accordingly.
if (Serial.available()) {
GetDateStuff(Year, Month, Date, DoW, Hour, Minute, Second);
Clock.setClockMode(false); // set to 24h
//setClockMode(true); // set to 12h
Clock.setYear(Year);
Clock.setMonth(Month);
Clock.setDate(Date);
Clock.setDoW(DoW);
Clock.setHour(Hour);
Clock.setMinute(Minute);
Clock.setSecond(Second);
// Test of alarm functions
// set A1 to one minute past the time we just set the clock
// on current day of week.
Clock.setA1Time(DoW, Hour, Minute+1, Second, 0x0, true,
false, false);
// set A2 to two minutes past, on current day of month.
Clock.setA2Time(Date, Hour, Minute+2, 0x0, false, false,
false);
// Turn on both alarms, with external interrupt
Clock.turnOnAlarm(1);
Clock.turnOnAlarm(2);
}
delay(1000);
}

View File

@ -0,0 +1,157 @@
/*
DS3231_test.pde
Eric Ayars
4/11
Test/demo of read routines for a DS3231 RTC.
Turn on the serial monitor after loading this to check if things are
working as they should.
*/
#include <DS3231.h>
#include <Wire.h>
DS3231 clock;
bool century = false;
bool h12Flag;
bool pmFlag;
byte alarmDay, alarmHour, alarmMinute, alarmSecond, alarmBits;
bool alarmDy, alarmH12Flag, alarmPmFlag;
void setup() {
// Start the I2C interface
Wire.begin();
// Start the serial interface
Serial.begin(57600);
}
void loop() {
// send what's going on to the serial monitor.
// Start with the year
Serial.print("2");
if (century) { // Won't need this for 89 years.
Serial.print("1");
} else {
Serial.print("0");
}
Serial.print(clock.getYear(), DEC);
Serial.print(' ');
// then the month
Serial.print(clock.getMonth(century), DEC);
Serial.print(" ");
// then the date
Serial.print(clock.getDate(), DEC);
Serial.print(" ");
// and the day of the week
Serial.print(clock.getDoW(), DEC);
Serial.print(" ");
// Finally the hour, minute, and second
Serial.print(clock.getHour(h12Flag, pmFlag), DEC);
Serial.print(" ");
Serial.print(clock.getMinute(), DEC);
Serial.print(" ");
Serial.print(clock.getSecond(), DEC);
// Add AM/PM indicator
if (h12Flag) {
if (pmFlag) {
Serial.print(" PM ");
} else {
Serial.print(" AM ");
}
} else {
Serial.print(" 24h ");
}
// Display the temperature
Serial.print("T=");
Serial.print(clock.getTemperature(), 2);
// Tell whether the time is (likely to be) valid
if (clock.oscillatorCheck()) {
Serial.print(" O+");
} else {
Serial.print(" O-");
}
// Indicate whether an alarm went off
if (clock.checkIfAlarm(1)) {
Serial.print(" A1!");
}
if (clock.checkIfAlarm(2)) {
Serial.print(" A2!");
}
// New line on display
Serial.println();
// Display Alarm 1 information
Serial.print("Alarm 1: ");
clock.getA1Time(alarmDay, alarmHour, alarmMinute, alarmSecond, alarmBits, alarmDy, alarmH12Flag, alarmPmFlag);
Serial.print(alarmDay, DEC);
if (alarmDy) {
Serial.print(" DoW");
} else {
Serial.print(" Date");
}
Serial.print(' ');
Serial.print(alarmHour, DEC);
Serial.print(' ');
Serial.print(alarmMinute, DEC);
Serial.print(' ');
Serial.print(alarmSecond, DEC);
Serial.print(' ');
if (alarmH12Flag) {
if (alarmPmFlag) {
Serial.print("pm ");
} else {
Serial.print("am ");
}
}
if (clock.checkAlarmEnabled(1)) {
Serial.print("enabled");
}
Serial.println();
// Display Alarm 2 information
Serial.print("Alarm 2: ");
clock.getA2Time(alarmDay, alarmHour, alarmMinute, alarmBits, alarmDy, alarmH12Flag, alarmPmFlag);
Serial.print(alarmDay, DEC);
if (alarmDy) {
Serial.print(" DoW");
} else {
Serial.print(" Date");
}
Serial.print(" ");
Serial.print(alarmHour, DEC);
Serial.print(" ");
Serial.print(alarmMinute, DEC);
Serial.print(" ");
if (alarmH12Flag) {
if (alarmPmFlag) {
Serial.print("pm");
} else {
Serial.print("am");
}
}
if (clock.checkAlarmEnabled(2)) {
Serial.print("enabled");
}
// display alarm bits
Serial.println();
Serial.print("Alarm bits: ");
Serial.println(alarmBits, BIN);
Serial.println();
delay(1000);
}

View File

@ -0,0 +1,51 @@
/*
Prints time stamps for 5 seconds using getXXX functions
Based on DS3231_set.pde
by Eric Ayars
4/11
Added printing back of time stamps and increased baud rate
(to better synchronize computer and RTC)
Andy Wickert
5/15/2011
*/
#include <DS3231.h>
#include <Wire.h>
DS3231 clock;
bool century = false;
bool h12Flag;
bool pmFlag;
void setup() {
// Start the serial port
Serial.begin(57600);
// Start the I2C interface
Wire.begin();
for (int i=0; i<5; i++){
delay(1000);
Serial.print(clock.getYear(), DEC);
Serial.print("-");
Serial.print(clock.getMonth(century), DEC);
Serial.print("-");
Serial.print(clock.getDate(), DEC);
Serial.print(" ");
Serial.print(clock.getHour(h12Flag, pmFlag), DEC); //24-hr
Serial.print(":");
Serial.print(clock.getMinute(), DEC);
Serial.print(":");
Serial.println(clock.getSecond(), DEC);
}
}
void loop() {
}

View File

@ -0,0 +1,40 @@
// now.pde
// Prints a snapshot of the current date and time along with the UNIX time
// Modified by Andy Wickert from the JeeLabs / Ladyada RTC library examples
// 5/15/11
#include <Wire.h>
#include <DS3231.h>
RTClib myRTC;
void setup () {
Serial.begin(57600);
Wire.begin();
}
void loop () {
delay(1000);
DateTime now = myRTC.now();
Serial.print(now.year(), DEC);
Serial.print('/');
Serial.print(now.month(), DEC);
Serial.print('/');
Serial.print(now.day(), DEC);
Serial.print(' ');
Serial.print(now.hour(), DEC);
Serial.print(':');
Serial.print(now.minute(), DEC);
Serial.print(':');
Serial.print(now.second(), DEC);
Serial.println();
Serial.print(" since midnight 1/1/1970 = ");
Serial.print(now.unixtime());
Serial.print("s = ");
Serial.print(now.unixtime() / 86400L);
Serial.println("d");
}

View File

@ -0,0 +1,182 @@
/*
Sets the time from input and prints back time stamps for 5 seconds
Based on DS3231_set.pde
by Eric Ayars
4/11
Added printing back of time stamps and increased baud rate
(to better synchronize computer and RTC)
Andy Wickert
5/15/2011
Clean for SAMD arch, add explanation, respect code-style and
fix interpretation of Serial input if used more than once
Olivier Staquet
4/26/2020
*/
#include <DS3231.h>
#include <Wire.h>
DS3231 clock;
byte year;
byte month;
byte date;
byte dow;
byte hour;
byte minute;
byte second;
bool century = false;
bool h12Flag;
bool pmFlag;
/*****************************************************************************************************
* Setup
* - Open Serial and Wire connection
* - Explain to the user how to use the program
*****************************************************************************************************/
void setup() {
// Start the serial port
Serial.begin(57600);
// Start the I2C interface
Wire.begin();
// Request the time correction on the Serial
delay(4000);
Serial.println("Format YYMMDDwhhmmssx");
Serial.println("Where YY = Year (ex. 20 for 2020)");
Serial.println(" MM = Month (ex. 04 for April)");
Serial.println(" DD = Day of month (ex. 09 for 9th)");
Serial.println(" w = Day of week from 1 to 7, 1 = Sunday (ex. 5 for Thursday)");
Serial.println(" hh = hours in 24h format (ex. 09 for 9AM or 21 for 9PM)");
Serial.println(" mm = minutes (ex. 02)");
Serial.println(" ss = seconds (ex. 42)");
Serial.println("Example for input : 2004095090242x");
Serial.println("-----------------------------------------------------------------------------");
Serial.println("Please enter the current time to set on DS3231 ended by 'x':");
}
/*****************************************************************************************************
* Loop
* - Each time we receive the time correction on the Serial
* - Set the clock of the DS3231
* - Echo the value from the DS3231 during 5 seconds
*****************************************************************************************************/
void loop() {
// If something is coming in on the serial line, it's
// a time correction so set the clock accordingly.
if (Serial.available()) {
inputDateFromSerial();
clock.setClockMode(false); // set to 24h
clock.setYear(year);
clock.setMonth(month);
clock.setDate(date);
clock.setDoW(dow);
clock.setHour(hour);
clock.setMinute(minute);
clock.setSecond(second);
// Give time at next five seconds
for (uint8_t i = 0; i < 5; i++){
delay(1000);
Serial.print(clock.getYear(), DEC);
Serial.print("-");
Serial.print(clock.getMonth(century), DEC);
Serial.print("-");
Serial.print(clock.getDate(), DEC);
Serial.print(" ");
Serial.print(clock.getHour(h12Flag, pmFlag), DEC); //24-hr
Serial.print(":");
Serial.print(clock.getMinute(), DEC);
Serial.print(":");
Serial.println(clock.getSecond(), DEC);
}
// Notify that we are ready for the next input
Serial.println("Please enter the current time to set on DS3231 ended by 'x':");
}
delay(1000);
}
/*****************************************************************************************************
* inputDateFromSerial
* - Read and interpret the data from the Serial input
* - Store the data in global variables
*****************************************************************************************************/
void inputDateFromSerial() {
// Call this if you notice something coming in on
// the serial port. The stuff coming in should be in
// the order YYMMDDwHHMMSS, with an 'x' at the end.
boolean isStrComplete = false;
char inputChar;
byte temp1, temp2;
char inputStr[20];
uint8_t currentPos = 0;
while (!isStrComplete) {
if (Serial.available()) {
inputChar = Serial.read();
inputStr[currentPos] = inputChar;
currentPos += 1;
// Check if string complete (end with "x")
if (inputChar == 'x') {
isStrComplete = true;
}
}
}
Serial.println(inputStr);
// Find the end of char "x"
int posX = -1;
for(uint8_t i = 0; i < 20; i++) {
if(inputStr[i] == 'x') {
posX = i;
break;
}
}
// Consider 0 character in ASCII
uint8_t zeroAscii = '0';
// Read Year first
temp1 = (byte)inputStr[posX - 13] - zeroAscii;
temp2 = (byte)inputStr[posX - 12] - zeroAscii;
year = temp1 * 10 + temp2;
// now month
temp1 = (byte)inputStr[posX - 11] - zeroAscii;
temp2 = (byte)inputStr[posX - 10] - zeroAscii;
month = temp1 * 10 + temp2;
// now date
temp1 = (byte)inputStr[posX - 9] - zeroAscii;
temp2 = (byte)inputStr[posX - 8] - zeroAscii;
date = temp1 * 10 + temp2;
// now Day of Week
dow = (byte)inputStr[posX - 7] - zeroAscii;
// now Hour
temp1 = (byte)inputStr[posX - 6] - zeroAscii;
temp2 = (byte)inputStr[posX - 5] - zeroAscii;
hour = temp1 * 10 + temp2;
// now Minute
temp1 = (byte)inputStr[posX - 4] - zeroAscii;
temp2 = (byte)inputStr[posX - 3] - zeroAscii;
minute = temp1 * 10 + temp2;
// now Second
temp1 = (byte)inputStr[posX - 2] - zeroAscii;
temp2 = (byte)inputStr[posX - 1] - zeroAscii;
second = temp1 * 10 + temp2;
}

View File

@ -0,0 +1,33 @@
DS3231 KEYWORD1
RTClib KEYWORD1
DateTime KEYWORD1
now KEYWORD2
secondstime KEYWORD2
unixtime KEYWORD2
getSecond KEYWORD2
getMinute KEYWORD2
getHour KEYWORD2
getDoW KEYWORD2
getDate KEYWORD2
getMonth KEYWORD2
getYear KEYWORD2
setSecond KEYWORD2
setMinute KEYWORD2
setHour KEYWORD2
setDoW KEYWORD2
setDate KEYWORD2
setMonth KEYWORD2
setYear KEYWORD2
setClockMode KEYWORD2
getTemperature KEYWORD2
getA1Time KEYWORD2
getA2Time KEYWORD2
setA1Time KEYWORD2
setA2Time KEYWORD2
turnOnAlarm KEYWORD2
turnOffAlarm KEYWORD2
checkAlarmEnabled KEYWORD2
checkIfAlarm KEYWORD2
enableOscillator KEYWORD2
enable32kHz KEYWORD2
oscillatorCheck KEYWORD2

View File

@ -0,0 +1,10 @@
name=DS3231
version=1.0.7
author=Andrew Wickert <awickert@umn.edu>, Eric Ayars, Jean-Claude Wippler, Northern Widget LLC <info@northernwidget.com>
maintainer=Andrew Wickert <awickert@umn.edu>
sentence=Arduino library for the DS3231 real-time clock (RTC)
paragraph=Abstracts functionality for clock reading, clock setting, and alarms for the DS3231 high-precision real-time clock. This is a splice of Ayars' (http://hacks.ayars.org/2011/04/ds3231-real-time-clock.html) and Jeelabs/Ladyada's (https://github.com/adafruit/RTClib) libraries.
category=Timing
url=https://github.com/NorthernWidget/DS3231
architectures=*
includes=DS3231.h

View File

@ -0,0 +1,267 @@
// ---------------------------------------------------------------------------
// Created by Florian Fida on 20/01/12
// Copyright 2012 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
// http://creativecommons.org/licenses/by-sa/3.0/
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
// ---------------------------------------------------------------------------
// fio_shiftOut1 functions are based on Shif1 protocol developed by Roman Black
// (http://www.romanblack.com/shift1.htm)
//
// Thread Safe: No
// Extendable: Yes
//
// @file FastIO.h
// This file implements basic fast IO routines.
//
// @brief
//
// @version API 1.0.0
//
// @author Florian Fida -
//
// 2012-03-16 bperrybap updated fio_shiftout() to be smaller & faster
//
// @todo:
// support chipkit:
// (https://github.com/chipKIT32/chipKIT32-MAX/blob/master/hardware/pic32/
// cores/pic32/wiring_digital.c)
// ---------------------------------------------------------------------------
#include "FastIO.h"
fio_register fio_pinToOutputRegister(uint8_t pin, uint8_t initial_state)
{
pinMode(pin, OUTPUT);
if(initial_state != SKIP)
{
digitalWrite(pin, initial_state); // also turns off pwm timer
}
#ifdef FIO_FALLBACK
// just wasting memory if not using fast io...
return 0;
#else
return portOutputRegister(digitalPinToPort(pin));
#endif
}
fio_register fio_pinToInputRegister(uint8_t pin)
{
pinMode(pin, INPUT);
digitalWrite(pin, LOW); // also turns off pwm timer and pullup
#ifdef FIO_FALLBACK
// just wasting memory if not using fast io...
return 0;
#else
return portInputRegister(digitalPinToPort(pin));
#endif
}
fio_bit fio_pinToBit(uint8_t pin)
{
#ifdef FIO_FALLBACK
// (ab)use the bit variable to store the pin
return pin;
#else
return digitalPinToBitMask(pin);
#endif
}
void fio_digitalWrite(fio_register pinRegister, fio_bit pinBit, uint8_t value)
{
#ifdef FIO_FALLBACK
digitalWrite(pinBit, value);
#else
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
if(value == LOW)
{
fio_digitalWrite_LOW(pinRegister,pinBit);
}
else
{
fio_digitalWrite_HIGH(pinRegister,pinBit);
}
}
#endif
}
int fio_digitalRead(fio_register pinRegister, uint8_t pinBit)
{
#ifdef FIO_FALLBACK
return digitalRead (pinBit);
#else
if (*pinRegister & pinBit)
{
return HIGH;
}
return LOW;
#endif
}
void fio_shiftOut (fio_register dataRegister, fio_bit dataBit,
fio_register clockRegister, fio_bit clockBit,
uint8_t value, uint8_t bitOrder)
{
// # disable interrupts
int8_t i;
if(bitOrder == LSBFIRST)
{
for(i = 0; i < 8; i++)
{
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
if(value & 1)
{
fio_digitalWrite_HIGH(dataRegister, dataBit);
}
else
{
fio_digitalWrite_LOW(dataRegister, dataBit);
}
value >>= 1;
fio_digitalWrite_HIGH (clockRegister, clockBit);
fio_digitalWrite_LOW (clockRegister,clockBit);
}
}
}
else
{
for(i = 0; i < 8; i++)
{
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
if(value & 0x80)
{
fio_digitalWrite_HIGH(dataRegister, dataBit);
}
else
{
fio_digitalWrite_LOW(dataRegister, dataBit);
}
value <<= 1;
fio_digitalWrite_HIGH (clockRegister, clockBit);
fio_digitalWrite_LOW (clockRegister,clockBit);
}
}
}
}
void fio_shiftOut(fio_register dataRegister, fio_bit dataBit,
fio_register clockRegister, fio_bit clockBit)
{
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
// shift out 0x0 (B00000000) fast, byte order is irrelevant
fio_digitalWrite_LOW (dataRegister, dataBit);
for(uint8_t i = 0; i<8; ++i)
{
fio_digitalWrite_HIGH (clockRegister, clockBit);
fio_digitalWrite_SWITCH (clockRegister, clockBit);
}
}
}
void fio_shiftOut1_init(uint8_t pin)
{
fio_shiftOut1_init(fio_pinToOutputRegister(pin,HIGH),fio_pinToBit(pin));
}
void fio_shiftOut1_init(fio_register shift1Register, fio_bit shift1Bit)
{
// Make sure that capacitors are charged
// 300us is an educated guess...
fio_digitalWrite(shift1Register,shift1Bit,HIGH);
delayMicroseconds(300);
}
void fio_shiftOut1(fio_register shift1Register, fio_bit shift1Bit, uint8_t value,
boolean noLatch)
{
/*
* this function are based on Shif1 protocol developed by Roman Black
* (http://www.romanblack.com/shift1.htm)
*
* test sketches:
* http://pastebin.com/raw.php?i=2hnC9v2Z
* http://pastebin.com/raw.php?i=bGg4DhXQ
* http://pastebin.com/raw.php?i=tg1ZFiM5
* http://pastebin.com/raw.php?i=93ExPDD3 - cascading
* tested with:
* TPIC6595N - seems to work fine (circuit: http://www.3guys1laser.com/
* arduino-one-wire-shift-register-prototype)
* 7HC595N
*/
// iterate but ignore last bit (is it correct now?)
for(int8_t i = 7; i>=0; --i)
{
// assume that pin is HIGH (smokin' pot all day... :) - requires
// initialization
if(value & _BV(i))
{
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
// HIGH = 1 Bit
fio_digitalWrite_SWITCHTO(shift1Register,shift1Bit,LOW);
//hold pin LOW for 1us - done! :)
fio_digitalWrite_SWITCHTO(shift1Register,shift1Bit,HIGH);
} // end critical section
//hold pin HIGH for 15us
delayMicroseconds(15);
}
else
{
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
// LOW = 0 Bit
fio_digitalWrite_SWITCHTO(shift1Register,shift1Bit,LOW);
// hold pin LOW for 15us
delayMicroseconds(15);
fio_digitalWrite_SWITCHTO(shift1Register,shift1Bit,HIGH);
} // end critical section
// hold pin HIGH for 30us
delayMicroseconds(30);
}
if(!noLatch && i==1)
{
break;
}
}
if(!noLatch)
{
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
// send last bit (=LOW) and Latch command
fio_digitalWrite_SWITCHTO(shift1Register,shift1Bit,LOW);
} // end critical section
delayMicroseconds(199); // Hold pin low for 200us
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
fio_digitalWrite_HIGH(shift1Register,shift1Bit);
} // end critical section
delayMicroseconds(299); // Hold pin high for 300us and leave it that
// way - using explicit HIGH here, just in case.
}
}
void fio_shiftOut1(uint8_t pin, uint8_t value, boolean noLatch)
{
fio_shiftOut1(fio_pinToOutputRegister(pin, SKIP),fio_pinToBit(pin),value, noLatch);
}

View File

@ -0,0 +1,219 @@
// ---------------------------------------------------------------------------
// Created by Florian Fida on 20/01/12
// Copyright 2012 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
// http://creativecommons.org/licenses/by-sa/3.0/
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
// ---------------------------------------------------------------------------
// fio_shiftOut1 functions are based on Shif1 protocol developed by Roman Black
// (http://www.romanblack.com/shift1.htm)
//
// Thread Safe: No
// Extendable: Yes
//
// @file FastIO.h
// This file implements basic fast IO routines.
//
// @brief
//
// @version API 1.0.0
//
// @author Florian Fida -
// 2012-03-16 bperrybap mods for chipkit32 (pic32) Arduino
// support chipkit:
// (https://github.com/chipKIT32/chipKIT32-MAX/blob/master/hardware/pic32/
// cores/pic32/wiring_digital.c)
// ---------------------------------------------------------------------------
#ifndef _FAST_IO_H_
#define _FAST_IO_H_
#if (ARDUINO < 100)
#include <WProgram.h>
#else
#include <Arduino.h>
#endif
#include <pins_arduino.h> // pleasing sanguino core
#include <inttypes.h>
#define SKIP 0x23
#if defined (__AVR__)
#include <util/atomic.h> // for critical section management
typedef uint8_t fio_bit;
typedef volatile uint8_t *fio_register;
#elif defined(__PIC32MX__)
typedef uint32_t fio_bit;
typedef volatile uint32_t *fio_register;
#else
// fallback to Arduino standard digital i/o routines
#define FIO_FALLBACK
#define ATOMIC_BLOCK(dummy) if(true)
#define ATOMIC_RESTORESTATE
typedef uint8_t fio_bit;
typedef uint8_t fio_register;
#endif
#if !defined(FIO_FALLBACK) && !defined(ATOMIC_BLOCK)
/*
* Define an ATOMIC_BLOCK that implements ATOMIC_FORCEON type
* Using the portable Arduino interrupts() and noInterrupts()
*/
#define ATOMIC_RESTORESTATE ATOMIC_FORCEON // sorry, no support for save/restore yet.
#define ATOMIC_FORCEON uint8_t sreg_save \
__attribute__((__cleanup__(__iSeiParam))) = 0
static __inline__ uint8_t __iCliRetVal(void)
{
noInterrupts();
return(1);
}
static __inline__ void __iSeiParam(const uint8_t *__s)
{
interrupts();
}
#define ATOMIC_BLOCK(type) for(type, __Todo = __iCliRetVal(); __Todo; __Todo = 0)
#endif // end of block to create compatible ATOMIC_BLOCK()
/*!
@function
@abstract Get the output register for specified pin.
@discussion if fast digital IO is disabled this function returns NULL
@param pin[in] Number of a digital pin
@result Register
*/
fio_register fio_pinToOutputRegister(uint8_t pin, uint8_t initial_state = LOW);
/*!
@function
@abstract Get the input register for specified pin.
@discussion if fast digital IO is disabled this function returns NULL
@param pin[in] Number of a digital pin
@result Register
*/
fio_register fio_pinToInputRegister(uint8_t pin);
/*!
@function
@abstract Find the bit which belongs to specified pin
@discussion if fast digitalWrite is disabled this function returns the pin
@param pin[in] Number of a digital pin
@result Bit
*/
fio_bit fio_pinToBit(uint8_t pin);
/*!
@method
@abstract direct digital write
@discussion without any checks
@discussion falls back to normal digitalWrite if fast io is disabled
@param pinRegister[in] Register - ignored if fast digital write is disabled
@param pinBit[in] Bit - Pin if fast digital write is disabled
@param value[in] desired output
*/
// __attribute__ ((always_inline)) /* let the optimizer decide that for now */
void fio_digitalWrite ( fio_register pinRegister, fio_bit pinBit, uint8_t value );
/**
* This is where the magic happens that makes things fast.
* Implemented as preprocessor directives to force inlining
* SWITCH is fast for FIO but probably slow for FIO_FALLBACK so SWITCHTO is recommended if the value is known.
*/
#ifndef FIO_FALLBACK
#define fio_digitalWrite_LOW(reg,bit) *reg &= ~bit
#define fio_digitalWrite_HIGH(reg,bit) *reg |= bit
#define fio_digitalWrite_SWITCH(reg,bit) *reg ^= bit
#define fio_digitalWrite_SWITCHTO(reg,bit,val) fio_digitalWrite_SWITCH(reg,bit)
#else
// reg -> dummy NULL, bit -> pin
#define fio_digitalWrite_HIGH(reg,bit) digitalWrite(bit,HIGH)
#define fio_digitalWrite_LOW(reg,bit) digitalWrite(bit,LOW)
#define fio_digitalWrite_SWITCH(reg,bit) digitalWrite(bit, !digitalRead(bit))
#define fio_digitalWrite_SWITCHTO(reg,bit,val) digitalWrite(bit,val);
#endif
/*!
@function
@abstract direct digital read
@discussion without any checks
@discussion falls back to normal digitalRead if fast io is disabled
@param pinRegister[in] Register - ignored if fast io is disabled
@param pinBit[in] Bit - Pin if fast io is disabled
@result Value read from pin
*/
int fio_digitalRead ( fio_register pinRegister, fio_bit pinBit );
/*!
@method
@abstract faster shift out
@discussion using fast digital write
@discussion falls back to normal digitalWrite if fastio is disabled
@param dataRegister[in] Register of data pin - ignored if fast digital write is disabled
@param dataBit[in] Bit of data pin - Pin if fast digital write is disabled
@param clockRegister[in] Register of data pin - ignored if fast digital write is disabled
@param clockBit[in] Bit of data pin - Pin if fast digital write is disabled
@param bitOrder[in] bit order
*/
void fio_shiftOut( fio_register dataRegister, fio_bit dataBit, fio_register clockRegister,
fio_bit clockBit, uint8_t value, uint8_t bitOrder );
/*!
@method
@abstract faster shift out clear
@discussion using fast digital write
@discussion falls back to normal digitalWrite if fastio is disabled
@param dataRegister[in] Register of data pin - ignored if fast digital write is disabled
@param dataBit[in] Bit of data pin - Pin if fast digital write is disabled
@param clockRegister[in] Register of data pin - ignored if fast digital write is disabled
@param clockBit[in] Bit of data pin - Pin if fast digital write is disabled
*/
void fio_shiftOut(fio_register dataRegister, fio_bit dataBit, fio_register clockRegister, fio_bit clockBit);
/*!
* @method
* @abstract one wire shift out
* @discussion protocol needs initialisation (fio_shiftOut1_init)
* @param shift1Register[in] pins register
* @param shift1Bit[in] pins bit
* @param value[in] value to shift out, last byte is ignored and always shifted out LOW
*/
void fio_shiftOut1(fio_register shift1Register, fio_bit shift1Bit, uint8_t value, boolean noLatch = false);
/*!
* @method
* @abstract one wire shift out
* @discussion protocol needs initialisation (fio_shiftOut1_init)
* @param pin[in] digital pin
* @param value[in] value to shift out, last byte is ignored and always shifted out LOW
*/
void fio_shiftOut1(uint8_t pin, uint8_t value, boolean noLatch = false);
/*!
* @method
* @abstract initializes one wire shift out protocol
* @discussion Puts pin to HIGH state and delays until Capacitors are charged.
* @param shift1Register[in] pins register
* @param shift1Bit[in] pins bit
*/
void fio_shiftOut1_init(fio_register shift1Register, fio_bit shift1Bit);
/*!
* @method
* @abstract initializes one wire shift out protocol
* @discussion Puts pin to HIGH state and delays until Capacitors are charged.
* @param pin[in] digital pin
*/
void fio_shiftOut1_init(uint8_t pin);
#endif // FAST_IO_H

View File

@ -0,0 +1,198 @@
// ---------------------------------------------------------------------------
// Created by Francisco Malpartida on 20/08/11.
// Copyright 2011 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
//
// Thread Safe: No
// Extendable: Yes
//
// @file I2CIO.h
// This file implements a basic IO library using the PCF8574 I2C IO Expander
// chip.
//
// @brief
// Implement a basic IO library to drive the PCF8574* I2C IO Expander ASIC.
// The library implements basic IO general methods to configure IO pin direction
// read and write uint8_t operations and basic pin level routines to set or read
// a particular IO port.
//
//
// @version API 1.0.0
//
// @author F. Malpartida - fmalpartida@gmail.com
// ---------------------------------------------------------------------------
#if (ARDUINO < 100)
#include <WProgram.h>
#else
#include <Arduino.h>
#endif
#include <inttypes.h>
#include <Wire.h>
#include "I2CIO.h"
// CLASS VARIABLES
// ---------------------------------------------------------------------------
// CONSTRUCTOR
// ---------------------------------------------------------------------------
I2CIO::I2CIO ( )
{
_i2cAddr = 0x0;
_dirMask = 0xFF; // mark all as INPUTs
_shadow = 0x0; // no values set
_initialised = false;
}
// PUBLIC METHODS
// ---------------------------------------------------------------------------
//
// begin
int I2CIO::begin ( uint8_t i2cAddr )
{
_i2cAddr = i2cAddr;
Wire.begin ( );
_initialised = Wire.requestFrom ( _i2cAddr, (uint8_t)1 );
#if (ARDUINO < 100)
_shadow = Wire.receive ();
#else
_shadow = Wire.read (); // Remove the byte read don't need it.
#endif
return ( _initialised );
}
//
// pinMode
void I2CIO::pinMode ( uint8_t pin, uint8_t dir )
{
if ( _initialised )
{
if ( OUTPUT == dir )
{
_dirMask &= ~( 1 << pin );
}
else
{
_dirMask |= ( 1 << pin );
}
}
}
//
// portMode
void I2CIO::portMode ( uint8_t dir )
{
if ( _initialised )
{
if ( dir == INPUT )
{
_dirMask = 0xFF;
}
else
{
_dirMask = 0x00;
}
}
}
//
// read
uint8_t I2CIO::read ( void )
{
uint8_t retVal = 0;
if ( _initialised )
{
Wire.requestFrom ( _i2cAddr, (uint8_t)1 );
#if (ARDUINO < 100)
retVal = ( _dirMask & Wire.receive ( ) );
#else
retVal = ( _dirMask & Wire.read ( ) );
#endif
}
return ( retVal );
}
//
// write
int I2CIO::write ( uint8_t value )
{
int status = 0;
if ( _initialised )
{
// Only write HIGH the values of the ports that have been initialised as
// outputs updating the output shadow of the device
_shadow = ( value & ~(_dirMask) );
Wire.beginTransmission ( _i2cAddr );
#if (ARDUINO < 100)
Wire.send ( _shadow );
#else
Wire.write ( _shadow );
#endif
status = Wire.endTransmission ();
}
return ( (status == 0) );
}
//
// digitalRead
uint8_t I2CIO::digitalRead ( uint8_t pin )
{
uint8_t pinVal = 0;
// Check if initialised and that the pin is within range of the device
// -------------------------------------------------------------------
if ( ( _initialised ) && ( pin <= 7 ) )
{
// Remove the values which are not inputs and get the value of the pin
pinVal = this->read() & _dirMask;
pinVal = ( pinVal >> pin ) & 0x01; // Get the pin value
}
return (pinVal);
}
//
// digitalWrite
int I2CIO::digitalWrite ( uint8_t pin, uint8_t level )
{
uint8_t writeVal;
int status = 0;
// Check if initialised and that the pin is within range of the device
// -------------------------------------------------------------------
if ( ( _initialised ) && ( pin <= 7 ) )
{
// Only write to HIGH the port if the port has been configured as
// an OUTPUT pin. Add the new state of the pin to the shadow
writeVal = ( 1 << pin ) & ~_dirMask;
if ( level == HIGH )
{
_shadow |= writeVal;
}
else
{
_shadow &= ~writeVal;
}
status = this->write ( _shadow );
}
return ( status );
}
//
// PRIVATE METHODS
// ---------------------------------------------------------------------------

View File

@ -0,0 +1,148 @@
// ---------------------------------------------------------------------------
// Created by Francisco Malpartida on 20/08/11.
// Copyright 2011 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
//
// Thread Safe: No
// Extendable: Yes
//
// @file I2CIO.h
// This file implements a basic IO library using the PCF8574 I2C IO Expander
// chip.
//
// @brief
// Implement a basic IO library to drive the PCF8574* I2C IO Expander ASIC.
// The library implements basic IO general methods to configure IO pin direction
// read and write uint8_t operations and basic pin level routines to set or read
// a particular IO port.
//
// @version API 1.0.0
//
// @author F. Malpartida - fmalpartida@gmail.com
// ---------------------------------------------------------------------------
#ifndef _I2CIO_H_
#define _I2CIO_H_
#include <inttypes.h>
#define _I2CIO_VERSION "1.0.0"
/*!
@class
@abstract I2CIO
@discussion Library driver to control PCF8574 based ASICs. Implementing
library calls to set/get port through I2C bus.
*/
class I2CIO
{
public:
/*!
@method
@abstract Constructor method
@discussion Class constructor constructor.
*/
I2CIO ( );
/*!
@method
@abstract Initializes the device.
@discussion This method initializes the device allocating an I2C address.
This method is the first method that should be call prior to calling any
other method form this class. On initialization all pins are configured
as INPUT on the device.
@param i2cAddr: I2C Address where the device is located.
@result 1 if the device was initialized correctly, 0 otherwise
*/
int begin ( uint8_t i2cAddr );
/*!
@method
@abstract Sets the mode of a particular pin.
@discussion Sets the mode of a particular pin to INPUT, OUTPUT. digitalWrite
has no effect on pins which are not declared as output.
@param pin[in] Pin from the I2C IO expander to be configured. Range 0..7
@param dir[in] Pin direction (INPUT, OUTPUT).
*/
void pinMode ( uint8_t pin, uint8_t dir );
/*!
@method
@abstract Sets all the pins of the device in a particular direction.
@discussion This method sets all the pins of the device in a particular
direction. This method is useful to set all the pins of the device to be
either inputs or outputs.
@param dir[in] Direction of all the pins of the device (INPUT, OUTPUT).
*/
void portMode ( uint8_t dir );
/*!
@method
@abstract Reads all the pins of the device that are configured as INPUT.
@discussion Reads from the device the status of the pins that are configured
as INPUT. During initialization all pins are configured as INPUTs by default.
Please refer to pinMode or portMode.
@param none
*/
uint8_t read ( void );
/*!
@method
@abstract Read a pin from the device.
@discussion Reads a particular pin from the device. To read a particular
pin it has to be configured as INPUT. During initialization all pins are
configured as INPUTs by default. Please refer to pinMode or portMode.
@param pin[in] Pin from the port to read its status. Range (0..7)
@result Returns the pin status (HIGH, LOW) if the pin is configured
as an output, reading its value will always return LOW regardless of its
real state.
*/
uint8_t digitalRead ( uint8_t pin );
/*!
@method
@abstract Write a value to the device.
@discussion Writes to a set of pins in the device. The value is the binary
representation of all the pins in device. The value written is masked with
the configuration of the direction of the pins; to change the state of
a particular pin with this method, such pin has to be configured as OUTPUT
using the portMode or pinMode methods. If no pins have been configured as
OUTPUTs this method will have no effect.
@param value[in] value to be written to the device.
@result 1 on success, 0 otherwise
*/
int write ( uint8_t value );
/*!
@method
@abstract Writes a digital level to a particular pin.
@discussion Write a level to the indicated pin of the device. For this
method to have effect, the pin has to be configured as OUTPUT using the
pinMode or portMode methods.
@param pin[in] device pin to change level. Range (0..7).
@para level[in] logic level to set the pin at (HIGH, LOW).
@result 1 on success, 0 otherwise.
*/
int digitalWrite ( uint8_t pin, uint8_t level );
private:
uint8_t _shadow; // Shadow output
uint8_t _dirMask; // Direction mask
uint8_t _i2cAddr; // I2C address
bool _initialised; // Initialised object
};
#endif

View File

@ -0,0 +1,347 @@
// ---------------------------------------------------------------------------
// Created by Francisco Malpartida on 20/08/11.
// Copyright 2011 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
//
// Thread Safe: No
// Extendable: Yes
//
// @file LCD.cpp
// This file implements a basic liquid crystal library that comes as standard
// in the Arduino SDK.
//
// @brief
// This is a basic implementation of the HD44780 library of the
// Arduino SDK. This library is a refactored version of the one supplied
// in the Arduino SDK in such a way that it simplifies its extension
// to support other mechanism to communicate to LCDs such as I2C, Serial, SR, ...
// The original library has been reworked in such a way that this will be
// the base class implementing all generic methods to command an LCD based
// on the Hitachi HD44780 and compatible chipsets.
//
// This base class is a pure abstract class and needs to be extended. As reference,
// it has been extended to drive 4 and 8 bit mode control, LCDs and I2C extension
// backpacks such as the I2CLCDextraIO using the PCF8574* I2C IO Expander ASIC.
//
//
// @version API 1.1.0
//
// 2012.03.29 bperrybap - changed comparision to use LCD_5x8DOTS rather than 0
// @author F. Malpartida - fmalpartida@gmail.com
// ---------------------------------------------------------------------------
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#if (ARDUINO < 100)
#include <WProgram.h>
#else
#include <Arduino.h>
#endif
#include "LCD.h"
// CLASS CONSTRUCTORS
// ---------------------------------------------------------------------------
// Constructor
LCD::LCD ()
{
}
// PUBLIC METHODS
// ---------------------------------------------------------------------------
// When the display powers up, it is configured as follows:
//
// 1. Display clear
// 2. Function set:
// DL = 1; 8-bit interface data
// N = 0; 1-line display
// F = 0; 5x8 dot character font
// 3. Display on/off control:
// D = 0; Display off
// C = 0; Cursor off
// B = 0; Blinking off
// 4. Entry mode set:
// I/D = 1; Increment by 1
// S = 0; No shift
//
// Note, however, that resetting the Arduino doesn't reset the LCD, so we
// can't assume that its in that state when a sketch starts (and the
// LiquidCrystal constructor is called).
// A call to begin() will reinitialize the LCD.
//
void LCD::begin(uint8_t cols, uint8_t lines, uint8_t dotsize)
{
if (lines > 1)
{
_displayfunction |= LCD_2LINE;
}
_numlines = lines;
_cols = cols;
// for some 1 line displays you can select a 10 pixel high font
// ------------------------------------------------------------
if ((dotsize != LCD_5x8DOTS) && (lines == 1))
{
_displayfunction |= LCD_5x10DOTS;
}
// SEE PAGE 45/46 FOR INITIALIZATION SPECIFICATION!
// according to datasheet, we need at least 40ms after power rises above 2.7V
// before sending commands. Arduino can turn on way before 4.5V so we'll wait
// 50
// ---------------------------------------------------------------------------
delay (100); // 100ms delay
//put the LCD into 4 bit or 8 bit mode
// -------------------------------------
if (! (_displayfunction & LCD_8BITMODE))
{
// this is according to the hitachi HD44780 datasheet
// figure 24, pg 46
// we start in 8bit mode, try to set 4 bit mode
send(0x03, FOUR_BITS);
delayMicroseconds(4500); // wait min 4.1ms
// second try
send ( 0x03, FOUR_BITS );
delayMicroseconds(4500); // wait min 4.1ms
// third go!
send( 0x03, FOUR_BITS );
delayMicroseconds(150);
// finally, set to 4-bit interface
send ( 0x02, FOUR_BITS );
}
else
{
// this is according to the hitachi HD44780 datasheet
// page 45 figure 23
// Send function set command sequence
command(LCD_FUNCTIONSET | _displayfunction);
delayMicroseconds(4500); // wait more than 4.1ms
// second try
command(LCD_FUNCTIONSET | _displayfunction);
delayMicroseconds(150);
// third go
command(LCD_FUNCTIONSET | _displayfunction);
}
// finally, set # lines, font size, etc.
command(LCD_FUNCTIONSET | _displayfunction);
// turn the display on with no cursor or blinking default
_displaycontrol = LCD_DISPLAYON | LCD_CURSOROFF | LCD_BLINKOFF;
display();
// clear the LCD
clear();
// Initialize to default text direction (for romance languages)
_displaymode = LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT;
// set the entry mode
command(LCD_ENTRYMODESET | _displaymode);
backlight();
}
// Common LCD Commands
// ---------------------------------------------------------------------------
void LCD::clear()
{
command(LCD_CLEARDISPLAY); // clear display, set cursor position to zero
delayMicroseconds(HOME_CLEAR_EXEC); // this command is time consuming
}
void LCD::home()
{
command(LCD_RETURNHOME); // set cursor position to zero
delayMicroseconds(HOME_CLEAR_EXEC); // This command is time consuming
}
void LCD::setCursor(uint8_t col, uint8_t row)
{
const byte row_offsetsDef[] = { 0x00, 0x40, 0x14, 0x54 }; // For regular LCDs
const byte row_offsetsLarge[] = { 0x00, 0x40, 0x10, 0x50 }; // For 16x4 LCDs
if ( row >= _numlines )
{
row = _numlines-1; // rows start at 0
}
// 16x4 LCDs have special memory map layout
// ----------------------------------------
if ( _cols == 16 && _numlines == 4 )
{
command(LCD_SETDDRAMADDR | (col + row_offsetsLarge[row]));
}
else
{
command(LCD_SETDDRAMADDR | (col + row_offsetsDef[row]));
}
}
// Turn the display on/off
void LCD::noDisplay()
{
_displaycontrol &= ~LCD_DISPLAYON;
command(LCD_DISPLAYCONTROL | _displaycontrol);
}
void LCD::display()
{
_displaycontrol |= LCD_DISPLAYON;
command(LCD_DISPLAYCONTROL | _displaycontrol);
}
// Turns the underline cursor on/off
void LCD::noCursor()
{
_displaycontrol &= ~LCD_CURSORON;
command(LCD_DISPLAYCONTROL | _displaycontrol);
}
void LCD::cursor()
{
_displaycontrol |= LCD_CURSORON;
command(LCD_DISPLAYCONTROL | _displaycontrol);
}
// Turns on/off the blinking cursor
void LCD::noBlink()
{
_displaycontrol &= ~LCD_BLINKON;
command(LCD_DISPLAYCONTROL | _displaycontrol);
}
void LCD::blink()
{
_displaycontrol |= LCD_BLINKON;
command(LCD_DISPLAYCONTROL | _displaycontrol);
}
// These commands scroll the display without changing the RAM
void LCD::scrollDisplayLeft(void)
{
command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVELEFT);
}
void LCD::scrollDisplayRight(void)
{
command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVERIGHT);
}
// This is for text that flows Left to Right
void LCD::leftToRight(void)
{
_displaymode |= LCD_ENTRYLEFT;
command(LCD_ENTRYMODESET | _displaymode);
}
// This is for text that flows Right to Left
void LCD::rightToLeft(void)
{
_displaymode &= ~LCD_ENTRYLEFT;
command(LCD_ENTRYMODESET | _displaymode);
}
// This method moves the cursor one space to the right
void LCD::moveCursorRight(void)
{
command(LCD_CURSORSHIFT | LCD_CURSORMOVE | LCD_MOVERIGHT);
}
// This method moves the cursor one space to the left
void LCD::moveCursorLeft(void)
{
command(LCD_CURSORSHIFT | LCD_CURSORMOVE | LCD_MOVELEFT);
}
// This will 'right justify' text from the cursor
void LCD::autoscroll(void)
{
_displaymode |= LCD_ENTRYSHIFTINCREMENT;
command(LCD_ENTRYMODESET | _displaymode);
}
// This will 'left justify' text from the cursor
void LCD::noAutoscroll(void)
{
_displaymode &= ~LCD_ENTRYSHIFTINCREMENT;
command(LCD_ENTRYMODESET | _displaymode);
}
// Write to CGRAM of new characters
void LCD::createChar(uint8_t location, uint8_t charmap[])
{
location &= 0x7; // we only have 8 locations 0-7
command(LCD_SETCGRAMADDR | (location << 3));
delayMicroseconds(30);
for (int i=0; i<8; i++)
{
write(charmap[i]); // call the virtual write method
delayMicroseconds(40);
}
}
//
// Switch on the backlight
void LCD::backlight ( void )
{
setBacklight(255);
}
//
// Switch off the backlight
void LCD::noBacklight ( void )
{
setBacklight(0);
}
//
// Switch fully on the LCD (backlight and LCD)
void LCD::on ( void )
{
display();
backlight();
}
//
// Switch fully off the LCD (backlight and LCD)
void LCD::off ( void )
{
noBacklight();
noDisplay();
}
// General LCD commands - generic methods used by the rest of the commands
// ---------------------------------------------------------------------------
void LCD::command(uint8_t value)
{
send(value, COMMAND);
}
#if (ARDUINO < 100)
void LCD::write(uint8_t value)
{
send(value, DATA);
}
#else
size_t LCD::write(uint8_t value)
{
send(value, DATA);
return 1; // assume OK
}
#endif

View File

@ -0,0 +1,536 @@
// ---------------------------------------------------------------------------
// Created by Francisco Malpartida on 20/08/11.
// Copyright 2011 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
//
// Thread Safe: No
// Extendable: Yes
//
// @file LCD.h
// This file implements a basic liquid crystal library that comes as standard
// in the Arduino SDK.
//
// @brief
// This is a basic implementation of the LiquidCrystal library of the
// Arduino SDK. This library is a refactored version of the one supplied
// in the Arduino SDK in such a way that it simplifies its extension
// to support other mechanism to communicate to LCDs such as I2C, Serial, SR,
// The original library has been reworked in such a way that this will be
// the base class implementing all generic methods to command an LCD based
// on the Hitachi HD44780 and compatible chipsets.
//
// This base class is a pure abstract class and needs to be extended. As reference,
// it has been extended to drive 4 and 8 bit mode control, LCDs and I2C extension
// backpacks such as the I2CLCDextraIO using the PCF8574* I2C IO Expander ASIC.
//
// The functionality provided by this class and its base class is identical
// to the original functionality of the Arduino LiquidCrystal library.
//
// @version API 1.1.0
//
//
// @author F. Malpartida - fmalpartida@gmail.com
// ---------------------------------------------------------------------------
#ifndef _LCD_H_
#define _LCD_H_
#if (ARDUINO < 100)
#include <WProgram.h>
#else
#include <Arduino.h>
#endif
#include <inttypes.h>
#include <Print.h>
/*!
@defined
@abstract Enables disables fast waits for write operations for LCD
@discussion If defined, the library will avoid doing un-necessary waits.
this can be done, because the time taken by Arduino's slow digitalWrite
operations. If fast digitalIO operations, comment this line out or undefine
the mode.
*/
#ifdef __AVR__
#define FAST_MODE
#endif
/*!
@function
@abstract waits for a given time in microseconds (compilation dependent).
@discussion Waits for a given time defined in microseconds depending on
the FAST_MODE define. If the FAST_MODE is defined the call will return
inmediatelly.
@param uSec[in] time in microseconds.
@result None
*/
inline static void waitUsec ( uint16_t uSec )
{
#ifndef FAST_MODE
delayMicroseconds ( uSec );
#endif // FAST_MODE
}
/*!
@defined
@abstract All these definitions shouldn't be used unless you are writing
a driver.
@discussion All these definitions are for driver implementation only and
shouldn't be used by applications.
*/
// LCD Commands
// ---------------------------------------------------------------------------
#define LCD_CLEARDISPLAY 0x01
#define LCD_RETURNHOME 0x02
#define LCD_ENTRYMODESET 0x04
#define LCD_DISPLAYCONTROL 0x08
#define LCD_CURSORSHIFT 0x10
#define LCD_FUNCTIONSET 0x20
#define LCD_SETCGRAMADDR 0x40
#define LCD_SETDDRAMADDR 0x80
// flags for display entry mode
// ---------------------------------------------------------------------------
#define LCD_ENTRYRIGHT 0x00
#define LCD_ENTRYLEFT 0x02
#define LCD_ENTRYSHIFTINCREMENT 0x01
#define LCD_ENTRYSHIFTDECREMENT 0x00
// flags for display on/off and cursor control
// ---------------------------------------------------------------------------
#define LCD_DISPLAYON 0x04
#define LCD_DISPLAYOFF 0x00
#define LCD_CURSORON 0x02
#define LCD_CURSOROFF 0x00
#define LCD_BLINKON 0x01
#define LCD_BLINKOFF 0x00
// flags for display/cursor shift
// ---------------------------------------------------------------------------
#define LCD_DISPLAYMOVE 0x08
#define LCD_CURSORMOVE 0x00
#define LCD_MOVERIGHT 0x04
#define LCD_MOVELEFT 0x00
// flags for function set
// ---------------------------------------------------------------------------
#define LCD_8BITMODE 0x10
#define LCD_4BITMODE 0x00
#define LCD_2LINE 0x08
#define LCD_1LINE 0x00
#define LCD_5x10DOTS 0x04
#define LCD_5x8DOTS 0x00
// Define COMMAND and DATA LCD Rs (used by send method).
// ---------------------------------------------------------------------------
#define COMMAND 0
#define DATA 1
#define FOUR_BITS 2
/*!
@defined
@abstract Defines the duration of the home and clear commands
@discussion This constant defines the time it takes for the home and clear
commands in the LCD - Time in microseconds.
*/
#define HOME_CLEAR_EXEC 2000
/*!
@defined
@abstract Backlight off constant declaration
@discussion Used in combination with the setBacklight to swith off the
LCD backlight. @set setBacklight
*/
#define BACKLIGHT_OFF 0
/*!
@defined
@abstract Backlight on constant declaration
@discussion Used in combination with the setBacklight to swith on the
LCD backlight. @set setBacklight
*/
#define BACKLIGHT_ON 255
/*!
@typedef
@abstract Define backlight control polarity
@discussion Backlight control polarity. @see setBacklightPin.
*/
typedef enum { POSITIVE, NEGATIVE } t_backlighPol;
class LCD : public Print
{
public:
/*!
@method
@abstract LiquidCrystal abstract constructor.
@discussion LiquidCrystal class abstract constructor needed to create
the base abstract class.
*/
LCD ( );
/*!
@function
@abstract LCD initialization.
@discussion Initializes the LCD to a given size (col, row). This methods
initializes the LCD, therefore, it MUST be called prior to using any other
method from this class.
This method is abstract, a base implementation is available common to all LCD
drivers. Should it not be compatible with some other LCD driver, a derived
implementation should be done on the driver specif class.
@param cols[in] the number of columns that the display has
@param rows[in] the number of rows that the display has
@param charsize[in] character size, default==LCD_5x8DOTS
*/
virtual void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS);
/*!
@function
@abstract Clears the LCD.
@discussion Clears the LCD screen and positions the cursor in the upper-left
corner.
This operation is time consuming for the LCD.
@param none
*/
void clear();
/*!
@function
@abstract Sets the cursor to the upper-left corner.
@discussion Positions the cursor in the upper-left of the LCD.
That is, use that location in outputting subsequent text to the display.
To also clear the display, use the clear() function instead.
This operation is time consuming for the LCD.
@param none
*/
void home();
/*!
@function
@abstract Turns off the LCD display.
@discussion Turns off the LCD display, without losing the text currently
being displayed on it.
@param none
*/
void noDisplay();
/*!
@function
@abstract Turns on the LCD display.
@discussion Turns on the LCD display, after it's been turned off with
noDisplay(). This will restore the text (and cursor location) that was on
the display prior to calling noDisplay().
@param none
*/
void display();
/*!
@function
@abstract Turns off the blinking of the LCD cursor.
@param none
*/
void noBlink();
/*!
@function
@abstract Display the cursor of the LCD.
@discussion Display the blinking LCD cursor. If used in combination with
the cursor() function, the result will depend on the particular display.
@param none
*/
void blink();
/*!
@function
@abstract Hides the LCD cursor.
@param none
*/
void noCursor();
/*!
@function
@abstract Display the LCD cursor.
@discussion Display the LCD cursor: an underscore (line) at the location
where the next character will be written.
@param none
*/
void cursor();
/*!
@function
@abstract Scrolls the contents of the display (text and cursor) one space
to the left.
@param none
*/
void scrollDisplayLeft();
/*!
@function
@abstract Scrolls the contents of the display (text and cursor) one space
to the right.
@param none
*/
void scrollDisplayRight();
/*!
@function
@abstract Set the direction for text written to the LCD to left-to-right.
@discussion Set the direction for text written to the LCD to left-to-right.
All subsequent characters written to the display will go from left to right,
but does not affect previously-output text.
This is the default configuration.
@param none
*/
void leftToRight();
/*!
@function
@abstract Set the direction for text written to the LCD to right-to-left.
@discussion Set the direction for text written to the LCD to right-to-left.
All subsequent characters written to the display will go from right to left,
but does not affect previously-output text.
left-to-right is the default configuration.
@param none
*/
void rightToLeft();
/*!
@function
@abstract Moves the cursor one space to the left.
@discussion
@param none
*/
void moveCursorLeft();
/*!
@function
@abstract Moves the cursor one space to the right.
@param none
*/
void moveCursorRight();
/*!
@function
@abstract Turns on automatic scrolling of the LCD.
@discussion Turns on automatic scrolling of the LCD. This causes each
character output to the display to push previous characters over by one
space. If the current text direction is left-to-right (the default),
the display scrolls to the left; if the current direction is right-to-left,
the display scrolls to the right.
This has the effect of outputting each new character to the same location on
the LCD.
@param none
*/
void autoscroll();
/*!
@function
@abstract Turns off automatic scrolling of the LCD.
@discussion Turns off automatic scrolling of the LCD, this is the default
configuration of the LCD.
@param none
*/
void noAutoscroll();
/*!
@function
@abstract Creates a custom character for use on the LCD.
@discussion Create a custom character (glyph) for use on the LCD.
Most chipsets only support up to eight characters of 5x8 pixels. Therefore,
this methods has been limited to locations (numbered 0 to 7).
The appearance of each custom character is specified by an array of eight
bytes, one for each row. The five least significant bits of each byte
determine the pixels in that row. To display a custom character on screen,
write()/print() its number, i.e. lcd.print (char(x)); // Where x is 0..7.
@param location[in] LCD memory location of the character to create
(0 to 7)
@param charmap[in] the bitmap array representing each row of the character.
*/
void createChar(uint8_t location, uint8_t charmap[]);
/*!
@function
@abstract Position the LCD cursor.
@discussion Sets the position of the LCD cursor. Set the location at which
subsequent text written to the LCD will be displayed.
@param col[in] LCD column
@param row[in] LCD row - line.
*/
void setCursor(uint8_t col, uint8_t row);
/*!
@function
@abstract Switch-on the LCD backlight.
@discussion Switch-on the LCD backlight.
The setBacklightPin has to be called before setting the backlight for
this method to work. @see setBacklightPin.
*/
void backlight ( void );
/*!
@function
@abstract Switch-off the LCD backlight.
@discussion Switch-off the LCD backlight.
The setBacklightPin has to be called before setting the backlight for
this method to work. @see setBacklightPin.
*/
void noBacklight ( void );
/*!
@function
@abstract Switch on the LCD module.
@discussion Switch on the LCD module, it will switch on the LCD controller
and the backlight. This method has the same effect of calling display and
backlight. @see display, @see backlight
*/
void on ( void );
/*!
@function
@abstract Switch off the LCD module.
@discussion Switch off the LCD module, it will switch off the LCD controller
and the backlight. This method has the same effect of calling noDisplay and
noBacklight. @see display, @see backlight
*/
void off ( void );
//
// virtual class methods
// --------------------------------------------------------------------------
/*!
@function
@abstract Sets the pin to control the backlight.
@discussion Sets the pin in the device to control the backlight.
This method is device dependent and can be programmed on each subclass. An
empty function call is provided that does nothing.
@param value: pin associated to backlight control.
@param pol: backlight polarity control (POSITIVE, NEGATIVE)
*/
virtual void setBacklightPin ( uint8_t value, t_backlighPol pol ) { };
/*!
@function
@abstract Sets the pin to control the backlight.
@discussion Sets the pin in the device to control the backlight. The behaviour
of this method is very dependent on the device. Some controllers support
dimming some don't. Please read the actual header file for each individual
device. The setBacklightPin method has to be called before setting the backlight
or the adequate backlight control constructor.
@see setBacklightPin.
NOTE: The prefered methods to control the backlight are "backlight" and
"noBacklight".
@param 0..255 - the value is very dependent on the LCD. However,
BACKLIGHT_OFF will be interpreted as off and BACKLIGHT_ON will drive the
backlight on.
*/
virtual void setBacklight ( uint8_t value ) { };
/*!
@function
@abstract Writes to the LCD.
@discussion This method writes character to the LCD in the current cursor
position.
This is the virtual write method, implemented in the Print class, therefore
all Print class methods will end up calling this method.
@param value[in] Value to write to the LCD.
*/
#if (ARDUINO < 100)
virtual void write(uint8_t value);
#else
virtual size_t write(uint8_t value);
#endif
#if (ARDUINO < 100)
using Print::write;
#else
using Print::write;
#endif
protected:
// Internal LCD variables to control the LCD shared between all derived
// classes.
uint8_t _displayfunction; // LCD_5x10DOTS or LCD_5x8DOTS, LCD_4BITMODE or
// LCD_8BITMODE, LCD_1LINE or LCD_2LINE
uint8_t _displaycontrol; // LCD base control command LCD on/off, blink, cursor
// all commands are "ored" to its contents.
uint8_t _displaymode; // Text entry mode to the LCD
uint8_t _numlines; // Number of lines of the LCD, initialized with begin()
uint8_t _cols; // Number of columns in the LCD
t_backlighPol _polarity; // Backlight polarity
private:
/*!
@function
@abstract Send a command to the LCD.
@discussion This method sends a command to the LCD by setting the Register
select line of the LCD.
This command shouldn't be used to drive the LCD, only to implement any other
feature that is not available on this library.
@param value[in] Command value to send to the LCD (COMMAND, DATA or
FOUR_BITS).
*/
void command(uint8_t value);
/*!
@function
@abstract Send a particular value to the LCD.
@discussion Sends a particular value to the LCD. This is a pure abstract
method, therefore, it is implementation dependent of each derived class how
to physically write to the LCD.
Users should never call this method.
@param value[in] Value to send to the LCD.
@result mode LOW - write to the LCD CGRAM, HIGH - write a command to
the LCD.
*/
#if (ARDUINO < 100)
virtual void send(uint8_t value, uint8_t mode) { };
#else
virtual void send(uint8_t value, uint8_t mode) = 0;
#endif
};
#endif

View File

@ -0,0 +1,299 @@
// ---------------------------------------------------------------------------
// Created by Francisco Malpartida on 20/08/11.
// Copyright 2011 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
//
// Thread Safe: No
// Extendable: Yes
//
// @file LiquidCrystal.cpp
// This file implements a basic liquid crystal library that comes as standard
// in the Arduino SDK.
//
// @brief
// This is a basic implementation of the LiquidCrystal library of the
// Arduino SDK. The original library has been reworked in such a way that
// this class implements the all methods to command an LCD based
// on the Hitachi HD44780 and compatible chipsets using the parallel port of
// the LCD (4 bit and 8 bit).
//
// The functionality provided by this class and its base class is identical
// to the original functionality of the Arduino LiquidCrystal library.
//
//
// @author F. Malpartida - fmalpartida@gmail.com
// ---------------------------------------------------------------------------
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#if (ARDUINO < 100)
#include <WProgram.h>
#else
#include <Arduino.h>
#endif
#include "LiquidCrystal.h"
// CONSTANT definitions
// ---------------------------------------------------------------------------
#define LCD_NOBACKLIGHT 0xFF
// LCD driver configuration (4bit or 8bit driver control)
#define LCD_4BIT 1
#define LCD_8BIT 0
// STATIC helper functions
// ---------------------------------------------------------------------------
// CONSTRUCTORS
// ---------------------------------------------------------------------------
LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
{
init(LCD_8BIT, rs, 255, enable, d0, d1, d2, d3, d4, d5, d6, d7);
}
LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
{
init(LCD_8BIT, rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7);
}
LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
{
init(LCD_4BIT, rs, rw, enable, d0, d1, d2, d3, 0, 0, 0, 0);
}
LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
{
init(LCD_4BIT, rs, 255, enable, d0, d1, d2, d3, 0, 0, 0, 0);
}
// Contructors with backlight control
LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
uint8_t backlightPin, t_backlighPol pol)
{
init(LCD_8BIT, rs, 255, enable, d0, d1, d2, d3, d4, d5, d6, d7);
setBacklightPin ( backlightPin, pol );
}
LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
uint8_t backlightPin, t_backlighPol pol)
{
init(LCD_8BIT, rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7);
setBacklightPin ( backlightPin, pol );
}
LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t backlightPin, t_backlighPol pol)
{
init(LCD_4BIT, rs, rw, enable, d0, d1, d2, d3, 0, 0, 0, 0);
setBacklightPin ( backlightPin, pol );
}
LiquidCrystal::LiquidCrystal(uint8_t rs, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t backlightPin, t_backlighPol pol)
{
init(LCD_4BIT, rs, 255, enable, d0, d1, d2, d3, 0, 0, 0, 0);
setBacklightPin ( backlightPin, pol );
}
// PUBLIC METHODS
// ---------------------------------------------------------------------------
/************ low level data pushing commands **********/
//
// send
void LiquidCrystal::send(uint8_t value, uint8_t mode)
{
// Only interested in COMMAND or DATA
digitalWrite( _rs_pin, ( mode == DATA ) );
// if there is a RW pin indicated, set it low to Write
// ---------------------------------------------------
if (_rw_pin != 255)
{
digitalWrite(_rw_pin, LOW);
}
if ( mode != FOUR_BITS )
{
if ( (_displayfunction & LCD_8BITMODE ) )
{
writeNbits(value, 8);
}
else
{
writeNbits ( value >> 4, 4 );
writeNbits ( value, 4 );
}
}
else
{
writeNbits ( value, 4 );
}
waitUsec ( EXEC_TIME ); // wait for the command to execute by the LCD
}
//
// setBacklightPin
void LiquidCrystal::setBacklightPin ( uint8_t pin, t_backlighPol pol )
{
pinMode ( pin, OUTPUT ); // Difine the backlight pin as output
_backlightPin = pin;
_polarity = pol;
setBacklight(BACKLIGHT_OFF); // Set the backlight low by default
}
//
// setBackligh
void LiquidCrystal::setBacklight ( uint8_t value )
{
// Check if there is a pin assigned to the backlight
// ---------------------------------------------------
if ( _backlightPin != LCD_NOBACKLIGHT )
{
// Check if the pin is associated to a timer, i.e. PWM
// ---------------------------------------------------
if(digitalPinToTimer(_backlightPin) != NOT_ON_TIMER)
{
// Check for control polarity inversion
// ---------------------------------------------------
if ( _polarity == POSITIVE )
{
analogWrite ( _backlightPin, value );
}
else
{
analogWrite ( _backlightPin, 255 - value );
}
}
// Not a PWM pin, set the backlight pin for POSI or NEG
// polarity
// --------------------------------------------------------
else if (((value > 0) && (_polarity == POSITIVE)) ||
((value == 0) && (_polarity == NEGATIVE)))
{
digitalWrite( _backlightPin, HIGH);
}
else
{
digitalWrite( _backlightPin, LOW);
}
}
}
// PRIVATE METHODS
// ---------------------------------------------------------------------------
// init
void LiquidCrystal::init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
{
uint8_t i;
// Initialize the IO pins
// -----------------------
_rs_pin = rs;
_rw_pin = rw;
_enable_pin = enable;
_data_pins[0] = d0;
_data_pins[1] = d1;
_data_pins[2] = d2;
_data_pins[3] = d3;
_data_pins[4] = d4;
_data_pins[5] = d5;
_data_pins[6] = d6;
_data_pins[7] = d7;
// Initialize the IO port direction to OUTPUT
// ------------------------------------------
for ( i = 0; i < 4; i++ )
{
pinMode ( _data_pins[i], OUTPUT );
}
// Initialize the rest of the ports if it is an 8bit controlled LCD
// ----------------------------------------------------------------
if ( !fourbitmode )
{
for ( i = 4; i < 8; i++ )
{
pinMode ( _data_pins[i], OUTPUT );
}
}
pinMode(_rs_pin, OUTPUT);
// we can save 1 pin by not using RW. Indicate by passing 255 instead of pin#
if (_rw_pin != 255)
{
pinMode(_rw_pin, OUTPUT);
}
pinMode(_enable_pin, OUTPUT);
// Initialise displaymode functions to defaults: LCD_1LINE and LCD_5x8DOTS
// -------------------------------------------------------------------------
if (fourbitmode)
_displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS;
else
_displayfunction = LCD_8BITMODE | LCD_1LINE | LCD_5x8DOTS;
// Now we pull both RS and R/W low to begin commands
digitalWrite(_rs_pin, LOW);
digitalWrite(_enable_pin, LOW);
if (_rw_pin != 255)
{
digitalWrite(_rw_pin, LOW);
}
// Initialise the backlight pin no nothing
_backlightPin = LCD_NOBACKLIGHT;
_polarity = POSITIVE;
}
//
// pulseEnable
void LiquidCrystal::pulseEnable(void)
{
// There is no need for the delays, since the digitalWrite operation
// takes longer.
digitalWrite(_enable_pin, HIGH);
waitUsec(1); // enable pulse must be > 450ns
digitalWrite(_enable_pin, LOW);
}
//
// write4bits
void LiquidCrystal::writeNbits(uint8_t value, uint8_t numBits)
{
for (uint8_t i = 0; i < numBits; i++)
{
digitalWrite(_data_pins[i], (value >> i) & 0x01);
}
pulseEnable();
}

View File

@ -0,0 +1,161 @@
// ---------------------------------------------------------------------------
// Created by Francisco Malpartida on 20/08/11.
// Copyright 2011 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
//
// Thread Safe: No
// Extendable: Yes
//
// @file LiquidCrystal.h
// This file implements a basic liquid crystal library that comes as standard
// in the Arduino SDK.
//
// @brief
// This is a basic implementation of the LiquidCrystal library of the
// Arduino SDK. The original library has been reworked in such a way that
// this class implements the all methods to command an LCD based
// on the Hitachi HD44780 and compatible chipsets using the parallel port of
// the LCD (4 bit and 8 bit).
//
//
//
// @author F. Malpartida - fmalpartida@gmail.com
// ---------------------------------------------------------------------------
#ifndef LiquidCrystal_4bit_h
#define LiquidCrystal_4bit_h
#include <inttypes.h>
#include "LCD.h"
#include "FastIO.h"
/*!
@defined
@abstract Command execution time on the LCD.
@discussion This defines how long a command takes to execute by the LCD.
The time is expressed in micro-seconds.
*/
#define EXEC_TIME 37
class LiquidCrystal : public LCD
{
public:
/*!
@method
@abstract 8 bit LCD constructors.
@discussion Defines the pin assignment that the LCD will have.
The constructor does not initialize the LCD.
*/
LiquidCrystal(uint8_t rs, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
// Constructors with backlight control
LiquidCrystal(uint8_t rs, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
uint8_t backlightPin, t_backlighPol pol);
LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
uint8_t backlightPin, t_backlighPol pol);
/*!
@method
@abstract 4 bit LCD constructors.
@discussion Defines the pin assignment that the LCD will have.
The constructor does not initialize the LCD.
*/
LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
LiquidCrystal(uint8_t rs, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
// Constructors with backlight control
LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t backlightPin, t_backlighPol pol);
LiquidCrystal(uint8_t rs, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t backlightPin, t_backlighPol pol);
/*!
@function
@abstract Send a particular value to the LCD.
@discussion Sends a particular value to the LCD for writing to the LCD or
as an LCD command.
Users should never call this method.
@param value Value to send to the LCD.
@result mode LOW - write to the LCD CGRAM, HIGH - write a command to
the LCD.
*/
virtual void send(uint8_t value, uint8_t mode);
/*!
@function
@abstract Sets the pin to control the backlight.
@discussion Sets the pin in the device to control the backlight.
@param pin: pin assigned to the backlight
@param pol: backlight pin control polarity (POSITIVE, NEGATIVE).
*/
void setBacklightPin ( uint8_t pin, t_backlighPol pol );
/*!
@function
@abstract Switch-on/off the LCD backlight.
@discussion Switch-on/off the LCD backlight.
The setBacklightPin has to be called before setting the backlight for
this method to work. @see setBacklightPin. For dimming control of the
backlight, the configuration pin must be a PWM output pin. Dim control
is achieved by passing a value from 1 to 255 as a parameter. If the
pin configured when calling the setBacklightPin does not support PWM,
then: (0) backlight off, (1..255) backlight on.
@param value: backlight value. 0: off, 1..255: dim control of the
backlight. For negative logic 255: off, 254..0: dim control.
*/
void setBacklight ( uint8_t value );
private:
/*!
@method
@abstract Initializes the LCD pin allocation and associated HW
@discussion Initializes the LCD pin allocation and configuration.
*/
void init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
/*!
@method
@abstract Writes numBits bits from value value to the LCD.
@discussion Writes numBists bits (the least significant) to the LCD control
data lines.
*/
void writeNbits(uint8_t value, uint8_t numBits);
/*!
@method
@abstract Pulse the LCD enable line (En).
@discussion Sends a pulse of 1 uS to the Enable pin to execute an command
or write operation.
*/
void pulseEnable();
uint8_t _rs_pin; // LOW: command. HIGH: character.
uint8_t _rw_pin; // LOW: write to LCD. HIGH: read from LCD.
uint8_t _enable_pin; // activated by a HIGH pulse.
uint8_t _data_pins[8]; // Data pins.
uint8_t _backlightPin; // Pin associated to control the LCD backlight
};
#endif

View File

@ -0,0 +1,291 @@
// ---------------------------------------------------------------------------
// Created by Francisco Malpartida on 20/08/11.
// Copyright 2011 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
//
// Thread Safe: No
// Extendable: Yes
//
// @file LiquidCrystal_I2C.c
// This file implements a basic liquid crystal library that comes as standard
// in the Arduino SDK but using an I2C IO extension board.
//
// @brief
// This is a basic implementation of the LiquidCrystal library of the
// Arduino SDK. The original library has been reworked in such a way that
// this class implements the all methods to command an LCD based
// on the Hitachi HD44780 and compatible chipsets using I2C extension
// backpacks such as the I2CLCDextraIO with the PCF8574* I2C IO Expander ASIC.
//
// The functionality provided by this class and its base class is identical
// to the original functionality of the Arduino LiquidCrystal library.
//
//
//
// @author F. Malpartida - fmalpartida@gmail.com
// ---------------------------------------------------------------------------
#if (ARDUINO < 100)
#include <WProgram.h>
#else
#include <Arduino.h>
#endif
#include <inttypes.h>
#include "I2CIO.h"
#include "LiquidCrystal_I2C.h"
// CONSTANT definitions
// ---------------------------------------------------------------------------
// flags for backlight control
/*!
@defined
@abstract LCD_NOBACKLIGHT
@discussion NO BACKLIGHT MASK
*/
#define LCD_NOBACKLIGHT 0x00
/*!
@defined
@abstract LCD_BACKLIGHT
@discussion BACKLIGHT MASK used when backlight is on
*/
#define LCD_BACKLIGHT 0xFF
// Default library configuration parameters used by class constructor with
// only the I2C address field.
// ---------------------------------------------------------------------------
/*!
@defined
@abstract Enable bit of the LCD
@discussion Defines the IO of the expander connected to the LCD Enable
*/
#define EN 6 // Enable bit
/*!
@defined
@abstract Read/Write bit of the LCD
@discussion Defines the IO of the expander connected to the LCD Rw pin
*/
#define RW 5 // Read/Write bit
/*!
@defined
@abstract Register bit of the LCD
@discussion Defines the IO of the expander connected to the LCD Register select pin
*/
#define RS 4 // Register select bit
/*!
@defined
@abstract LCD dataline allocation this library only supports 4 bit LCD control
mode.
@discussion D4, D5, D6, D7 LCD data lines pin mapping of the extender module
*/
#define D4 0
#define D5 1
#define D6 2
#define D7 3
// CONSTRUCTORS
// ---------------------------------------------------------------------------
LiquidCrystal_I2C::LiquidCrystal_I2C( uint8_t lcd_Addr )
{
config(lcd_Addr, EN, RW, RS, D4, D5, D6, D7);
}
LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t lcd_Addr, uint8_t backlighPin,
t_backlighPol pol = POSITIVE)
{
config(lcd_Addr, EN, RW, RS, D4, D5, D6, D7);
setBacklightPin(backlighPin, pol);
}
LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t lcd_Addr, uint8_t En, uint8_t Rw,
uint8_t Rs)
{
config(lcd_Addr, En, Rw, Rs, D4, D5, D6, D7);
}
LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t lcd_Addr, uint8_t En, uint8_t Rw,
uint8_t Rs, uint8_t backlighPin,
t_backlighPol pol = POSITIVE)
{
config(lcd_Addr, En, Rw, Rs, D4, D5, D6, D7);
setBacklightPin(backlighPin, pol);
}
LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t lcd_Addr, uint8_t En, uint8_t Rw,
uint8_t Rs, uint8_t d4, uint8_t d5,
uint8_t d6, uint8_t d7 )
{
config(lcd_Addr, En, Rw, Rs, d4, d5, d6, d7);
}
LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t lcd_Addr, uint8_t En, uint8_t Rw,
uint8_t Rs, uint8_t d4, uint8_t d5,
uint8_t d6, uint8_t d7, uint8_t backlighPin,
t_backlighPol pol = POSITIVE )
{
config(lcd_Addr, En, Rw, Rs, d4, d5, d6, d7);
setBacklightPin(backlighPin, pol);
}
// PUBLIC METHODS
// ---------------------------------------------------------------------------
//
// begin
void LiquidCrystal_I2C::begin(uint8_t cols, uint8_t lines, uint8_t dotsize)
{
init(); // Initialise the I2C expander interface
LCD::begin ( cols, lines, dotsize );
}
// User commands - users can expand this section
//----------------------------------------------------------------------------
// Turn the (optional) backlight off/on
//
// setBacklightPin
void LiquidCrystal_I2C::setBacklightPin ( uint8_t value, t_backlighPol pol = POSITIVE )
{
_backlightPinMask = ( 1 << value );
_polarity = pol;
setBacklight(BACKLIGHT_OFF);
}
//
// setBacklight
void LiquidCrystal_I2C::setBacklight( uint8_t value )
{
// Check if backlight is available
// ----------------------------------------------------
if ( _backlightPinMask != 0x0 )
{
// Check for polarity to configure mask accordingly
// ----------------------------------------------------------
if (((_polarity == POSITIVE) && (value > 0)) ||
((_polarity == NEGATIVE ) && ( value == 0 )))
{
_backlightStsMask = _backlightPinMask & LCD_BACKLIGHT;
}
else
{
_backlightStsMask = _backlightPinMask & LCD_NOBACKLIGHT;
}
_i2cio.write( _backlightStsMask );
}
}
// PRIVATE METHODS
// ---------------------------------------------------------------------------
//
// init
int LiquidCrystal_I2C::init()
{
int status = 0;
// initialize the backpack IO expander
// and display functions.
// ------------------------------------------------------------------------
if ( _i2cio.begin ( _Addr ) == 1 )
{
_i2cio.portMode ( OUTPUT ); // Set the entire IO extender to OUTPUT
_displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS;
status = 1;
_i2cio.write(0); // Set the entire port to LOW
}
return ( status );
}
//
// config
void LiquidCrystal_I2C::config (uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7 )
{
_Addr = lcd_Addr;
_backlightPinMask = 0;
_backlightStsMask = LCD_NOBACKLIGHT;
_polarity = POSITIVE;
_En = ( 1 << En );
_Rw = ( 1 << Rw );
_Rs = ( 1 << Rs );
// Initialise pin mapping
_data_pins[0] = ( 1 << d4 );
_data_pins[1] = ( 1 << d5 );
_data_pins[2] = ( 1 << d6 );
_data_pins[3] = ( 1 << d7 );
}
// low level data pushing commands
//----------------------------------------------------------------------------
//
// send - write either command or data
void LiquidCrystal_I2C::send(uint8_t value, uint8_t mode)
{
// No need to use the delay routines since the time taken to write takes
// longer that what is needed both for toggling and enable pin an to execute
// the command.
if ( mode == FOUR_BITS )
{
write4bits( (value & 0x0F), COMMAND );
}
else
{
write4bits( (value >> 4), mode );
write4bits( (value & 0x0F), mode);
}
}
//
// write4bits
void LiquidCrystal_I2C::write4bits ( uint8_t value, uint8_t mode )
{
uint8_t pinMapValue = 0;
// Map the value to LCD pin mapping
// --------------------------------
for ( uint8_t i = 0; i < 4; i++ )
{
if ( ( value & 0x1 ) == 1 )
{
pinMapValue |= _data_pins[i];
}
value = ( value >> 1 );
}
// Is it a command or data
// -----------------------
if ( mode == DATA )
{
mode = _Rs;
}
pinMapValue |= mode | _backlightStsMask;
pulseEnable ( pinMapValue );
}
//
// pulseEnable
void LiquidCrystal_I2C::pulseEnable (uint8_t data)
{
_i2cio.write (data | _En); // En HIGH
_i2cio.write (data & ~_En); // En LOW
}

View File

@ -0,0 +1,204 @@
// ---------------------------------------------------------------------------
// Created by Francisco Malpartida on 20/08/11.
// Copyright 2011 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
//
// Thread Safe: No
// Extendable: Yes
//
// @file LiquidCrystal_I2C.h
// This file implements a basic liquid crystal library that comes as standard
// in the Arduino SDK but using an I2C IO extension board.
//
// @brief
// This is a basic implementation of the LiquidCrystal library of the
// Arduino SDK. The original library has been reworked in such a way that
// this class implements the all methods to command an LCD based
// on the Hitachi HD44780 and compatible chipsets using I2C extension
// backpacks such as the I2CLCDextraIO with the PCF8574* I2C IO Expander ASIC.
//
// The functionality provided by this class and its base class is identical
// to the original functionality of the Arduino LiquidCrystal library.
//
//
// @author F. Malpartida - fmalpartida@gmail.com
// ---------------------------------------------------------------------------
#ifndef LiquidCrystal_I2C_h
#define LiquidCrystal_I2C_h
#include <inttypes.h>
#include <Print.h>
#include "I2CIO.h"
#include "LCD.h"
class LiquidCrystal_I2C : public LCD
{
public:
/*!
@method
@abstract Class constructor.
@discussion Initializes class variables and defines the I2C address of the
LCD. The constructor does not initialize the LCD.
@param lcd_Addr[in] I2C address of the IO expansion module. For I2CLCDextraIO,
the address can be configured using the on board jumpers.
*/
LiquidCrystal_I2C (uint8_t lcd_Addr);
// Constructor with backlight control
LiquidCrystal_I2C (uint8_t lcd_Addr, uint8_t backlighPin, t_backlighPol pol);
/*!
@method
@abstract Class constructor.
@discussion Initializes class variables and defines the I2C address of the
LCD. The constructor does not initialize the LCD.
@param lcd_Addr[in] I2C address of the IO expansion module. For I2CLCDextraIO,
the address can be configured using the on board jumpers.
@param En[in] LCD En (Enable) pin connected to the IO extender module
@param Rw[in] LCD Rw (Read/write) pin connected to the IO extender module
@param Rs[in] LCD Rs (Reset) pin connected to the IO extender module
*/
LiquidCrystal_I2C( uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs);
// Constructor with backlight control
LiquidCrystal_I2C(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs,
uint8_t backlighPin, t_backlighPol pol);
/*!
@method
@abstract Class constructor.
@discussion Initializes class variables and defines the I2C address of the
LCD. The constructor does not initialize the LCD.
@param lcd_Addr[in] I2C address of the IO expansion module. For I2CLCDextraIO,
the address can be configured using the on board jumpers.
@param En[in] LCD En (Enable) pin connected to the IO extender module
@param Rw[in] LCD Rw (Read/write) pin connected to the IO extender module
@param Rs[in] LCD Rs (Reset) pin connected to the IO extender module
@param d4[in] LCD data 0 pin map on IO extender module
@param d5[in] LCD data 1 pin map on IO extender module
@param d6[in] LCD data 2 pin map on IO extender module
@param d7[in] LCD data 3 pin map on IO extender module
*/
LiquidCrystal_I2C(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7 );
// Constructor with backlight control
LiquidCrystal_I2C(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
uint8_t backlighPin, t_backlighPol pol);
/*!
@function
@abstract LCD initialization and associated HW.
@discussion Initializes the LCD to a given size (col, row). This methods
initializes the LCD, therefore, it MUST be called prior to using any other
method from this class or parent class.
The begin method can be overloaded if necessary to initialize any HW that
is implemented by a library and can't be done during construction, here
we use the Wire class.
@param cols[in] the number of columns that the display has
@param rows[in] the number of rows that the display has
@param charsize[in] size of the characters of the LCD: LCD_5x8DOTS or
LCD_5x10DOTS.
*/
virtual void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS);
/*!
@function
@abstract Send a particular value to the LCD.
@discussion Sends a particular value to the LCD for writing to the LCD or
as an LCD command.
Users should never call this method.
@param value[in] Value to send to the LCD.
@param mode[in] DATA - write to the LCD CGRAM, COMMAND - write a
command to the LCD.
*/
virtual void send(uint8_t value, uint8_t mode);
/*!
@function
@abstract Sets the pin to control the backlight.
@discussion Sets the pin in the device to control the backlight. This device
doesn't support dimming backlight capability.
@param 0: backlight off, 1..255: backlight on.
*/
void setBacklightPin ( uint8_t value, t_backlighPol pol );
/*!
@function
@abstract Switch-on/off the LCD backlight.
@discussion Switch-on/off the LCD backlight.
The setBacklightPin has to be called before setting the backlight for
this method to work. @see setBacklightPin.
@param value: backlight mode (HIGH|LOW)
*/
void setBacklight ( uint8_t value );
private:
/*!
@method
@abstract Initializes the LCD class
@discussion Initializes the LCD class and IO expansion module.
*/
int init();
/*!
@function
@abstract Initialises class private variables
@discussion This is the class single point for initialising private variables.
@param lcd_Addr[in] I2C address of the IO expansion module. For I2CLCDextraIO,
the address can be configured using the on board jumpers.
@param En[in] LCD En (Enable) pin connected to the IO extender module
@param Rw[in] LCD Rw (Read/write) pin connected to the IO extender module
@param Rs[in] LCD Rs (Reset) pin connected to the IO extender module
@param d4[in] LCD data 0 pin map on IO extender module
@param d5[in] LCD data 1 pin map on IO extender module
@param d6[in] LCD data 2 pin map on IO extender module
@param d7[in] LCD data 3 pin map on IO extender module
*/
void config (uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7 );
/*!
@method
@abstract Writes an 4 bit value to the LCD.
@discussion Writes 4 bits (the least significant) to the LCD control data lines.
@param value[in] Value to write to the LCD
@param more[in] Value to distinguish between command and data.
COMMAND == command, DATA == data.
*/
void write4bits(uint8_t value, uint8_t mode);
/*!
@method
@abstract Pulse the LCD enable line (En).
@discussion Sends a pulse of 1 uS to the Enable pin to execute an command
or write operation.
*/
void pulseEnable(uint8_t);
uint8_t _Addr; // I2C Address of the IO expander
uint8_t _backlightPinMask; // Backlight IO pin mask
uint8_t _backlightStsMask; // Backlight status mask
I2CIO _i2cio; // I2CIO PCF8574* expansion module driver I2CLCDextraIO
uint8_t _En; // LCD expander word for enable pin
uint8_t _Rw; // LCD expander word for R/W pin
uint8_t _Rs; // LCD expander word for Register Select pin
uint8_t _data_pins[4]; // LCD data lines
};
#endif

View File

@ -0,0 +1,209 @@
// ---------------------------------------------------------------------------
// Created by Francisco Malpartida on 20/08/11.
// Copyright 2011 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
//
// Thread Safe: No
// Extendable: Yes
//
// @file LiquidCrystal_SR.h
// Connects an LCD using 2 or 3 pins from the Arduino, via an 8-bit
// ShiftRegister (SR from now on).
//
// @brief
// This is a port of the ShiftRegLCD library from raron and ported to the
// LCD library.
//
// The functionality provided by this class and its base class is identical
// to the original functionality of the Arduino LiquidCrystal library and can
// be used as such.
//
// Modified to work serially with the shiftOut() function, an 8-bit
// unlatched, no-tristate, unidirectional SIPO (Serial-In-Parallel-Out)
// shift register (IE a very simple SR), and an LCD in 4-bit mode.
// Any such shift register should do (pref. 74LS family IC's for 2-wire).
// I used 74LS164, for the reason that's what I had at hand.
//
// Connection description:
//
// SR output:
// Bit #0 - N/C - not connected, used to hold a zero
// Bit #1 - N/C
// Bit #2 - connects to RS (Register Select) on the LCD
// Bits #3-6 - connects to LCD data inputs D4 - D7.
// Bit #7 - enables the LCD enable-puls (via the diode-resistor AND "gate")
//
// 2 or 3 Pins required from the Arduino for Data, Clock and (optional) Enable
// If not using Enable, the Data pin is used for the enable signal by defining
// the same pin for Enable as for Data. Data and Clock outputs/pins goes to
// the shiftregister.
// LCD RW-pin hardwired to LOW (only writing to LCD).
// Busy Flag (BF, data bit D7) is not read.
//
// Original project homepage: http://code.google.com/p/arduinoshiftreglcd/
//
//
// History
// 2012.03.29 bperrybap - Added delays for faster fio shiftout (it got too fast)
// AVR needed delay. cmd/write delays are based on CPU speed so it works on pic32.
// Added code to support indicating two wire mode by using enable=data pin
// (documentation indicated this as working)
// Fixed incorrect use of 5x10 for default font - now matches original LQ library.
// can now eliminate enable pin in constructor for two wire mode.
// 2012.01.16 Florian Fida - faster digitalWrite/shiftOut
// 2011.10.29 fmalpartida - adaption of the library to the LCD class hierarchy.
// 2011.07.02 Fixed a minor flaw in setCursor function. No functional change,
// just a bit more memory efficient.
// Thanks to CapnBry (from google code and github) who noticed it.
// URL to his version of shiftregLCD:
// https://github.com/CapnBry/HeaterMeter/commit/c6beba1b46b092ab0b33bcbd0a30a201fd1f28c1
// 2009.07.30 raron - minor corrections to the comments.
// Fixed timing to datasheet safe. Fixed keyword highlights.
// 2009.07.28 Mircho / raron - a new modification to the schematics, and a
// more streamlined interface
// 2009.07.27 Thanks to an excellent suggestion from mircho at the Arduino
// playgrond forum, the number of wires now required is only two!
// 2009.07.25 raron - Fixed comments. I really messed up the comments before
// posting this, so I had to fix it.
// Renamed a function, but no improvements or functional changes.
// 2009.07.23 Incorporated some proper initialization routines
// inspired (lets say copy-paste-tweaked) from LiquidCrystal
// library improvements from LadyAda.
// 2009.05.23 raron - first version, but based mostly (as in almost verbatim)
// on the "official" LiquidCrystal library.
//
//
// @author F. Malpartida - fmalpartida@gmail.com
// ---------------------------------------------------------------------------
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#if (ARDUINO < 100)
#include <WProgram.h>
#else
#include <Arduino.h>
#endif
#include "LiquidCrystal_SR.h"
#include "FastIO.h"
// CONSTRUCTORS
// ---------------------------------------------------------------------------
// Assuming 1 line 8 pixel high font
LiquidCrystal_SR::LiquidCrystal_SR (uint8_t srdata, uint8_t srclock,
uint8_t enable )
{
init ( srdata, srclock, enable, 1, 0 );
}
// PRIVATE METHODS
// ---------------------------------------------------------------------------
//
// init
void LiquidCrystal_SR::init(uint8_t srdata, uint8_t srclock, uint8_t enable,
uint8_t lines, uint8_t font)
{
// Initialise private variables
_two_wire = 0;
_srDataRegister = fio_pinToOutputRegister(srdata);
_srDataBit = fio_pinToBit(srdata);
_srClockRegister = fio_pinToOutputRegister(srclock);
_srClockBit = fio_pinToBit(srclock);
if ((enable == TWO_WIRE) || (enable == srdata))
{
_two_wire = 1;
_srEnableRegister = _srDataRegister;
_srEnableBit = _srDataBit;
}
else
{
_srEnableRegister = fio_pinToOutputRegister(enable);
_srEnableBit = fio_pinToBit(enable);
}
// Configure control pins as outputs
// ------------------------------------------------------------------------
_displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS;
}
//
// shiftIt
void LiquidCrystal_SR::shiftIt(uint8_t val)
{
if (_two_wire)
{
// Clear to get Enable LOW
fio_shiftOut(_srDataRegister, _srDataBit, _srClockRegister, _srClockBit);
}
fio_shiftOut(_srDataRegister, _srDataBit, _srClockRegister, _srClockBit, val, MSBFIRST);
// LCD ENABLE PULSE
//
// While this library is written with a shift register without an output
// latch in mind, it can work in 3-wire mode with a shiftregister with a
// latch. The shiftregister latch pin (STR, RCL or similar) is then
// connected to the LCD enable pin. The LCD is (very likely) slower
// to read the Enable pulse, and then reads the new contents of the SR.
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
fio_digitalWrite_HIGH(_srEnableRegister, _srEnableBit);
waitUsec (1); // enable pulse must be >450ns
fio_digitalWrite_SWITCHTO(_srEnableRegister, _srEnableBit, LOW);
} // end critical section
}
// PUBLIC METHODS
// ---------------------------------------------------------------------------
/************ low level data pushing commands **********/
//
// send
void LiquidCrystal_SR::send(uint8_t value, uint8_t mode)
{
// Divide byte in two nibbles include the RS signal
// and format it for shiftregister output wiring to the LCD
// We are only interested in my COMMAND or DATA for myMode
uint8_t myMode = ( mode == DATA ) ? SR_RS_BIT : 0; // RS bit; LOW: command. HIGH: character.
if ( mode != FOUR_BITS )
{
shiftIt(myMode | SR_EN_BIT | ((value >> 1) & 0x78)); // upper nibble
}
shiftIt(myMode | SR_EN_BIT | ((value << 3) & 0x78)); // lower nibble
/*
* Add some delay since this code is so fast it needs some added delay
* even on AVRs because the shiftout is shorter than the LCD command execution time.
*/
#if (F_CPU <= 16000000)
if(_two_wire)
delayMicroseconds ( 10 );
else
delayMicroseconds ( 17 ); // 3 wire mode is faster so it must delay longer
#else
delayMicroseconds ( 37 ); // commands & data writes need > 37us to complete
#endif
}
//
// setBacklightPin
void LiquidCrystal_SR::setBacklightPin ( uint8_t pin, t_backlighPol pol )
{ }
//
// setBacklight
void LiquidCrystal_SR::setBacklight ( uint8_t mode )
{ }

View File

@ -0,0 +1,176 @@
// ---------------------------------------------------------------------------
// Created by Francisco Malpartida on 20/08/11.
// Copyright 2011 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
//
// Thread Safe: No
// Extendable: Yes
//
// @file LiquidCrystal_SR.h
// Connects an LCD using 2 or 3 pins from the Arduino, via an 8-bit
// ShiftRegister (SR from now on).
//
// @brief
// This is a port of the ShiftRegLCD library from raron and ported to the
// LCD library.
//
// The functionality provided by this class and its base class is identical
// to the original functionality of the Arduino LiquidCrystal library and can
// be used as such.
//
// Modified to work serially with the shiftOut() function, an 8-bit
// unlatched, no-tristate, unidirectional SIPO (Serial-In-Parallel-Out)
// shift register (IE a very simple SR), and an LCD in 4-bit mode.
// Any such shift register should do (pref. 74LS family IC's for 2-wire).
// I used 74LS164, for the reason that's what I had at hand.
//
// Connection description:
//
// SR output:
// Bit #0 - N/C - not connected, used to hold a zero
// Bit #1 - N/C
// Bit #2 - connects to RS (Register Select) on the LCD
// Bits #3-6 - connects to LCD data inputs D4 - D7.
// Bit #7 - enables the LCD enable-puls (via the diode-resistor AND "gate")
//
// 2 or 3 Pins required from the Arduino for Data, Clock and (optional) Enable
// If not using Enable, the Data pin will be used for the enable signal.
// 2 wire mode can be indicated by:
// - ommitting the enable pin in constructor
// - defining the same pin for Enable as for Data in constructor
// - by using the token TWO_WIRE for the enable pin.
//
// Data and Clock outputs/pins goes to the shiftregister.
// LCD RW-pin hardwired to LOW (only writing to LCD).
// Busy Flag (BF, data bit D7) is not read.
//
// Original project homepage: http://code.google.com/p/arduinoshiftreglcd/
//
//
// History
// 2012.03.29 bperrybap - can now eliminate enable pin in constructor for two wire mode.
// 2011.10.29 fmalpartida - adaption of the library to the LCD class hierarchy.
// 2011.07.02 Fixed a minor flaw in setCursor function. No functional change,
// just a bit more memory efficient.
// Thanks to CapnBry (from google code and github) who noticed it.
// URL to his version of shiftregLCD:
// https://github.com/CapnBry/HeaterMeter/commit/c6beba1b46b092ab0b33bcbd0a30a201fd1f28c1
// 2009.07.30 raron - minor corrections to the comments.
// Fixed timing to datasheet safe. Fixed keyword highlights.
// 2009.07.28 Mircho / raron - a new modification to the schematics, and a
// more streamlined interface
// 2009.07.27 Thanks to an excellent suggestion from mircho at the Arduiono
// playgrond forum, the number of wires now required is only two!
// 2009.07.25 raron - Fixed comments. I really messed up the comments before
// posting this, so I had to fix it.
// Renamed a function, but no improvements or functional changes.
// 2009.07.23 Incorporated some proper initialization routines
// inspired (lets say copy-paste-tweaked) from LiquidCrystal
// library improvements from LadyAda.
// 2009.05.23 raron - first version, but based mostly (as in almost verbatim)
// on the "official" LiquidCrystal library.
//
//
//
// @author F. Malpartida - fmalpartida@gmail.com
// ---------------------------------------------------------------------------
#ifndef _LIQUIDCRYSTAL_SR_
#define _LIQUIDCRYSTAL_SR_
#include <inttypes.h>
#include "LCD.h"
#include "FastIO.h"
// two-wire indicator constant
// ---------------------------------------------------------------------------
#define TWO_WIRE 204
#define SR_RS_BIT 0x04
#define SR_EN_BIT 0x80
class LiquidCrystal_SR : public LCD
{
public:
/*!
@method
@abstract LCD SHIFT REGISTER constructors.
@discussion Defines the pin assignment that the LCD will have.
The constructor does not initialize the LCD. Assuming 1 line 8 pixel high
font.
@param srdata[in] pin for shiftregister data line.
@param srclock[in] pin for shiftregister clock line.
@param enable[in] optional direct enable pin for the LCD
*/
LiquidCrystal_SR ( uint8_t srdata, uint8_t srclock, uint8_t enable=TWO_WIRE );
/*!
@function
@abstract Send a particular value to the LCD.
@discussion Sends a particular value to the LCD for writing to the LCD or
as an LCD command using the shift register.
Users should never call this method.
@param value[in] Value to send to the LCD.
@result mode LOW - write to the LCD CGRAM, HIGH - write a command to
the LCD.
*/
virtual void send(uint8_t value, uint8_t mode);
/*!
@function
@abstract Sets the pin to control the backlight.
@discussion Sets the pin in the device to control the backlight.
@warning Currently not supported
@param mode: backlight mode (HIGH|LOW)
@param pol: backlight polarity
*/
void setBacklightPin ( uint8_t pin, t_backlighPol pol );
/*!
@function
@abstract Switch-on/off the LCD backlight.
@discussion Switch-on/off the LCD backlight.
The setBacklightPin has to be called before setting the backlight for
this method to work. @see setBacklightPin.
@param mode: backlight mode (HIGH|LOW)
*/
void setBacklight ( uint8_t mode );
private:
/*!
@method
@abstract Initializes the LCD pin allocation
@discussion Initializes the LCD pin allocation and configuration.
*/
void init ( uint8_t srdata, uint8_t srclock, uint8_t enable, uint8_t lines,
uint8_t font );
/*!
* @method
* @abstract takes care of shifting and the enable pulse
*/
void shiftIt (uint8_t val);
uint8_t _enable_pin; // Enable Pin
uint8_t _two_wire; // two wire mode
fio_register _srDataRegister; // Serial Data pin
fio_bit _srDataBit;
fio_register _srClockRegister; // Clock Pin
fio_bit _srClockBit;
fio_register _srEnableRegister; // Enable Pin
fio_bit _srEnableBit;
};
#endif

View File

@ -0,0 +1,135 @@
// ---------------------------------------------------------------------------
// Created/Adapted by Bill Perry 2012-03-16
// Copyright 2012 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
//
// Thread Safe: No
// Extendable: Yes
//
// @file LiquidCrystal_SR2W.cpp
// Connects a hd44780 LCD using 2 pins from the Arduino, via an 8-bit
// ShiftRegister (SR2W from now on).
//
// @brief
// This is a port of the ShiftRegLCD library from raron and ported to the
// LCD library.
//
//
// See the corresponding SR2W header file for full details.
//
// History
// 2012.03.29 bperrybap - Fixed incorrect use of 5x10 for default font
// (now matches original LQ library)
// Fixed typo in SR2W mask define names
// changed default backlight state to on
// 2012.03.16 bperrybap - created/modified from SR sources to create SR2W
// @author B. Perry - bperrybap@opensource.billsworld.billandterrie.com
// ---------------------------------------------------------------------------
#include "LiquidCrystal_SR2W.h"
// CONSTRUCTORS
// ---------------------------------------------------------------------------
// Assuming 1 line 8 pixel high font
LiquidCrystal_SR2W::LiquidCrystal_SR2W (uint8_t srdata, uint8_t srclock, t_backlighPol blpol)
{
init ( srdata, srclock, blpol, 1, 0 );
}
// PRIVATE METHODS
// ---------------------------------------------------------------------------
//
// init
void LiquidCrystal_SR2W::init(uint8_t srdata, uint8_t srclock, t_backlighPol blpol, uint8_t lines, uint8_t font)
{
_srDataRegister = fio_pinToOutputRegister(srdata);
_srDataMask = fio_pinToBit(srdata);
_srClockRegister = fio_pinToOutputRegister(srclock);
_srClockMask = fio_pinToBit(srclock);
_blPolarity = blpol;
_displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS;
backlight(); // set default backlight state to on
}
//
// loadSR
void LiquidCrystal_SR2W::loadSR(uint8_t val)
{
// Clear to keep Enable LOW while clocking in new bits
fio_shiftOut(_srDataRegister, _srDataMask, _srClockRegister, _srClockMask);
// clock out SR data byte
fio_shiftOut(_srDataRegister, _srDataMask, _srClockRegister, _srClockMask, val, MSBFIRST);
// strobe LCD enable which can now be toggled by the data line
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
fio_digitalWrite_HIGH(_srDataRegister, _srDataMask);
waitUsec (1); // enable pulse must be >450ns
fio_digitalWrite_SWITCHTO(_srDataRegister, _srDataMask, LOW);
} // end critical section
}
// PUBLIC METHODS
// ---------------------------------------------------------------------------
/************ low level data pushing commands **********/
//
// send
void LiquidCrystal_SR2W::send(uint8_t value, uint8_t mode)
{
uint8_t myMode = ( mode == DATA ) ? SR2W_RS_MASK : 0;
myMode = myMode | SR2W_EN_MASK | _blMask;
if ( mode != FOUR_BITS )
{
loadSR(myMode | ((value >> 1) & SR2W_DATA_MASK)); // upper nibble
}
loadSR(myMode | ((value << 3) & SR2W_DATA_MASK)); // lower nibble
/*
* Don't call waitUsec()
* do our own delay optmization since this code is so fast it needs some added delay
* even on slower AVRs.
*/
#if (F_CPU <= 16000000)
delayMicroseconds ( 10 ); // commands & data writes need > 37us to complete
#else
delayMicroseconds ( 37 ); // commands & data writes need > 37us to complete
#endif
}
//
// setBacklight
void LiquidCrystal_SR2W::setBacklight ( uint8_t value )
{
// Check for polarity to configure mask accordingly
// ----------------------------------------------------------
if ( ((_blPolarity == POSITIVE) && (value > 0)) ||
((_blPolarity == NEGATIVE ) && ( value == 0 )) )
{
_blMask = SR2W_BL_MASK;
}
else
{
_blMask = 0;
}
// send dummy data of blMask to set BL pin
// Note: loadSR() will strobe the data line trying to pulse EN
// but E will not strobe because the EN output bit is not set.
loadSR(_blMask);
}

View File

@ -0,0 +1,202 @@
// ---------------------------------------------------------------------------
// Created/Adapted by Bill Perry 2012-03-16
// Copyright 2012 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
//
// @file LiquidCrystal_SR2W.h
// Connects a hd44780 LCD using 2 pins from the Arduino, via an 8-bit
// ShiftRegister (SR2W from now on).
//
// @brief
// This is the 2 wire shift register interface class for the LCD library
//
// The functionality provided by this class and its base class is a superset of
// the original functionality of the Arduino LiquidCrystal library and can
// be used as such.
// See the LCD class for a full description of the API functions available.
//
// It works with a 8-bit unlatched, no-tristate, unidirectional SIPO (Serial-In-Parallel-Out)
// shift register (IE a very simple SR), and an hd44780 LCD in 4-bit mode.
// Any such shift register should do (pref. 74LS family IC's for 2-wire).
// 74LS164 and 74HC595 have been exstensively tested.
//
//
// 2 Pins required from the Arduino:
// - Data/Enable
// - Clock
// The Data pin is also used to control the enable signal
// LCD RW-pin hardwired to LOW (only writing to LCD).
// Busy Flag (BF, data bit D7) is not read.
//
// Original project homepage: http://code.google.com/p/arduinoshiftreglcd/
//
// Shift register bits
// Bit #0 - (cannot be used on 74HC595)
// Bit #1 - optional backlight control
// Bit #2 - connects to RS (Register Select) on the LCD
// Bit #3 - connects to LCD data inputs D4
// Bit #4 - connects to LCD data inputs D5
// Bit #5 - connects to LCD data inputs D6
// Bit #6 - connects to LCD data inputs D7
// Bit #7 - enables the LCD enable-puls (via the diode-resistor AND "gate")
//
// Wiring for a 74LS164
// ---------------------
// 1k/4.7k
// +--------[ Resistor ]--------+---(LCD Enable)
// | |
// | 74LS164 (VCC) |
// | +----u----+ | _V_ diode
// (data pin)---+---+--1-|A VCC|-14-+ |
// | | | |
// +--2-|B Q7|-13------+
// 3-|Q0 Q6|-12--(LCD D7)
// (BL Circuit)--------4-|Q1 Q5|-11--(LCD D6)
// (LCD RS)------------5-|Q2 Q4|-10--(LCD D5)
// (LCD D4)------------6-|Q3 /MR|--9--(VCC)
// +-7-|GND CP|--8--(clock pin)
// | +---------+
// | 0.1uf
// (gnd)-----||----(vcc)
//
// Wiring for a 74HC595
// --------------------
// NOTE: the 74HC595 is a latching shift register. In order to get it to operate
// in a "non latching" mode, RCLK and SCLK are tied together. The side effect of this
// is that the latched output is one clock behind behind the internal shift register bits.
// To compensate for this the wiring is offset by one bit position lower.
// For example, while the backlight is hooked to Q0 it is still using bit 1 of
// of the shift register because the outputs are 1 clock behind the real internal shift
// register.
//
// 74HC595 (VCC)
// +----u----+ | +-----------------------(BL circuit)
// (LCD RS)------------1-|Q1 VCC|-16-+ | +--------------------(data pin)
// (LCD D4)------------2-|Q2 Q0|-15----+ | 1k/4.7k
// (LCD D5)------------3-|Q3 SER|-14-------+---[ Resistor ]--+--(LCD Enable)
// (LCD D6)------------4-|Q4 /OE|-13--(gnd) |
// (LCD D7)------------5-|Q5 RCLK|-12-------+ |
// | | | |
// +------6-|Q6 SCLK|-11-------+--(clock pin) |
// | 7-|Q7 /MR|-10--(VCC) |
// | +-8-|GND Q6'|--9 |
// | | +---------+ diode _V_
// | | 0.1uf |
// | (gnd)-----||----(vcc) |
// +-----------------------------------------------+
//
//
// Backlight Control circuit
// -------------------------
// Because the shift resiter is not latching the outputs, the backlight circuitry
// will "see" the output bits as they are shifted into the shift register which
// can cause the backlight to flicker rather than remain constantly on/off.
// The circuit below slows down the transitions to the transistor to remove
// the visible flicker. When the BL input is HIGH the LCD backlight will turn on.
//
// (value depends on LCD, 100ohm is usually safe)
// (LCD BL anode)---[ resistor ]---(vcc)
//
// (LCD BL cathode)-------------------------------+
// |
// D
// |
// (BL input)----[ 4.7k Resistor ]----+-------G-|-< (2N7000 FET)
// | |
// (0.1uf) = S
// | |
// (gnd) (gnd)
//
//
//
//
// History
// 2012.03.16 bperrybap - creation/adaption from SR header to create SR2W header.
// Fixed typo in SR2W mask define names
// @author B. Perry - bperrybap@opensource.billsworld.billandterrie.com
// --------------------------------------------------------------------------------
#ifndef _LIQUIDCRYSTAL_SR2W_
#define _LIQUIDCRYSTAL_SR2W_
#include <inttypes.h>
#include "LCD.h"
#include "FastIO.h"
// two-wire SR output bit constants
// ---------------------------------------------------------------------------
#define SR2W_BL_MASK 0x02
#define SR2W_RS_MASK 0x04
#define SR2W_DATA_MASK 0x78 // data bits are hard coded to be SR bits 6,5,4,3
#define SR2W_EN_MASK 0x80 // cannot ever be changed
class LiquidCrystal_SR2W : public LCD
{
public:
/*!
@method
@abstract LCD 2 wire SHIFT REGISTER constructor.
@discussion Defines the pin assignments that connect to the shift register.
The constructor does not initialize the LCD. Assuming 1 line 8 pixel high
font.
@param srdata[in] Arduino pin for shift register data line.
@param srclock[in] Arduino pin for shift register clock line.
@param blpol[in] optional backlight polarity (default = POSITIVE)
*/
LiquidCrystal_SR2W (uint8_t srdata, uint8_t srclock, t_backlighPol blpol = POSITIVE);
/*!
@function
@abstract Send a particular value to the LCD.
@discussion Sends a particular value to the LCD for writing to the LCD or
as an LCD command using the shift register.
Users should never call this method.
@param value[in] Value to send to the LCD.
@param mode[in] DATA=8bit data, COMMAND=8bit cmd, FOUR_BITS=4bit cmd
the LCD.
*/
virtual void send(uint8_t value, uint8_t mode);
/*!
@function
@abstract Switch-on/off the LCD backlight.
@discussion Switch-on/off the LCD backlight.
The setBacklightPin has to be called before setting the backlight for
this method to work. @see setBacklightPin.
@param mode[in] backlight mode (0 off, non-zero on)
*/
void setBacklight ( uint8_t mode );
private:
/*!
@method
@abstract Initializes the LCD pin allocation
@discussion Initializes the LCD pin allocation and configuration.
*/
void init ( uint8_t srdata, uint8_t srclock, t_backlighPol blpol, uint8_t lines, uint8_t font );
/*!
* @method
* @abstract takes care of shifting and the enable pulse
*/
void loadSR (uint8_t val);
fio_register _srDataRegister; // Serial Data pin
fio_bit _srDataMask;
fio_register _srClockRegister; // Clock Pin
fio_bit _srClockMask;
uint8_t _blPolarity;
uint8_t _blMask;
};
#endif

View File

@ -0,0 +1,283 @@
// ---------------------------------------------------------------------------
// Created by Francisco Malpartida on 7.3.2012.
// Copyright 2011 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
//
// Thread Safe: No
// Extendable: Yes
//
// @file LiquidCrystal_SRG.h
// This file implements a basic liquid crystal library that comes as standard
// in the Arduino SDK but using a generic SHIFT REGISTER extension board.
//
// @brief
// This is a basic implementation of the LiquidCrystal library of the
// Arduino SDK. The original library has been reworked in such a way that
// this class implements the all methods to command an LCD based
// on the Hitachi HD44780 and compatible chipsets using a 3 wire latching
// shift register. While it has been tested with a 74HC595N shift register
// it should also work with other latching shift registers such as the MC14094
// and the HEF4094
//
// This particular driver has been created as generic as possible to enable
// users to configure and connect their LCDs using just 3 digital IOs from the
// AVR or Arduino, and connect the LCD to the outputs of the shiftregister
// in any configuration. The library is configured by passing the IO pins
// that control the strobe, data and clock of the shift register and a map
// of how the shiftregister is connected to the LCD.
//
//
// +--------------------------------------------+
// | MCU |
// | IO1 IO2 IO3 |
// +----+-------------+-------------+-----------+
// | | |
// | | |
// +----+-------------+-------------+-----------+
// | Strobe Data Clock |
// | 8-bit shift/latch register | 74HC595N
// | Qa0 Qb1 Qc2 Qd3 Qe4 Qf5 Qg6 Qh7 |
// +----+----+----+----+----+----+----+----+----+
// | | | | | | |
// |11 |12 |13 |14 |6 |5 |4 (LCD pins)
// +----+----+----+----+----+----+----+----+----+
// | DB4 DB5 DB6 DB7 E Rw RS |
// | LCD Module |
//
// NOTE: Rw is not used by the driver so it can be connected to GND.
//
// The functionality provided by this class and its base class is identical
// to the original functionality of the Arduino LiquidCrystal library.
//
//
// History
// 2012.03.29 bperrybap - fixed constructors not properly using Rs
// Fixed incorrect use of 5x10 for default font
// - now matches original LQ library.
// moved delay to send() so it is per cmd/write vs shiftout()
// NOTE: delay is on hairy edge of working when FAST_MODE is on.
// because of waitUsec().
// There is margin at 16Mhz AVR but might fail on 20Mhz AVRs.
//
// @author F. Malpartida - fmalpartida@gmail.com
// ---------------------------------------------------------------------------
// flags for backlight control
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#if (ARDUINO < 100)
#include <WProgram.h>
#else
#include <Arduino.h>
#endif
#include "LiquidCrystal_SR3W.h"
#include "FastIO.h"
/*!
@defined
@abstract LCD_NOBACKLIGHT
@discussion No BACKLIGHT MASK
*/
#define LCD_NOBACKLIGHT 0x00
/*!
@defined
@abstract LCD_BACKLIGHT
@discussion BACKLIGHT MASK used when backlight is on
*/
#define LCD_BACKLIGHT 0xFF
// Default library configuration parameters used by class constructor with
// only the I2C address field.
// ---------------------------------------------------------------------------
/*!
@defined
@abstract Enable bit of the LCD
@discussion Defines the IO of the expander connected to the LCD's Enable
*/
#define EN 4 // Enable bit
/*!
@defined
@abstract Read/Write bit of the LCD
@discussion Defines the IO of the expander connected to the LCD's Rw pin
*/
#define RW 5 // Read/Write bit
/*!
@defined
@abstract Register bit of the LCD
@discussion Defines the IO of the expander connected to the LCD's Register select pin
*/
#define RS 6 // Register select bit
/*!
@defined
@abstract LCD dataline allocation this library only supports 4 bit LCD control
mode.
@discussion D4, D5, D6, D7 LCD data lines pin mapping of the extender module
*/
#define D4 0
#define D5 1
#define D6 2
#define D7 3
LiquidCrystal_SR3W::LiquidCrystal_SR3W(uint8_t data, uint8_t clk, uint8_t strobe)
{
init( data, clk, strobe, RS, RW, EN, D4, D5, D6, D7 );
}
LiquidCrystal_SR3W::LiquidCrystal_SR3W(uint8_t data, uint8_t clk, uint8_t strobe,
uint8_t backlighPin, t_backlighPol pol)
{
init( data, clk, strobe, RS, RW, EN, D4, D5, D6, D7 );
setBacklightPin(backlighPin, pol);
}
LiquidCrystal_SR3W::LiquidCrystal_SR3W(uint8_t data, uint8_t clk, uint8_t strobe,
uint8_t En, uint8_t Rw, uint8_t Rs,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7 )
{
init( data, clk, strobe, Rs, Rw, En, d4, d5, d6, d7 );
}
LiquidCrystal_SR3W::LiquidCrystal_SR3W(uint8_t data, uint8_t clk, uint8_t strobe,
uint8_t En, uint8_t Rw, uint8_t Rs,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
uint8_t backlighPin, t_backlighPol pol)
{
init( data, clk, strobe, Rs, Rw, En, d4, d5, d6, d7 );
setBacklightPin(backlighPin, pol);
}
void LiquidCrystal_SR3W::send(uint8_t value, uint8_t mode)
{
if ( mode != FOUR_BITS )
{
write4bits( (value >> 4), mode ); // upper nibble
}
write4bits( (value & 0x0F), mode); // lower nibble
#if (F_CPU <= 16000000)
// No need to use the delay routines on AVR since the time taken to write
// on AVR with SR pin mapping even with fio is longer than LCD command execution.
waitUsec(37); //goes away on AVRs
#else
delayMicroseconds ( 37 ); // commands & data writes need > 37us to complete
#endif
}
void LiquidCrystal_SR3W::setBacklightPin ( uint8_t value, t_backlighPol pol = POSITIVE )
{
_backlightPinMask = ( 1 << value );
_backlightStsMask = LCD_NOBACKLIGHT;
_polarity = pol;
setBacklight (BACKLIGHT_OFF); // Set backlight to off as initial setup
}
void LiquidCrystal_SR3W::setBacklight ( uint8_t value )
{
// Check if backlight is available
// ----------------------------------------------------
if ( _backlightPinMask != 0x0 )
{
// Check for polarity to configure mask accordingly
// ----------------------------------------------------------
if (((_polarity == POSITIVE) && (value > 0)) ||
((_polarity == NEGATIVE ) && ( value == 0 )))
{
_backlightStsMask = _backlightPinMask & LCD_BACKLIGHT;
}
else
{
_backlightStsMask = _backlightPinMask & LCD_NOBACKLIGHT;
}
loadSR( _backlightStsMask );
}
}
// PRIVATE METHODS
// -----------------------------------------------------------------------------
int LiquidCrystal_SR3W::init(uint8_t data, uint8_t clk, uint8_t strobe,
uint8_t Rs, uint8_t Rw, uint8_t En,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
{
_data = fio_pinToBit(data);
_clk = fio_pinToBit(clk);
_strobe = fio_pinToBit(strobe);
_data_reg = fio_pinToOutputRegister(data);
_clk_reg = fio_pinToOutputRegister(clk);
_strobe_reg = fio_pinToOutputRegister(strobe);
// LCD pin mapping
_backlightPinMask = 0;
_backlightStsMask = LCD_NOBACKLIGHT;
_polarity = POSITIVE;
_En = ( 1 << En );
_Rw = ( 1 << Rw );
_Rs = ( 1 << Rs );
// Initialise pin mapping
_data_pins[0] = ( 1 << d4 );
_data_pins[1] = ( 1 << d5 );
_data_pins[2] = ( 1 << d6 );
_data_pins[3] = ( 1 << d7 );
_displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS;
return (1);
}
void LiquidCrystal_SR3W::write4bits(uint8_t value, uint8_t mode)
{
uint8_t pinMapValue = 0;
// Map the value to LCD pin mapping
// --------------------------------
for ( uint8_t i = 0; i < 4; i++ )
{
if ( ( value & 0x1 ) == 1 )
{
pinMapValue |= _data_pins[i];
}
value = ( value >> 1 );
}
// Is it a command or data
// -----------------------
mode = ( mode == DATA ) ? _Rs : 0;
pinMapValue |= mode | _backlightStsMask;
loadSR ( pinMapValue | _En ); // Send with enable high
loadSR ( pinMapValue); // Send with enable low
}
void LiquidCrystal_SR3W::loadSR(uint8_t value)
{
// Load the shift register with information
fio_shiftOut(_data_reg, _data, _clk_reg, _clk, value, MSBFIRST);
// Strobe the data into the latch
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
fio_digitalWrite_HIGH(_strobe_reg, _strobe);
fio_digitalWrite_SWITCHTO(_strobe_reg, _strobe, LOW);
}
}

View File

@ -0,0 +1,202 @@
// ---------------------------------------------------------------------------
// Created by Francisco Malpartida on 7.3.2012.
// Copyright 2011 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
//
// Thread Safe: No
// Extendable: Yes
//
// @file LiquidCrystal_SR3W.h
// This file implements a basic liquid crystal library that comes as standard
// in the Arduino SDK but using a generic SHIFT REGISTER extension board.
//
// @brief
// This is a basic implementation of the LiquidCrystal library of the
// Arduino SDK. The original library has been reworked in such a way that
// this class implements the all methods to command an LCD based
// on the Hitachi HD44780 and compatible chipsets using a 3 wire latching
// shift register. While it has been tested with a 74HC595N shift register
// it should also work with other latching shift registers such as the MC14094
// and the HEF4094
//
// This particular driver has been created as generic as possible to enable
// users to configure and connect their LCDs using just 3 digital IOs from the
// AVR or Arduino, and connect the LCD to the outputs of the shiftregister
// in any configuration. The library is configured by passing the IO pins
// that control the strobe, data and clock of the shift register and a map
// of how the shiftregister is connected to the LCD.
//
//
// +--------------------------------------------+
// | MCU |
// | IO1 IO2 IO3 |
// +----+-------------+-------------+-----------+
// | | |
// | | |
// +----+-------------+-------------+-----------+
// | Strobe Data Clock |
// | 8-bit shift/latch register | 74HC595N
// | Qa0 Qb1 Qc2 Qd3 Qe4 Qf5 Qg6 Qh7 |
// +----+----+----+----+----+----+----+----+----+
// | | | | | | |
// |11 |12 |13 |14 |6 |5 |4 (LCD pins)
// +----+----+----+----+----+----+----+----+----+
// | DB4 DB5 DB6 DB7 E Rw RS |
// | LCD Module |
//
// NOTE: Rw is not used by the driver so it can be connected to GND.
//
// The functionality provided by this class and its base class is identical
// to the original functionality of the Arduino LiquidCrystal library.
//
//
// @author F. Malpartida - fmalpartida@gmail.com
// ---------------------------------------------------------------------------
#ifndef _LIQUIDCRYSTAL_SR3W_H_
#define _LIQUIDCRYSTAL_SR3W_H_
#include <inttypes.h>
#include "LCD.h"
#include "FastIO.h"
class LiquidCrystal_SR3W : public LCD
{
public:
/*!
@method
@abstract Class constructor.
@discussion Initializes class variables and defines the IO driving the
shift register. The constructor does not initialize the LCD.
Default configuration:
Shift register LCD
QA - 0 DB4
QB - 1 DB5
QC - 2 DB6
QD - 3 DB7
QE - 4 E
QF - 5
QG - 6 Rs
GND Rw
@param strobe[in] digital IO connected to shiftregister strobe pin.
@param data[in] digital IO connected to the shiftregister data pin.
@param clk[in] digital IO connected to the shiftregister clock pin.
*/
LiquidCrystal_SR3W(uint8_t data, uint8_t clk, uint8_t strobe);
// Constructor with backlight control
LiquidCrystal_SR3W(uint8_t data, uint8_t clk, uint8_t strobe,
uint8_t backlighPin, t_backlighPol pol);
/*!
@method
@abstract Class constructor.
@discussion Initializes class variables and defines the control lines of
the LCD and the shiftregister. The constructor does not initialize the LCD.
@param strobe[in] digital IO connected to shiftregister strobe pin.
@param data[in] digital IO connected to shiftregister data pin.
@param clk[in] digital IO connected to shiftregister clock pin.
@param En[in] LCD En (Enable) pin connected to SR output pin.
@param Rw[in] LCD Rw (Read/write) pin connected to SR output pin.
@param Rs[in] LCD Rs (Reg Select) pin connected to SR output pin.
@param d4[in] LCD data 4 pin map to the SR output pin.
@param d5[in] LCD data 5 pin map to the SR output pin.
@param d6[in] LCD data 6 pin map to the SR output pin.
@param d7[in] LCD data 7 pin map to the SR output pin.
*/
LiquidCrystal_SR3W(uint8_t data, uint8_t clk, uint8_t strobe,
uint8_t En, uint8_t Rw, uint8_t Rs,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7 );
// Constructor with backlight control
LiquidCrystal_SR3W( uint8_t data, uint8_t clk, uint8_t strobe,
uint8_t En, uint8_t Rw, uint8_t Rs,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
uint8_t backlighPin, t_backlighPol pol);
/*!
@function
@abstract Send a particular value to the LCD.
@discussion Sends a particular value to the LCD for writing to the LCD or
as an LCD command.
Users should never call this method.
@param value[in] Value to send to the LCD.
@param mode[in] DATA - write to the LCD CGRAM, COMMAND - write a
command to the LCD.
*/
virtual void send(uint8_t value, uint8_t mode);
/*!
@function
@abstract Sets the pin to control the backlight.
@discussion Sets the pin in the device to control the backlight. This device
doesn't support dimming backlight capability.
@param 0: backlight off, 1..255: backlight on.
*/
void setBacklightPin ( uint8_t value, t_backlighPol pol );
/*!
@function
@abstract Switch-on/off the LCD backlight.
@discussion Switch-on/off the LCD backlight.
The setBacklightPin has to be called before setting the backlight for
this method to work. @see setBacklightPin.
@param value: backlight mode (HIGH|LOW)
*/
void setBacklight ( uint8_t value );
private:
/*!
@method
@abstract Initializes the LCD class
@discussion Initializes the LCD class and IO expansion module.
*/
int init(uint8_t data, uint8_t clk, uint8_t strobe,
uint8_t Rs, uint8_t Rw, uint8_t En,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
/*!
@method
@abstract Writes an 4 bit value to the LCD.
@discussion Writes 4 bits (the least significant) to the LCD control data lines.
@param value[in] Value to write to the LCD
@param more[in] Value to distinguish between command and data.
COMMAND == command, DATA == data.
*/
void write4bits(uint8_t value, uint8_t mode);
/*!
@function
@abstract load into the shift register a byte
@discussion loads into the shift register a byte
@param value[in]: value to be loaded into the shiftregister.
*/
void loadSR(uint8_t value);
fio_bit _strobe; // shift register strobe pin
fio_register _strobe_reg; // SR strobe pin MCU register
fio_bit _data; // shift register data pin
fio_register _data_reg; // SR data pin MCU register
fio_bit _clk; // shift register clock pin
fio_register _clk_reg; // SR clock pin MCU register
uint8_t _En; // LCD expander word for enable pin
uint8_t _Rw; // LCD expander word for R/W pin
uint8_t _Rs; // LCD expander word for Register Select pin
uint8_t _data_pins[4]; // LCD data lines
uint8_t _backlightPinMask; // Backlight IO pin mask
uint8_t _backlightStsMask; // Backlight status mask
};
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,549 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/FastIO.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/FastIO.cpp File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>&quot;</code><br/>
</div>
<p><a href="_fast_i_o_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8cpp.html#a83fc2fdc19ab3f9aade9e1a2f39e81a6">fio_digitalRead</a> (<a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> pinRegister, uint8_t pinBit)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8cpp.html#ae91bbe682b02a5842c291055c0e998b5">fio_digitalWrite</a> (<a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> pinRegister, <a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> pinBit, uint8_t value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8cpp.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a> (uint8_t pin)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8cpp.html#afb934fc0ded94cbb5ed8ed14e2a123ed">fio_pinToInputRegister</a> (uint8_t pin)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a> (uint8_t pin, uint8_t initial_state)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8cpp.html#a5d8d5977294d614d15bda19f75d6b787">fio_shiftOut</a> (<a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> dataRegister, <a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> dataBit, <a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> clockRegister, <a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> clockBit)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8cpp.html#a56c72b9f00680662229895ab22aaa743">fio_shiftOut</a> (<a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> dataRegister, <a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> dataBit, <a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> clockRegister, <a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> clockBit, uint8_t value, uint8_t bitOrder)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8cpp.html#a7ac8b242e7e3cacf175e481889e047dd">fio_shiftOut1</a> (uint8_t pin, uint8_t value, boolean noLatch)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8cpp.html#a5b4d1684030dc620938b7c2fbdf5ced8">fio_shiftOut1</a> (<a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> shift1Register, <a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> shift1Bit, uint8_t value, boolean noLatch)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8cpp.html#a2d0e4495eb12504255bbd3f82405b17b">fio_shiftOut1_init</a> (<a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> shift1Register, <a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> shift1Bit)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8cpp.html#ae4b2e099f8ade9ee674d1565669e870a">fio_shiftOut1_init</a> (uint8_t pin)</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a83fc2fdc19ab3f9aade9e1a2f39e81a6"></a><!-- doxytag: member="FastIO.cpp::fio_digitalRead" ref="a83fc2fdc19ab3f9aade9e1a2f39e81a6" args="(fio_register pinRegister, uint8_t pinBit)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int fio_digitalRead </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td>
<td class="paramname"><em>pinRegister</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td>
<td class="paramname"><em>pinBit</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>direct digital read without any checks falls back to normal digitalRead if fast io is disabled </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pinRegister[in]</td><td>Register - ignored if fast io is disabled </td></tr>
<tr><td class="paramname">pinBit[in]</td><td>Bit - Pin if fast io is disabled </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Value read from pin </dd></dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00095">95</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ae91bbe682b02a5842c291055c0e998b5"></a><!-- doxytag: member="FastIO.cpp::fio_digitalWrite" ref="ae91bbe682b02a5842c291055c0e998b5" args="(fio_register pinRegister, fio_bit pinBit, uint8_t value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fio_digitalWrite </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td>
<td class="paramname"><em>pinRegister</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td>
<td class="paramname"><em>pinBit</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>direct digital write without any checks falls back to normal digitalWrite if fast io is disabled </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pinRegister[in]</td><td>Register - ignored if fast digital write is disabled </td></tr>
<tr><td class="paramname">pinBit[in]</td><td>Bit - Pin if fast digital write is disabled </td></tr>
<tr><td class="paramname">value[in]</td><td>desired output </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00076">76</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a07a19dfbdca1afaca5d666bdaa3be7d5"></a><!-- doxytag: member="FastIO.cpp::fio_pinToBit" ref="a07a19dfbdca1afaca5d666bdaa3be7d5" args="(uint8_t pin)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> fio_pinToBit </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>pin</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Find the bit which belongs to specified pin if fast digitalWrite is disabled this function returns the pin </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pin[in]</td><td>Number of a digital pin </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Bit </dd></dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00065">65</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="afb934fc0ded94cbb5ed8ed14e2a123ed"></a><!-- doxytag: member="FastIO.cpp::fio_pinToInputRegister" ref="afb934fc0ded94cbb5ed8ed14e2a123ed" args="(uint8_t pin)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> fio_pinToInputRegister </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>pin</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the input register for specified pin. if fast digital IO is disabled this function returns NULL </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pin[in]</td><td>Number of a digital pin </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Register </dd></dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00052">52</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a04210cc785c3b4a11c86f794949c327f"></a><!-- doxytag: member="FastIO.cpp::fio_pinToOutputRegister" ref="a04210cc785c3b4a11c86f794949c327f" args="(uint8_t pin, uint8_t initial_state)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> fio_pinToOutputRegister </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>pin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>initial_state</em> = <code>LOW</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the output register for specified pin. if fast digital IO is disabled this function returns NULL </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pin[in]</td><td>Number of a digital pin </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Register </dd></dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00035">35</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a5d8d5977294d614d15bda19f75d6b787"></a><!-- doxytag: member="FastIO.cpp::fio_shiftOut" ref="a5d8d5977294d614d15bda19f75d6b787" args="(fio_register dataRegister, fio_bit dataBit, fio_register clockRegister, fio_bit clockBit)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fio_shiftOut </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td>
<td class="paramname"><em>dataRegister</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td>
<td class="paramname"><em>dataBit</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td>
<td class="paramname"><em>clockRegister</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td>
<td class="paramname"><em>clockBit</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>faster shift out clear using fast digital write falls back to normal digitalWrite if fastio is disabled </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">dataRegister[in]</td><td>Register of data pin - ignored if fast digital write is disabled </td></tr>
<tr><td class="paramname">dataBit[in]</td><td>Bit of data pin - Pin if fast digital write is disabled </td></tr>
<tr><td class="paramname">clockRegister[in]</td><td>Register of data pin - ignored if fast digital write is disabled </td></tr>
<tr><td class="paramname">clockBit[in]</td><td>Bit of data pin - Pin if fast digital write is disabled </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00159">159</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a56c72b9f00680662229895ab22aaa743"></a><!-- doxytag: member="FastIO.cpp::fio_shiftOut" ref="a56c72b9f00680662229895ab22aaa743" args="(fio_register dataRegister, fio_bit dataBit, fio_register clockRegister, fio_bit clockBit, uint8_t value, uint8_t bitOrder)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fio_shiftOut </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td>
<td class="paramname"><em>dataRegister</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td>
<td class="paramname"><em>dataBit</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td>
<td class="paramname"><em>clockRegister</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td>
<td class="paramname"><em>clockBit</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>bitOrder</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>faster shift out using fast digital write falls back to normal digitalWrite if fastio is disabled </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">dataRegister[in]</td><td>Register of data pin - ignored if fast digital write is disabled </td></tr>
<tr><td class="paramname">dataBit[in]</td><td>Bit of data pin - Pin if fast digital write is disabled </td></tr>
<tr><td class="paramname">clockRegister[in]</td><td>Register of data pin - ignored if fast digital write is disabled </td></tr>
<tr><td class="paramname">clockBit[in]</td><td>Bit of data pin - Pin if fast digital write is disabled </td></tr>
<tr><td class="paramname">bitOrder[in]</td><td>bit order </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00108">108</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a7ac8b242e7e3cacf175e481889e047dd"></a><!-- doxytag: member="FastIO.cpp::fio_shiftOut1" ref="a7ac8b242e7e3cacf175e481889e047dd" args="(uint8_t pin, uint8_t value, boolean noLatch)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fio_shiftOut1 </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>pin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">boolean&#160;</td>
<td class="paramname"><em>noLatch</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>one wire shift out protocol needs initialisation (fio_shiftOut1_init) </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pin[in]</td><td>digital pin </td></tr>
<tr><td class="paramname">value[in]</td><td>value to shift out, last byte is ignored and always shifted out LOW </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00264">264</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a5b4d1684030dc620938b7c2fbdf5ced8"></a><!-- doxytag: member="FastIO.cpp::fio_shiftOut1" ref="a5b4d1684030dc620938b7c2fbdf5ced8" args="(fio_register shift1Register, fio_bit shift1Bit, uint8_t value, boolean noLatch)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fio_shiftOut1 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td>
<td class="paramname"><em>shift1Register</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td>
<td class="paramname"><em>shift1Bit</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">boolean&#160;</td>
<td class="paramname"><em>noLatch</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>one wire shift out protocol needs initialisation (fio_shiftOut1_init) </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">shift1Register[in]</td><td>pins register </td></tr>
<tr><td class="paramname">shift1Bit[in]</td><td>pins bit </td></tr>
<tr><td class="paramname">value[in]</td><td>value to shift out, last byte is ignored and always shifted out LOW </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00190">190</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a2d0e4495eb12504255bbd3f82405b17b"></a><!-- doxytag: member="FastIO.cpp::fio_shiftOut1_init" ref="a2d0e4495eb12504255bbd3f82405b17b" args="(fio_register shift1Register, fio_bit shift1Bit)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fio_shiftOut1_init </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td>
<td class="paramname"><em>shift1Register</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td>
<td class="paramname"><em>shift1Bit</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>initializes one wire shift out protocol Puts pin to HIGH state and delays until Capacitors are charged. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">shift1Register[in]</td><td>pins register </td></tr>
<tr><td class="paramname">shift1Bit[in]</td><td>pins bit </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00181">181</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ae4b2e099f8ade9ee674d1565669e870a"></a><!-- doxytag: member="FastIO.cpp::fio_shiftOut1_init" ref="ae4b2e099f8ade9ee674d1565669e870a" args="(uint8_t pin)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fio_shiftOut1_init </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>pin</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>initializes one wire shift out protocol Puts pin to HIGH state and delays until Capacitors are charged. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pin[in]</td><td>digital pin </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00176">176</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,351 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/FastIO.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/FastIO.cpp</div> </div>
</div>
<div class="contents">
<a href="_fast_i_o_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created by Florian Fida on 20/01/12</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2012 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">// http://creativecommons.org/licenses/by-sa/3.0/</span>
<a name="l00006"></a>00006 <span class="comment">//</span>
<a name="l00007"></a>00007 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no</span>
<a name="l00008"></a>00008 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00009"></a>00009 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00010"></a>00010 <span class="comment">// fio_shiftOut1 functions are based on Shif1 protocol developed by Roman Black </span>
<a name="l00011"></a>00011 <span class="comment">// (http://www.romanblack.com/shift1.htm)</span>
<a name="l00012"></a>00012 <span class="comment">//</span>
<a name="l00013"></a>00013 <span class="comment">// Thread Safe: No</span>
<a name="l00014"></a>00014 <span class="comment">// Extendable: Yes</span>
<a name="l00015"></a>00015 <span class="comment">//</span>
<a name="l00016"></a>00016 <span class="comment">// @file FastIO.h</span>
<a name="l00017"></a>00017 <span class="comment">// This file implements basic fast IO routines.</span>
<a name="l00018"></a>00018 <span class="comment">// </span>
<a name="l00019"></a>00019 <span class="comment">// @brief </span>
<a name="l00020"></a>00020 <span class="comment">//</span>
<a name="l00021"></a>00021 <span class="comment">// @version API 1.0.0</span>
<a name="l00022"></a>00022 <span class="comment">//</span>
<a name="l00023"></a>00023 <span class="comment">// @author Florian Fida -</span>
<a name="l00024"></a>00024 <span class="comment">//</span>
<a name="l00025"></a>00025 <span class="comment">// 2012-03-16 bperrybap updated fio_shiftout() to be smaller &amp; faster</span>
<a name="l00026"></a>00026 <span class="comment">//</span>
<a name="l00027"></a>00027 <span class="comment">// @todo:</span>
<a name="l00028"></a>00028 <span class="comment">// support chipkit:</span>
<a name="l00029"></a>00029 <span class="comment">// (https://github.com/chipKIT32/chipKIT32-MAX/blob/master/hardware/pic32/</span>
<a name="l00030"></a>00030 <span class="comment">// cores/pic32/wiring_digital.c)</span>
<a name="l00031"></a>00031 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &quot;<a class="code" href="_fast_i_o_8h.html">FastIO.h</a>&quot;</span>
<a name="l00033"></a>00033
<a name="l00034"></a>00034
<a name="l00035"></a><a class="code" href="_fast_i_o_8h.html#a385ae40d960c1a57e86818332476a802">00035</a> <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> <a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(uint8_t pin, uint8_t initial_state)
<a name="l00036"></a>00036 {
<a name="l00037"></a>00037 pinMode(pin, OUTPUT);
<a name="l00038"></a>00038
<a name="l00039"></a>00039 <span class="keywordflow">if</span>(initial_state != <a class="code" href="_fast_i_o_8h.html#a688a4adbb87520a2b68681bd6bfb199e">SKIP</a>)
<a name="l00040"></a>00040 {
<a name="l00041"></a>00041 digitalWrite(pin, initial_state); <span class="comment">// also turns off pwm timer</span>
<a name="l00042"></a>00042 }
<a name="l00043"></a>00043 <span class="preprocessor">#ifdef FIO_FALLBACK</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span> <span class="comment">// just wasting memory if not using fast io...</span>
<a name="l00045"></a>00045 <span class="keywordflow">return</span> 0;
<a name="l00046"></a>00046 <span class="preprocessor">#else</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span> <span class="keywordflow">return</span> portOutputRegister(digitalPinToPort(pin));
<a name="l00048"></a>00048 <span class="preprocessor">#endif</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span>}
<a name="l00050"></a>00050
<a name="l00051"></a>00051
<a name="l00052"></a><a class="code" href="_fast_i_o_8h.html#afb934fc0ded94cbb5ed8ed14e2a123ed">00052</a> <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> <a class="code" href="_fast_i_o_8cpp.html#afb934fc0ded94cbb5ed8ed14e2a123ed">fio_pinToInputRegister</a>(uint8_t pin)
<a name="l00053"></a>00053 {
<a name="l00054"></a>00054 pinMode(pin, INPUT);
<a name="l00055"></a>00055 digitalWrite(pin, LOW); <span class="comment">// also turns off pwm timer and pullup</span>
<a name="l00056"></a>00056 <span class="preprocessor">#ifdef FIO_FALLBACK</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span> <span class="comment">// just wasting memory if not using fast io...</span>
<a name="l00058"></a>00058 <span class="keywordflow">return</span> 0;
<a name="l00059"></a>00059 <span class="preprocessor">#else</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span> <span class="keywordflow">return</span> portInputRegister(digitalPinToPort(pin));
<a name="l00061"></a>00061 <span class="preprocessor">#endif</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span>}
<a name="l00063"></a>00063
<a name="l00064"></a>00064
<a name="l00065"></a><a class="code" href="_fast_i_o_8h.html#a07a19dfbdca1afaca5d666bdaa3be7d5">00065</a> <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> <a class="code" href="_fast_i_o_8cpp.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a>(uint8_t pin)
<a name="l00066"></a>00066 {
<a name="l00067"></a>00067 <span class="preprocessor">#ifdef FIO_FALLBACK</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span> <span class="comment">// (ab)use the bit variable to store the pin</span>
<a name="l00069"></a>00069 <span class="keywordflow">return</span> pin;
<a name="l00070"></a>00070 <span class="preprocessor">#else</span>
<a name="l00071"></a>00071 <span class="preprocessor"></span> <span class="keywordflow">return</span> digitalPinToBitMask(pin);
<a name="l00072"></a>00072 <span class="preprocessor">#endif</span>
<a name="l00073"></a>00073 <span class="preprocessor"></span>}
<a name="l00074"></a>00074
<a name="l00075"></a>00075
<a name="l00076"></a><a class="code" href="_fast_i_o_8h.html#ae91bbe682b02a5842c291055c0e998b5">00076</a> <span class="keywordtype">void</span> <a class="code" href="_fast_i_o_8cpp.html#ae91bbe682b02a5842c291055c0e998b5">fio_digitalWrite</a>(<a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> pinRegister, <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> pinBit, uint8_t value)
<a name="l00077"></a>00077 {
<a name="l00078"></a>00078 <span class="preprocessor">#ifdef FIO_FALLBACK</span>
<a name="l00079"></a>00079 <span class="preprocessor"></span> digitalWrite(pinBit, value);
<a name="l00080"></a>00080 <span class="preprocessor">#else</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span> <a class="code" href="_fast_i_o_8h.html#a04971fe5fabe4129736708c494e08e6d">ATOMIC_BLOCK</a>(<a class="code" href="_fast_i_o_8h.html#a362c18b15a09703e42e1c246c47420ef">ATOMIC_RESTORESTATE</a>)
<a name="l00082"></a>00082 {
<a name="l00083"></a>00083 <span class="keywordflow">if</span>(value == LOW)
<a name="l00084"></a>00084 {
<a name="l00085"></a>00085 <a class="code" href="_fast_i_o_8h.html#ac8f00a1bccb98109531b88fbb6e91478">fio_digitalWrite_LOW</a>(pinRegister,pinBit);
<a name="l00086"></a>00086 }
<a name="l00087"></a>00087 <span class="keywordflow">else</span>
<a name="l00088"></a>00088 {
<a name="l00089"></a>00089 <a class="code" href="_fast_i_o_8h.html#a89e1c62276052100c62b6c82a2e95622">fio_digitalWrite_HIGH</a>(pinRegister,pinBit);
<a name="l00090"></a>00090 }
<a name="l00091"></a>00091 }
<a name="l00092"></a>00092 <span class="preprocessor">#endif</span>
<a name="l00093"></a>00093 <span class="preprocessor"></span>}
<a name="l00094"></a>00094
<a name="l00095"></a><a class="code" href="_fast_i_o_8h.html#a197336e47e1c3f929056ce3abbbc7e8d">00095</a> <span class="keywordtype">int</span> <a class="code" href="_fast_i_o_8cpp.html#a83fc2fdc19ab3f9aade9e1a2f39e81a6">fio_digitalRead</a>(<a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> pinRegister, uint8_t pinBit)
<a name="l00096"></a>00096 {
<a name="l00097"></a>00097 <span class="preprocessor">#ifdef FIO_FALLBACK</span>
<a name="l00098"></a>00098 <span class="preprocessor"></span> <span class="keywordflow">return</span> digitalRead (pinBit);
<a name="l00099"></a>00099 <span class="preprocessor">#else</span>
<a name="l00100"></a>00100 <span class="preprocessor"></span> <span class="keywordflow">if</span> (*pinRegister &amp; pinBit)
<a name="l00101"></a>00101 {
<a name="l00102"></a>00102 <span class="keywordflow">return</span> HIGH;
<a name="l00103"></a>00103 }
<a name="l00104"></a>00104 <span class="keywordflow">return</span> LOW;
<a name="l00105"></a>00105 <span class="preprocessor">#endif</span>
<a name="l00106"></a>00106 <span class="preprocessor"></span>}
<a name="l00107"></a>00107
<a name="l00108"></a><a class="code" href="_fast_i_o_8h.html#a56c72b9f00680662229895ab22aaa743">00108</a> <span class="keywordtype">void</span> <a class="code" href="_fast_i_o_8cpp.html#a56c72b9f00680662229895ab22aaa743">fio_shiftOut</a> (<a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> dataRegister, <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> dataBit,
<a name="l00109"></a>00109 <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> clockRegister, <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> clockBit,
<a name="l00110"></a>00110 uint8_t value, uint8_t bitOrder)
<a name="l00111"></a>00111 {
<a name="l00112"></a>00112 <span class="comment">// # disable interrupts</span>
<a name="l00113"></a>00113 int8_t i;
<a name="l00114"></a>00114
<a name="l00115"></a>00115 <span class="keywordflow">if</span>(bitOrder == LSBFIRST)
<a name="l00116"></a>00116 {
<a name="l00117"></a>00117 <span class="keywordflow">for</span>(i = 0; i &lt; 8; i++)
<a name="l00118"></a>00118 {
<a name="l00119"></a>00119 <a class="code" href="_fast_i_o_8h.html#a04971fe5fabe4129736708c494e08e6d">ATOMIC_BLOCK</a>(<a class="code" href="_fast_i_o_8h.html#a362c18b15a09703e42e1c246c47420ef">ATOMIC_RESTORESTATE</a>)
<a name="l00120"></a>00120 {
<a name="l00121"></a>00121 <span class="keywordflow">if</span>(value &amp; 1)
<a name="l00122"></a>00122 {
<a name="l00123"></a>00123 <a class="code" href="_fast_i_o_8h.html#a89e1c62276052100c62b6c82a2e95622">fio_digitalWrite_HIGH</a>(dataRegister, dataBit);
<a name="l00124"></a>00124 }
<a name="l00125"></a>00125 <span class="keywordflow">else</span>
<a name="l00126"></a>00126 {
<a name="l00127"></a>00127 <a class="code" href="_fast_i_o_8h.html#ac8f00a1bccb98109531b88fbb6e91478">fio_digitalWrite_LOW</a>(dataRegister, dataBit);
<a name="l00128"></a>00128 }
<a name="l00129"></a>00129 value &gt;&gt;= 1;
<a name="l00130"></a>00130 <a class="code" href="_fast_i_o_8h.html#a89e1c62276052100c62b6c82a2e95622">fio_digitalWrite_HIGH</a> (clockRegister, clockBit);
<a name="l00131"></a>00131 <a class="code" href="_fast_i_o_8h.html#ac8f00a1bccb98109531b88fbb6e91478">fio_digitalWrite_LOW</a> (clockRegister,clockBit);
<a name="l00132"></a>00132 }
<a name="l00133"></a>00133 }
<a name="l00134"></a>00134
<a name="l00135"></a>00135 }
<a name="l00136"></a>00136 <span class="keywordflow">else</span>
<a name="l00137"></a>00137 {
<a name="l00138"></a>00138 <span class="keywordflow">for</span>(i = 0; i &lt; 8; i++)
<a name="l00139"></a>00139 {
<a name="l00140"></a>00140 <a class="code" href="_fast_i_o_8h.html#a04971fe5fabe4129736708c494e08e6d">ATOMIC_BLOCK</a>(<a class="code" href="_fast_i_o_8h.html#a362c18b15a09703e42e1c246c47420ef">ATOMIC_RESTORESTATE</a>)
<a name="l00141"></a>00141 {
<a name="l00142"></a>00142 <span class="keywordflow">if</span>(value &amp; 0x80)
<a name="l00143"></a>00143 {
<a name="l00144"></a>00144 <a class="code" href="_fast_i_o_8h.html#a89e1c62276052100c62b6c82a2e95622">fio_digitalWrite_HIGH</a>(dataRegister, dataBit);
<a name="l00145"></a>00145 }
<a name="l00146"></a>00146 <span class="keywordflow">else</span>
<a name="l00147"></a>00147 {
<a name="l00148"></a>00148 <a class="code" href="_fast_i_o_8h.html#ac8f00a1bccb98109531b88fbb6e91478">fio_digitalWrite_LOW</a>(dataRegister, dataBit);
<a name="l00149"></a>00149 }
<a name="l00150"></a>00150 value &lt;&lt;= 1;
<a name="l00151"></a>00151 <a class="code" href="_fast_i_o_8h.html#a89e1c62276052100c62b6c82a2e95622">fio_digitalWrite_HIGH</a> (clockRegister, clockBit);
<a name="l00152"></a>00152 <a class="code" href="_fast_i_o_8h.html#ac8f00a1bccb98109531b88fbb6e91478">fio_digitalWrite_LOW</a> (clockRegister,clockBit);
<a name="l00153"></a>00153 }
<a name="l00154"></a>00154 }
<a name="l00155"></a>00155 }
<a name="l00156"></a>00156 }
<a name="l00157"></a>00157
<a name="l00158"></a>00158
<a name="l00159"></a><a class="code" href="_fast_i_o_8h.html#a5d8d5977294d614d15bda19f75d6b787">00159</a> <span class="keywordtype">void</span> <a class="code" href="_fast_i_o_8cpp.html#a56c72b9f00680662229895ab22aaa743">fio_shiftOut</a>(<a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> dataRegister, <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> dataBit,
<a name="l00160"></a>00160 <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> clockRegister, <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> clockBit)
<a name="l00161"></a>00161 {
<a name="l00162"></a>00162 <a class="code" href="_fast_i_o_8h.html#a04971fe5fabe4129736708c494e08e6d">ATOMIC_BLOCK</a>(<a class="code" href="_fast_i_o_8h.html#a362c18b15a09703e42e1c246c47420ef">ATOMIC_RESTORESTATE</a>)
<a name="l00163"></a>00163 {
<a name="l00164"></a>00164 <span class="comment">// shift out 0x0 (B00000000) fast, byte order is irrelevant</span>
<a name="l00165"></a>00165 <a class="code" href="_fast_i_o_8h.html#ac8f00a1bccb98109531b88fbb6e91478">fio_digitalWrite_LOW</a> (dataRegister, dataBit);
<a name="l00166"></a>00166
<a name="l00167"></a>00167 <span class="keywordflow">for</span>(uint8_t i = 0; i&lt;8; ++i)
<a name="l00168"></a>00168 {
<a name="l00169"></a>00169 <a class="code" href="_fast_i_o_8h.html#a89e1c62276052100c62b6c82a2e95622">fio_digitalWrite_HIGH</a> (clockRegister, clockBit);
<a name="l00170"></a>00170 <a class="code" href="_fast_i_o_8h.html#a6d1dffed7f0c8f28f6c88146315f7832">fio_digitalWrite_SWITCH</a> (clockRegister, clockBit);
<a name="l00171"></a>00171 }
<a name="l00172"></a>00172 }
<a name="l00173"></a>00173 }
<a name="l00174"></a>00174
<a name="l00175"></a>00175
<a name="l00176"></a><a class="code" href="_fast_i_o_8h.html#ae4b2e099f8ade9ee674d1565669e870a">00176</a> <span class="keywordtype">void</span> <a class="code" href="_fast_i_o_8cpp.html#ae4b2e099f8ade9ee674d1565669e870a">fio_shiftOut1_init</a>(uint8_t pin)
<a name="l00177"></a>00177 {
<a name="l00178"></a>00178 <a class="code" href="_fast_i_o_8cpp.html#ae4b2e099f8ade9ee674d1565669e870a">fio_shiftOut1_init</a>(<a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(pin,HIGH),<a class="code" href="_fast_i_o_8cpp.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a>(pin));
<a name="l00179"></a>00179 }
<a name="l00180"></a>00180
<a name="l00181"></a><a class="code" href="_fast_i_o_8h.html#a2d0e4495eb12504255bbd3f82405b17b">00181</a> <span class="keywordtype">void</span> <a class="code" href="_fast_i_o_8cpp.html#ae4b2e099f8ade9ee674d1565669e870a">fio_shiftOut1_init</a>(<a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> shift1Register, <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> shift1Bit)
<a name="l00182"></a>00182 {
<a name="l00183"></a>00183 <span class="comment">// Make sure that capacitors are charged</span>
<a name="l00184"></a>00184 <span class="comment">// 300us is an educated guess...</span>
<a name="l00185"></a>00185 <a class="code" href="_fast_i_o_8cpp.html#ae91bbe682b02a5842c291055c0e998b5">fio_digitalWrite</a>(shift1Register,shift1Bit,HIGH);
<a name="l00186"></a>00186 delayMicroseconds(300);
<a name="l00187"></a>00187 }
<a name="l00188"></a>00188
<a name="l00189"></a>00189
<a name="l00190"></a><a class="code" href="_fast_i_o_8h.html#a33ce251dcd6b448185cda415a99001cf">00190</a> <span class="keywordtype">void</span> <a class="code" href="_fast_i_o_8cpp.html#a5b4d1684030dc620938b7c2fbdf5ced8">fio_shiftOut1</a>(<a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> shift1Register, <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> shift1Bit, uint8_t value,
<a name="l00191"></a>00191 <span class="keywordtype">boolean</span> noLatch)
<a name="l00192"></a>00192 {
<a name="l00193"></a>00193 <span class="comment">/*</span>
<a name="l00194"></a>00194 <span class="comment"> * this function are based on Shif1 protocol developed by Roman Black </span>
<a name="l00195"></a>00195 <span class="comment"> * (http://www.romanblack.com/shift1.htm)</span>
<a name="l00196"></a>00196 <span class="comment"> *</span>
<a name="l00197"></a>00197 <span class="comment"> * test sketches:</span>
<a name="l00198"></a>00198 <span class="comment"> * http://pastebin.com/raw.php?i=2hnC9v2Z</span>
<a name="l00199"></a>00199 <span class="comment"> * http://pastebin.com/raw.php?i=bGg4DhXQ</span>
<a name="l00200"></a>00200 <span class="comment"> * http://pastebin.com/raw.php?i=tg1ZFiM5</span>
<a name="l00201"></a>00201 <span class="comment"> * http://pastebin.com/raw.php?i=93ExPDD3 - cascading</span>
<a name="l00202"></a>00202 <span class="comment"> * tested with:</span>
<a name="l00203"></a>00203 <span class="comment"> * TPIC6595N - seems to work fine (circuit: http://www.3guys1laser.com/</span>
<a name="l00204"></a>00204 <span class="comment"> * arduino-one-wire-shift-register-prototype)</span>
<a name="l00205"></a>00205 <span class="comment"> * 7HC595N</span>
<a name="l00206"></a>00206 <span class="comment"> */</span>
<a name="l00207"></a>00207
<a name="l00208"></a>00208 <span class="comment">// iterate but ignore last bit (is it correct now?)</span>
<a name="l00209"></a>00209 <span class="keywordflow">for</span>(int8_t i = 7; i&gt;=0; --i)
<a name="l00210"></a>00210 {
<a name="l00211"></a>00211
<a name="l00212"></a>00212 <span class="comment">// assume that pin is HIGH (smokin&#39; pot all day... :) - requires </span>
<a name="l00213"></a>00213 <span class="comment">// initialization</span>
<a name="l00214"></a>00214 <span class="keywordflow">if</span>(value &amp; _BV(i))
<a name="l00215"></a>00215 {
<a name="l00216"></a>00216 <a class="code" href="_fast_i_o_8h.html#a04971fe5fabe4129736708c494e08e6d">ATOMIC_BLOCK</a>(<a class="code" href="_fast_i_o_8h.html#a362c18b15a09703e42e1c246c47420ef">ATOMIC_RESTORESTATE</a>)
<a name="l00217"></a>00217 {
<a name="l00218"></a>00218 <span class="comment">// HIGH = 1 Bit</span>
<a name="l00219"></a>00219 <a class="code" href="_fast_i_o_8h.html#accae9687fdfc5f3492fb6344d62eb190">fio_digitalWrite_SWITCHTO</a>(shift1Register,shift1Bit,LOW);
<a name="l00220"></a>00220 <span class="comment">//hold pin LOW for 1us - done! :)</span>
<a name="l00221"></a>00221 <a class="code" href="_fast_i_o_8h.html#accae9687fdfc5f3492fb6344d62eb190">fio_digitalWrite_SWITCHTO</a>(shift1Register,shift1Bit,HIGH);
<a name="l00222"></a>00222 } <span class="comment">// end critical section</span>
<a name="l00223"></a>00223 <span class="comment">//hold pin HIGH for 15us</span>
<a name="l00224"></a>00224 delayMicroseconds(15);
<a name="l00225"></a>00225 }
<a name="l00226"></a>00226 <span class="keywordflow">else</span>
<a name="l00227"></a>00227 {
<a name="l00228"></a>00228 <a class="code" href="_fast_i_o_8h.html#a04971fe5fabe4129736708c494e08e6d">ATOMIC_BLOCK</a>(<a class="code" href="_fast_i_o_8h.html#a362c18b15a09703e42e1c246c47420ef">ATOMIC_RESTORESTATE</a>)
<a name="l00229"></a>00229 {
<a name="l00230"></a>00230 <span class="comment">// LOW = 0 Bit</span>
<a name="l00231"></a>00231 <a class="code" href="_fast_i_o_8h.html#accae9687fdfc5f3492fb6344d62eb190">fio_digitalWrite_SWITCHTO</a>(shift1Register,shift1Bit,LOW);
<a name="l00232"></a>00232 <span class="comment">// hold pin LOW for 15us</span>
<a name="l00233"></a>00233 delayMicroseconds(15);
<a name="l00234"></a>00234 <a class="code" href="_fast_i_o_8h.html#accae9687fdfc5f3492fb6344d62eb190">fio_digitalWrite_SWITCHTO</a>(shift1Register,shift1Bit,HIGH);
<a name="l00235"></a>00235 } <span class="comment">// end critical section</span>
<a name="l00236"></a>00236
<a name="l00237"></a>00237 <span class="comment">// hold pin HIGH for 30us</span>
<a name="l00238"></a>00238 delayMicroseconds(30);
<a name="l00239"></a>00239 }
<a name="l00240"></a>00240 <span class="keywordflow">if</span>(!noLatch &amp;&amp; i==1)
<a name="l00241"></a>00241 {
<a name="l00242"></a>00242 <span class="keywordflow">break</span>;
<a name="l00243"></a>00243 }
<a name="l00244"></a>00244 }
<a name="l00245"></a>00245
<a name="l00246"></a>00246 <span class="keywordflow">if</span>(!noLatch)
<a name="l00247"></a>00247 {
<a name="l00248"></a>00248 <a class="code" href="_fast_i_o_8h.html#a04971fe5fabe4129736708c494e08e6d">ATOMIC_BLOCK</a>(<a class="code" href="_fast_i_o_8h.html#a362c18b15a09703e42e1c246c47420ef">ATOMIC_RESTORESTATE</a>)
<a name="l00249"></a>00249 {
<a name="l00250"></a>00250 <span class="comment">// send last bit (=LOW) and Latch command</span>
<a name="l00251"></a>00251 <a class="code" href="_fast_i_o_8h.html#accae9687fdfc5f3492fb6344d62eb190">fio_digitalWrite_SWITCHTO</a>(shift1Register,shift1Bit,LOW);
<a name="l00252"></a>00252 } <span class="comment">// end critical section</span>
<a name="l00253"></a>00253 delayMicroseconds(199); <span class="comment">// Hold pin low for 200us</span>
<a name="l00254"></a>00254
<a name="l00255"></a>00255 <a class="code" href="_fast_i_o_8h.html#a04971fe5fabe4129736708c494e08e6d">ATOMIC_BLOCK</a>(<a class="code" href="_fast_i_o_8h.html#a362c18b15a09703e42e1c246c47420ef">ATOMIC_RESTORESTATE</a>)
<a name="l00256"></a>00256 {
<a name="l00257"></a>00257 <a class="code" href="_fast_i_o_8h.html#a89e1c62276052100c62b6c82a2e95622">fio_digitalWrite_HIGH</a>(shift1Register,shift1Bit);
<a name="l00258"></a>00258 } <span class="comment">// end critical section</span>
<a name="l00259"></a>00259 delayMicroseconds(299); <span class="comment">// Hold pin high for 300us and leave it that </span>
<a name="l00260"></a>00260 <span class="comment">// way - using explicit HIGH here, just in case.</span>
<a name="l00261"></a>00261 }
<a name="l00262"></a>00262 }
<a name="l00263"></a>00263
<a name="l00264"></a><a class="code" href="_fast_i_o_8h.html#af2aac35d9a8ab7a2c87672f2c7cbbafb">00264</a> <span class="keywordtype">void</span> <a class="code" href="_fast_i_o_8cpp.html#a5b4d1684030dc620938b7c2fbdf5ced8">fio_shiftOut1</a>(uint8_t pin, uint8_t value, <span class="keywordtype">boolean</span> noLatch)
<a name="l00265"></a>00265 {
<a name="l00266"></a>00266 <a class="code" href="_fast_i_o_8cpp.html#a5b4d1684030dc620938b7c2fbdf5ced8">fio_shiftOut1</a>(<a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(pin, <a class="code" href="_fast_i_o_8h.html#a688a4adbb87520a2b68681bd6bfb199e">SKIP</a>),<a class="code" href="_fast_i_o_8cpp.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a>(pin),value, noLatch);
<a name="l00267"></a>00267 }
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,786 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/FastIO.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/FastIO.h File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;WProgram.h&gt;</code><br/>
<code>#include &lt;pins_arduino.h&gt;</code><br/>
<code>#include &lt;inttypes.h&gt;</code><br/>
</div>
<p><a href="_fast_i_o_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#a04971fe5fabe4129736708c494e08e6d">ATOMIC_BLOCK</a>(dummy)&#160;&#160;&#160;if(true)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#a362c18b15a09703e42e1c246c47420ef">ATOMIC_RESTORESTATE</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#a89e1c62276052100c62b6c82a2e95622">fio_digitalWrite_HIGH</a>(reg, bit)&#160;&#160;&#160;digitalWrite(bit,HIGH)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#ac8f00a1bccb98109531b88fbb6e91478">fio_digitalWrite_LOW</a>(reg, bit)&#160;&#160;&#160;digitalWrite(bit,LOW)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#a6d1dffed7f0c8f28f6c88146315f7832">fio_digitalWrite_SWITCH</a>(reg, bit)&#160;&#160;&#160;digitalWrite(bit, !digitalRead(bit))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#accae9687fdfc5f3492fb6344d62eb190">fio_digitalWrite_SWITCHTO</a>(reg, bit, val)&#160;&#160;&#160;digitalWrite(bit,val);</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#a32f90d0ad5c1295c97cc1e79936aadd6">FIO_FALLBACK</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#a688a4adbb87520a2b68681bd6bfb199e">SKIP</a>&#160;&#160;&#160;0x23</td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#a197336e47e1c3f929056ce3abbbc7e8d">fio_digitalRead</a> (<a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> pinRegister, <a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> pinBit)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#ae91bbe682b02a5842c291055c0e998b5">fio_digitalWrite</a> (<a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> pinRegister, <a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> pinBit, uint8_t value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a> (uint8_t pin)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#afb934fc0ded94cbb5ed8ed14e2a123ed">fio_pinToInputRegister</a> (uint8_t pin)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#a385ae40d960c1a57e86818332476a802">fio_pinToOutputRegister</a> (uint8_t pin, uint8_t initial_state=LOW)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#a5d8d5977294d614d15bda19f75d6b787">fio_shiftOut</a> (<a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> dataRegister, <a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> dataBit, <a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> clockRegister, <a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> clockBit)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#a56c72b9f00680662229895ab22aaa743">fio_shiftOut</a> (<a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> dataRegister, <a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> dataBit, <a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> clockRegister, <a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> clockBit, uint8_t value, uint8_t bitOrder)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#a33ce251dcd6b448185cda415a99001cf">fio_shiftOut1</a> (<a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> shift1Register, <a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> shift1Bit, uint8_t value, boolean noLatch=false)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#af2aac35d9a8ab7a2c87672f2c7cbbafb">fio_shiftOut1</a> (uint8_t pin, uint8_t value, boolean noLatch=false)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#a2d0e4495eb12504255bbd3f82405b17b">fio_shiftOut1_init</a> (<a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> shift1Register, <a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> shift1Bit)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_fast_i_o_8h.html#ae4b2e099f8ade9ee674d1565669e870a">fio_shiftOut1_init</a> (uint8_t pin)</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a04971fe5fabe4129736708c494e08e6d"></a><!-- doxytag: member="FastIO.h::ATOMIC_BLOCK" ref="a04971fe5fabe4129736708c494e08e6d" args="(dummy)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ATOMIC_BLOCK</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">dummy</td><td>)</td>
<td>&#160;&#160;&#160;if(true)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_fast_i_o_8h_source.html#l00058">58</a> of file <a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>.</p>
</div>
</div>
<a class="anchor" id="a362c18b15a09703e42e1c246c47420ef"></a><!-- doxytag: member="FastIO.h::ATOMIC_RESTORESTATE" ref="a362c18b15a09703e42e1c246c47420ef" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define ATOMIC_RESTORESTATE</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_fast_i_o_8h_source.html#l00059">59</a> of file <a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>.</p>
</div>
</div>
<a class="anchor" id="a89e1c62276052100c62b6c82a2e95622"></a><!-- doxytag: member="FastIO.h::fio_digitalWrite_HIGH" ref="a89e1c62276052100c62b6c82a2e95622" args="(reg, bit)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define fio_digitalWrite_HIGH</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">reg, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">bit&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td>&#160;&#160;&#160;digitalWrite(bit,HIGH)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This is where the magic happens that makes things fast. Implemented as preprocessor directives to force inlining SWITCH is fast for FIO but probably slow for FIO_FALLBACK so SWITCHTO is recommended if the value is known. </p>
<p>Definition at line <a class="el" href="_fast_i_o_8h_source.html#l00143">143</a> of file <a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>.</p>
</div>
</div>
<a class="anchor" id="ac8f00a1bccb98109531b88fbb6e91478"></a><!-- doxytag: member="FastIO.h::fio_digitalWrite_LOW" ref="ac8f00a1bccb98109531b88fbb6e91478" args="(reg, bit)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define fio_digitalWrite_LOW</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">reg, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">bit&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td>&#160;&#160;&#160;digitalWrite(bit,LOW)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_fast_i_o_8h_source.html#l00144">144</a> of file <a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>.</p>
</div>
</div>
<a class="anchor" id="a6d1dffed7f0c8f28f6c88146315f7832"></a><!-- doxytag: member="FastIO.h::fio_digitalWrite_SWITCH" ref="a6d1dffed7f0c8f28f6c88146315f7832" args="(reg, bit)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define fio_digitalWrite_SWITCH</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">reg, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">bit&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td>&#160;&#160;&#160;digitalWrite(bit, !digitalRead(bit))</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_fast_i_o_8h_source.html#l00145">145</a> of file <a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>.</p>
</div>
</div>
<a class="anchor" id="accae9687fdfc5f3492fb6344d62eb190"></a><!-- doxytag: member="FastIO.h::fio_digitalWrite_SWITCHTO" ref="accae9687fdfc5f3492fb6344d62eb190" args="(reg, bit, val)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define fio_digitalWrite_SWITCHTO</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">reg, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">bit, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">val&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td>&#160;&#160;&#160;digitalWrite(bit,val);</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_fast_i_o_8h_source.html#l00146">146</a> of file <a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>.</p>
</div>
</div>
<a class="anchor" id="a32f90d0ad5c1295c97cc1e79936aadd6"></a><!-- doxytag: member="FastIO.h::FIO_FALLBACK" ref="a32f90d0ad5c1295c97cc1e79936aadd6" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FIO_FALLBACK</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_fast_i_o_8h_source.html#l00057">57</a> of file <a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>.</p>
</div>
</div>
<a class="anchor" id="a688a4adbb87520a2b68681bd6bfb199e"></a><!-- doxytag: member="FastIO.h::SKIP" ref="a688a4adbb87520a2b68681bd6bfb199e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SKIP&#160;&#160;&#160;0x23</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_fast_i_o_8h_source.html#l00042">42</a> of file <a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>.</p>
</div>
</div>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="a0a595a88b29bcfd1540b6fac75787937"></a><!-- doxytag: member="FastIO.h::fio_bit" ref="a0a595a88b29bcfd1540b6fac75787937" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uint8_t <a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_fast_i_o_8h_source.html#l00060">60</a> of file <a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>.</p>
</div>
</div>
<a class="anchor" id="ae44ea3af54ef26db03f1ae2ea62f9c1f"></a><!-- doxytag: member="FastIO.h::fio_register" ref="ae44ea3af54ef26db03f1ae2ea62f9c1f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef uint8_t <a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_fast_i_o_8h_source.html#l00061">61</a> of file <a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>.</p>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a197336e47e1c3f929056ce3abbbc7e8d"></a><!-- doxytag: member="FastIO.h::fio_digitalRead" ref="a197336e47e1c3f929056ce3abbbc7e8d" args="(fio_register pinRegister, fio_bit pinBit)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int fio_digitalRead </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td>
<td class="paramname"><em>pinRegister</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td>
<td class="paramname"><em>pinBit</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>direct digital read without any checks falls back to normal digitalRead if fast io is disabled </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pinRegister[in]</td><td>Register - ignored if fast io is disabled </td></tr>
<tr><td class="paramname">pinBit[in]</td><td>Bit - Pin if fast io is disabled </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Value read from pin </dd></dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00095">95</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ae91bbe682b02a5842c291055c0e998b5"></a><!-- doxytag: member="FastIO.h::fio_digitalWrite" ref="ae91bbe682b02a5842c291055c0e998b5" args="(fio_register pinRegister, fio_bit pinBit, uint8_t value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fio_digitalWrite </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td>
<td class="paramname"><em>pinRegister</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td>
<td class="paramname"><em>pinBit</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>direct digital write without any checks falls back to normal digitalWrite if fast io is disabled </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pinRegister[in]</td><td>Register - ignored if fast digital write is disabled </td></tr>
<tr><td class="paramname">pinBit[in]</td><td>Bit - Pin if fast digital write is disabled </td></tr>
<tr><td class="paramname">value[in]</td><td>desired output </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00076">76</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a07a19dfbdca1afaca5d666bdaa3be7d5"></a><!-- doxytag: member="FastIO.h::fio_pinToBit" ref="a07a19dfbdca1afaca5d666bdaa3be7d5" args="(uint8_t pin)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> fio_pinToBit </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>pin</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Find the bit which belongs to specified pin if fast digitalWrite is disabled this function returns the pin </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pin[in]</td><td>Number of a digital pin </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Bit </dd></dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00065">65</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="afb934fc0ded94cbb5ed8ed14e2a123ed"></a><!-- doxytag: member="FastIO.h::fio_pinToInputRegister" ref="afb934fc0ded94cbb5ed8ed14e2a123ed" args="(uint8_t pin)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> fio_pinToInputRegister </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>pin</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the input register for specified pin. if fast digital IO is disabled this function returns NULL </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pin[in]</td><td>Number of a digital pin </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Register </dd></dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00052">52</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a385ae40d960c1a57e86818332476a802"></a><!-- doxytag: member="FastIO.h::fio_pinToOutputRegister" ref="a385ae40d960c1a57e86818332476a802" args="(uint8_t pin, uint8_t initial_state=LOW)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> fio_pinToOutputRegister </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>pin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>initial_state</em> = <code>LOW</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get the output register for specified pin. if fast digital IO is disabled this function returns NULL </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pin[in]</td><td>Number of a digital pin </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Register </dd></dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00035">35</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a5d8d5977294d614d15bda19f75d6b787"></a><!-- doxytag: member="FastIO.h::fio_shiftOut" ref="a5d8d5977294d614d15bda19f75d6b787" args="(fio_register dataRegister, fio_bit dataBit, fio_register clockRegister, fio_bit clockBit)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fio_shiftOut </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td>
<td class="paramname"><em>dataRegister</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td>
<td class="paramname"><em>dataBit</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td>
<td class="paramname"><em>clockRegister</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td>
<td class="paramname"><em>clockBit</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>faster shift out clear using fast digital write falls back to normal digitalWrite if fastio is disabled </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">dataRegister[in]</td><td>Register of data pin - ignored if fast digital write is disabled </td></tr>
<tr><td class="paramname">dataBit[in]</td><td>Bit of data pin - Pin if fast digital write is disabled </td></tr>
<tr><td class="paramname">clockRegister[in]</td><td>Register of data pin - ignored if fast digital write is disabled </td></tr>
<tr><td class="paramname">clockBit[in]</td><td>Bit of data pin - Pin if fast digital write is disabled </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00159">159</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a56c72b9f00680662229895ab22aaa743"></a><!-- doxytag: member="FastIO.h::fio_shiftOut" ref="a56c72b9f00680662229895ab22aaa743" args="(fio_register dataRegister, fio_bit dataBit, fio_register clockRegister, fio_bit clockBit, uint8_t value, uint8_t bitOrder)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fio_shiftOut </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td>
<td class="paramname"><em>dataRegister</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td>
<td class="paramname"><em>dataBit</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td>
<td class="paramname"><em>clockRegister</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td>
<td class="paramname"><em>clockBit</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>bitOrder</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>faster shift out using fast digital write falls back to normal digitalWrite if fastio is disabled </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">dataRegister[in]</td><td>Register of data pin - ignored if fast digital write is disabled </td></tr>
<tr><td class="paramname">dataBit[in]</td><td>Bit of data pin - Pin if fast digital write is disabled </td></tr>
<tr><td class="paramname">clockRegister[in]</td><td>Register of data pin - ignored if fast digital write is disabled </td></tr>
<tr><td class="paramname">clockBit[in]</td><td>Bit of data pin - Pin if fast digital write is disabled </td></tr>
<tr><td class="paramname">bitOrder[in]</td><td>bit order </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00108">108</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a33ce251dcd6b448185cda415a99001cf"></a><!-- doxytag: member="FastIO.h::fio_shiftOut1" ref="a33ce251dcd6b448185cda415a99001cf" args="(fio_register shift1Register, fio_bit shift1Bit, uint8_t value, boolean noLatch=false)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fio_shiftOut1 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td>
<td class="paramname"><em>shift1Register</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td>
<td class="paramname"><em>shift1Bit</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">boolean&#160;</td>
<td class="paramname"><em>noLatch</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>one wire shift out protocol needs initialisation (fio_shiftOut1_init) </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">shift1Register[in]</td><td>pins register </td></tr>
<tr><td class="paramname">shift1Bit[in]</td><td>pins bit </td></tr>
<tr><td class="paramname">value[in]</td><td>value to shift out, last byte is ignored and always shifted out LOW </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00190">190</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="af2aac35d9a8ab7a2c87672f2c7cbbafb"></a><!-- doxytag: member="FastIO.h::fio_shiftOut1" ref="af2aac35d9a8ab7a2c87672f2c7cbbafb" args="(uint8_t pin, uint8_t value, boolean noLatch=false)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fio_shiftOut1 </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>pin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">boolean&#160;</td>
<td class="paramname"><em>noLatch</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>one wire shift out protocol needs initialisation (fio_shiftOut1_init) </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pin[in]</td><td>digital pin </td></tr>
<tr><td class="paramname">value[in]</td><td>value to shift out, last byte is ignored and always shifted out LOW </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00264">264</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a2d0e4495eb12504255bbd3f82405b17b"></a><!-- doxytag: member="FastIO.h::fio_shiftOut1_init" ref="a2d0e4495eb12504255bbd3f82405b17b" args="(fio_register shift1Register, fio_bit shift1Bit)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fio_shiftOut1_init </td>
<td>(</td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>&#160;</td>
<td class="paramname"><em>shift1Register</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>&#160;</td>
<td class="paramname"><em>shift1Bit</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>initializes one wire shift out protocol Puts pin to HIGH state and delays until Capacitors are charged. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">shift1Register[in]</td><td>pins register </td></tr>
<tr><td class="paramname">shift1Bit[in]</td><td>pins bit </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00181">181</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ae4b2e099f8ade9ee674d1565669e870a"></a><!-- doxytag: member="FastIO.h::fio_shiftOut1_init" ref="ae4b2e099f8ade9ee674d1565669e870a" args="(uint8_t pin)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fio_shiftOut1_init </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>pin</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>initializes one wire shift out protocol Puts pin to HIGH state and delays until Capacitors are charged. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pin[in]</td><td>digital pin </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_fast_i_o_8cpp_source.html#l00176">176</a> of file <a class="el" href="_fast_i_o_8cpp_source.html">FastIO.cpp</a>.</p>
</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,209 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/FastIO.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/FastIO.h</div> </div>
</div>
<div class="contents">
<a href="_fast_i_o_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created by Florian Fida on 20/01/12</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2012 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">// http://creativecommons.org/licenses/by-sa/3.0/</span>
<a name="l00006"></a>00006 <span class="comment">//</span>
<a name="l00007"></a>00007 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no</span>
<a name="l00008"></a>00008 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00009"></a>00009 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00010"></a>00010 <span class="comment">// fio_shiftOut1 functions are based on Shif1 protocol developed by Roman Black </span>
<a name="l00011"></a>00011 <span class="comment">// (http://www.romanblack.com/shift1.htm)</span>
<a name="l00012"></a>00012 <span class="comment">//</span>
<a name="l00013"></a>00013 <span class="comment">// Thread Safe: No</span>
<a name="l00014"></a>00014 <span class="comment">// Extendable: Yes</span>
<a name="l00015"></a>00015 <span class="comment">//</span>
<a name="l00016"></a>00016 <span class="comment">// @file FastIO.h</span>
<a name="l00017"></a>00017 <span class="comment">// This file implements basic fast IO routines.</span>
<a name="l00018"></a>00018 <span class="comment">// </span>
<a name="l00019"></a>00019 <span class="comment">// @brief </span>
<a name="l00020"></a>00020 <span class="comment">//</span>
<a name="l00021"></a>00021 <span class="comment">// @version API 1.0.0</span>
<a name="l00022"></a>00022 <span class="comment">//</span>
<a name="l00023"></a>00023 <span class="comment">// @author Florian Fida -</span>
<a name="l00024"></a>00024 <span class="comment">// 2012-03-16 bperrybap mods for chipkit32 (pic32) Arduino</span>
<a name="l00025"></a>00025 <span class="comment">// support chipkit:</span>
<a name="l00026"></a>00026 <span class="comment">// (https://github.com/chipKIT32/chipKIT32-MAX/blob/master/hardware/pic32/</span>
<a name="l00027"></a>00027 <span class="comment">// cores/pic32/wiring_digital.c)</span>
<a name="l00028"></a>00028 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00029"></a>00029 <span class="preprocessor">#ifndef _FAST_IO_H_</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define _FAST_IO_H_</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span>
<a name="l00032"></a>00032 <span class="preprocessor">#if (ARDUINO &lt; 100)</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#include &lt;WProgram.h&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#else</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Arduino.h&gt;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#endif</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span>
<a name="l00038"></a>00038 <span class="preprocessor">#include &lt;pins_arduino.h&gt;</span> <span class="comment">// pleasing sanguino core</span>
<a name="l00039"></a>00039 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00040"></a>00040
<a name="l00041"></a>00041
<a name="l00042"></a><a class="code" href="_fast_i_o_8h.html#a688a4adbb87520a2b68681bd6bfb199e">00042</a> <span class="preprocessor">#define SKIP 0x23</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span>
<a name="l00044"></a>00044 <span class="preprocessor">#if defined (__AVR__)</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#include &lt;util/atomic.h&gt;</span> <span class="comment">// for critical section management</span>
<a name="l00046"></a>00046 <span class="keyword">typedef</span> uint8_t <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>;
<a name="l00047"></a>00047 <span class="keyword">typedef</span> <span class="keyword">volatile</span> uint8_t *<a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>;
<a name="l00048"></a>00048
<a name="l00049"></a>00049
<a name="l00050"></a>00050 <span class="preprocessor">#elif defined(__PIC32MX__)</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="keyword">typedef</span> uint32_t <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>;
<a name="l00052"></a>00052 <span class="keyword">typedef</span> <span class="keyword">volatile</span> uint32_t *<a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>;
<a name="l00053"></a>00053
<a name="l00054"></a>00054
<a name="l00055"></a>00055 <span class="preprocessor">#else</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="comment">// fallback to Arduino standard digital i/o routines</span>
<a name="l00057"></a><a class="code" href="_fast_i_o_8h.html#a32f90d0ad5c1295c97cc1e79936aadd6">00057</a> <span class="preprocessor">#define FIO_FALLBACK</span>
<a name="l00058"></a><a class="code" href="_fast_i_o_8h.html#a04971fe5fabe4129736708c494e08e6d">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define ATOMIC_BLOCK(dummy) if(true)</span>
<a name="l00059"></a><a class="code" href="_fast_i_o_8h.html#a362c18b15a09703e42e1c246c47420ef">00059</a> <span class="preprocessor"></span><span class="preprocessor">#define ATOMIC_RESTORESTATE</span>
<a name="l00060"></a><a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">00060</a> <span class="preprocessor"></span><span class="keyword">typedef</span> uint8_t <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a>;
<a name="l00061"></a><a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">00061</a> <span class="keyword">typedef</span> uint8_t <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a>;
<a name="l00062"></a>00062 <span class="preprocessor">#endif</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span>
<a name="l00064"></a>00064
<a name="l00065"></a>00065
<a name="l00066"></a>00066 <span class="preprocessor">#if !defined(FIO_FALLBACK) &amp;&amp; !defined(ATOMIC_BLOCK)</span>
<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="comment">/*</span>
<a name="l00068"></a>00068 <span class="comment"> * Define an ATOMIC_BLOCK that implements ATOMIC_FORCEON type</span>
<a name="l00069"></a>00069 <span class="comment"> * Using the portable Arduino interrupts() and noInterrupts()</span>
<a name="l00070"></a>00070 <span class="comment"> */</span>
<a name="l00071"></a>00071 <span class="preprocessor">#define ATOMIC_RESTORESTATE ATOMIC_FORCEON // sorry, no support for save/restore yet.</span>
<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor">#define ATOMIC_FORCEON uint8_t sreg_save \</span>
<a name="l00073"></a>00073 <span class="preprocessor"> __attribute__((__cleanup__(__iSeiParam))) = 0</span>
<a name="l00074"></a>00074 <span class="preprocessor"></span>
<a name="l00075"></a>00075 <span class="keyword">static</span> __inline__ uint8_t __iCliRetVal(<span class="keywordtype">void</span>)
<a name="l00076"></a>00076 {
<a name="l00077"></a>00077 noInterrupts();
<a name="l00078"></a>00078 <span class="keywordflow">return</span>(1);
<a name="l00079"></a>00079 }
<a name="l00080"></a>00080 <span class="keyword">static</span> __inline__ <span class="keywordtype">void</span> __iSeiParam(<span class="keyword">const</span> uint8_t *__s)
<a name="l00081"></a>00081 {
<a name="l00082"></a>00082 interrupts();
<a name="l00083"></a>00083 }
<a name="l00084"></a>00084 <span class="preprocessor">#define ATOMIC_BLOCK(type) for(type, __Todo = __iCliRetVal(); __Todo; __Todo = 0)</span>
<a name="l00085"></a>00085 <span class="preprocessor"></span>
<a name="l00086"></a>00086 <span class="preprocessor">#endif // end of block to create compatible ATOMIC_BLOCK()</span>
<a name="l00087"></a>00087 <span class="preprocessor"></span>
<a name="l00088"></a>00088
<a name="l00089"></a>00089
<a name="l00097"></a>00097 <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> <a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(uint8_t pin, uint8_t initial_state = LOW);
<a name="l00098"></a>00098
<a name="l00106"></a>00106 <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> <a class="code" href="_fast_i_o_8cpp.html#afb934fc0ded94cbb5ed8ed14e2a123ed">fio_pinToInputRegister</a>(uint8_t pin);
<a name="l00107"></a>00107
<a name="l00115"></a>00115 <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> <a class="code" href="_fast_i_o_8cpp.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a>(uint8_t pin);
<a name="l00116"></a>00116
<a name="l00117"></a>00117
<a name="l00127"></a>00127 <span class="comment">// __attribute__ ((always_inline)) /* let the optimizer decide that for now */</span>
<a name="l00128"></a>00128 <span class="keywordtype">void</span> <a class="code" href="_fast_i_o_8cpp.html#ae91bbe682b02a5842c291055c0e998b5">fio_digitalWrite</a> ( <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> pinRegister, <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> pinBit, uint8_t value );
<a name="l00129"></a>00129
<a name="l00136"></a>00136 <span class="preprocessor">#ifndef FIO_FALLBACK</span>
<a name="l00137"></a>00137 <span class="preprocessor"></span><span class="preprocessor">#define fio_digitalWrite_LOW(reg,bit) *reg &amp;= ~bit</span>
<a name="l00138"></a>00138 <span class="preprocessor"></span><span class="preprocessor">#define fio_digitalWrite_HIGH(reg,bit) *reg |= bit</span>
<a name="l00139"></a>00139 <span class="preprocessor"></span><span class="preprocessor">#define fio_digitalWrite_SWITCH(reg,bit) *reg ^= bit</span>
<a name="l00140"></a>00140 <span class="preprocessor"></span><span class="preprocessor">#define fio_digitalWrite_SWITCHTO(reg,bit,val) fio_digitalWrite_SWITCH(reg,bit)</span>
<a name="l00141"></a>00141 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00142"></a>00142 <span class="preprocessor"></span><span class="comment">// reg -&gt; dummy NULL, bit -&gt; pin</span>
<a name="l00143"></a><a class="code" href="_fast_i_o_8h.html#a89e1c62276052100c62b6c82a2e95622">00143</a> <span class="preprocessor">#define fio_digitalWrite_HIGH(reg,bit) digitalWrite(bit,HIGH)</span>
<a name="l00144"></a><a class="code" href="_fast_i_o_8h.html#ac8f00a1bccb98109531b88fbb6e91478">00144</a> <span class="preprocessor"></span><span class="preprocessor">#define fio_digitalWrite_LOW(reg,bit) digitalWrite(bit,LOW)</span>
<a name="l00145"></a><a class="code" href="_fast_i_o_8h.html#a6d1dffed7f0c8f28f6c88146315f7832">00145</a> <span class="preprocessor"></span><span class="preprocessor">#define fio_digitalWrite_SWITCH(reg,bit) digitalWrite(bit, !digitalRead(bit))</span>
<a name="l00146"></a><a class="code" href="_fast_i_o_8h.html#accae9687fdfc5f3492fb6344d62eb190">00146</a> <span class="preprocessor"></span><span class="preprocessor">#define fio_digitalWrite_SWITCHTO(reg,bit,val) digitalWrite(bit,val);</span>
<a name="l00147"></a>00147 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00148"></a>00148 <span class="preprocessor"></span>
<a name="l00158"></a>00158 <span class="keywordtype">int</span> <a class="code" href="_fast_i_o_8cpp.html#a83fc2fdc19ab3f9aade9e1a2f39e81a6">fio_digitalRead</a> ( <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> pinRegister, <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> pinBit );
<a name="l00159"></a>00159
<a name="l00171"></a>00171 <span class="keywordtype">void</span> <a class="code" href="_fast_i_o_8cpp.html#a56c72b9f00680662229895ab22aaa743">fio_shiftOut</a>( <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> dataRegister, <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> dataBit, <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> clockRegister,
<a name="l00172"></a>00172 <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> clockBit, uint8_t value, uint8_t bitOrder );
<a name="l00173"></a>00173
<a name="l00184"></a>00184 <span class="keywordtype">void</span> <a class="code" href="_fast_i_o_8cpp.html#a56c72b9f00680662229895ab22aaa743">fio_shiftOut</a>(<a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> dataRegister, <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> dataBit, <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> clockRegister, <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> clockBit);
<a name="l00185"></a>00185
<a name="l00194"></a>00194 <span class="keywordtype">void</span> <a class="code" href="_fast_i_o_8cpp.html#a5b4d1684030dc620938b7c2fbdf5ced8">fio_shiftOut1</a>(<a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> shift1Register, <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> shift1Bit, uint8_t value, <span class="keywordtype">boolean</span> noLatch = <span class="keyword">false</span>);
<a name="l00202"></a>00202 <span class="keywordtype">void</span> <a class="code" href="_fast_i_o_8cpp.html#a5b4d1684030dc620938b7c2fbdf5ced8">fio_shiftOut1</a>(uint8_t pin, uint8_t value, <span class="keywordtype">boolean</span> noLatch = <span class="keyword">false</span>);
<a name="l00210"></a>00210 <span class="keywordtype">void</span> <a class="code" href="_fast_i_o_8cpp.html#ae4b2e099f8ade9ee674d1565669e870a">fio_shiftOut1_init</a>(<a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> shift1Register, <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> shift1Bit);
<a name="l00217"></a>00217 <span class="keywordtype">void</span> <a class="code" href="_fast_i_o_8cpp.html#ae4b2e099f8ade9ee674d1565669e870a">fio_shiftOut1_init</a>(uint8_t pin);
<a name="l00218"></a>00218
<a name="l00219"></a>00219 <span class="preprocessor">#endif // FAST_IO_H</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,92 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/I2CIO.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/I2CIO.cpp File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;WProgram.h&gt;</code><br/>
<code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &lt;../Wire/Wire.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_i2_c_i_o_8h_source.html">I2CIO.h</a>&quot;</code><br/>
</div>
<p><a href="_i2_c_i_o_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
</table>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,282 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/I2CIO.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/I2CIO.cpp</div> </div>
</div>
<div class="contents">
<a href="_i2_c_i_o_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created by Francisco Malpartida on 20/08/11.</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2011 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no </span>
<a name="l00007"></a>00007 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// Thread Safe: No</span>
<a name="l00010"></a>00010 <span class="comment">// Extendable: Yes</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// @file I2CIO.h</span>
<a name="l00013"></a>00013 <span class="comment">// This file implements a basic IO library using the PCF8574 I2C IO Expander</span>
<a name="l00014"></a>00014 <span class="comment">// chip.</span>
<a name="l00015"></a>00015 <span class="comment">// </span>
<a name="l00016"></a>00016 <span class="comment">// @brief </span>
<a name="l00017"></a>00017 <span class="comment">// Implement a basic IO library to drive the PCF8574* I2C IO Expander ASIC.</span>
<a name="l00018"></a>00018 <span class="comment">// The library implements basic IO general methods to configure IO pin direction</span>
<a name="l00019"></a>00019 <span class="comment">// read and write uint8_t operations and basic pin level routines to set or read</span>
<a name="l00020"></a>00020 <span class="comment">// a particular IO port.</span>
<a name="l00021"></a>00021 <span class="comment">//</span>
<a name="l00022"></a>00022 <span class="comment">//</span>
<a name="l00023"></a>00023 <span class="comment">// @version API 1.0.0</span>
<a name="l00024"></a>00024 <span class="comment">//</span>
<a name="l00025"></a>00025 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
<a name="l00026"></a>00026 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00027"></a>00027 <span class="preprocessor">#if (ARDUINO &lt; 100)</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#include &lt;WProgram.h&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#else</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Arduino.h&gt;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#endif</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00034"></a>00034
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;../Wire/Wire.h&gt;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &quot;<a class="code" href="_i2_c_i_o_8h.html">I2CIO.h</a>&quot;</span>
<a name="l00037"></a>00037
<a name="l00038"></a>00038 <span class="comment">// CLASS VARIABLES</span>
<a name="l00039"></a>00039 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00040"></a>00040
<a name="l00041"></a>00041
<a name="l00042"></a>00042 <span class="comment">// CONSTRUCTOR</span>
<a name="l00043"></a>00043 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00044"></a><a class="code" href="class_i2_c_i_o.html#a32eb7832075ad6011d67874405a0d0a6">00044</a> <a class="code" href="class_i2_c_i_o.html#a32eb7832075ad6011d67874405a0d0a6">I2CIO::I2CIO</a> ( )
<a name="l00045"></a>00045 {
<a name="l00046"></a>00046 _i2cAddr = 0x0;
<a name="l00047"></a>00047 _dirMask = 0xFF; <span class="comment">// mark all as INPUTs</span>
<a name="l00048"></a>00048 _shadow = 0x0; <span class="comment">// no values set</span>
<a name="l00049"></a>00049 _initialised = <span class="keyword">false</span>;
<a name="l00050"></a>00050 }
<a name="l00051"></a>00051
<a name="l00052"></a>00052 <span class="comment">// PUBLIC METHODS</span>
<a name="l00053"></a>00053 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00054"></a>00054
<a name="l00055"></a>00055 <span class="comment">//</span>
<a name="l00056"></a>00056 <span class="comment">// begin</span>
<a name="l00057"></a><a class="code" href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">00057</a> <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">I2CIO::begin</a> ( uint8_t i2cAddr )
<a name="l00058"></a>00058 {
<a name="l00059"></a>00059 _i2cAddr = i2cAddr;
<a name="l00060"></a>00060
<a name="l00061"></a>00061 Wire.begin ( );
<a name="l00062"></a>00062
<a name="l00063"></a>00063 _initialised = Wire.requestFrom ( _i2cAddr, (uint8_t)1 );
<a name="l00064"></a>00064
<a name="l00065"></a>00065 <span class="preprocessor">#if (ARDUINO &lt; 100)</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span> _shadow = Wire.receive ();
<a name="l00067"></a>00067 <span class="preprocessor">#else</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span> _shadow = Wire.read (); <span class="comment">// Remove the byte read don&#39;t need it.</span>
<a name="l00069"></a>00069 <span class="preprocessor">#endif</span>
<a name="l00070"></a>00070 <span class="preprocessor"></span>
<a name="l00071"></a>00071 <span class="keywordflow">return</span> ( _initialised );
<a name="l00072"></a>00072 }
<a name="l00073"></a>00073
<a name="l00074"></a>00074 <span class="comment">//</span>
<a name="l00075"></a>00075 <span class="comment">// pinMode</span>
<a name="l00076"></a><a class="code" href="class_i2_c_i_o.html#a53b94274eb6bb68564cf5243323db887">00076</a> <span class="keywordtype">void</span> <a class="code" href="class_i2_c_i_o.html#a53b94274eb6bb68564cf5243323db887">I2CIO::pinMode</a> ( uint8_t pin, uint8_t dir )
<a name="l00077"></a>00077 {
<a name="l00078"></a>00078 <span class="keywordflow">if</span> ( _initialised )
<a name="l00079"></a>00079 {
<a name="l00080"></a>00080 <span class="keywordflow">if</span> ( OUTPUT == dir )
<a name="l00081"></a>00081 {
<a name="l00082"></a>00082 _dirMask &amp;= ~( 1 &lt;&lt; pin );
<a name="l00083"></a>00083 }
<a name="l00084"></a>00084 <span class="keywordflow">else</span>
<a name="l00085"></a>00085 {
<a name="l00086"></a>00086 _dirMask |= ( 1 &lt;&lt; pin );
<a name="l00087"></a>00087 }
<a name="l00088"></a>00088 }
<a name="l00089"></a>00089 }
<a name="l00090"></a>00090
<a name="l00091"></a>00091 <span class="comment">//</span>
<a name="l00092"></a>00092 <span class="comment">// portMode</span>
<a name="l00093"></a><a class="code" href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">00093</a> <span class="keywordtype">void</span> <a class="code" href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">I2CIO::portMode</a> ( uint8_t dir )
<a name="l00094"></a>00094 {
<a name="l00095"></a>00095
<a name="l00096"></a>00096 <span class="keywordflow">if</span> ( _initialised )
<a name="l00097"></a>00097 {
<a name="l00098"></a>00098 <span class="keywordflow">if</span> ( dir == INPUT )
<a name="l00099"></a>00099 {
<a name="l00100"></a>00100 _dirMask = 0xFF;
<a name="l00101"></a>00101 }
<a name="l00102"></a>00102 <span class="keywordflow">else</span>
<a name="l00103"></a>00103 {
<a name="l00104"></a>00104 _dirMask = 0x00;
<a name="l00105"></a>00105 }
<a name="l00106"></a>00106 }
<a name="l00107"></a>00107 }
<a name="l00108"></a>00108
<a name="l00109"></a>00109 <span class="comment">//</span>
<a name="l00110"></a>00110 <span class="comment">// read</span>
<a name="l00111"></a><a class="code" href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">00111</a> uint8_t <a class="code" href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">I2CIO::read</a> ( <span class="keywordtype">void</span> )
<a name="l00112"></a>00112 {
<a name="l00113"></a>00113 uint8_t retVal = 0;
<a name="l00114"></a>00114
<a name="l00115"></a>00115 <span class="keywordflow">if</span> ( _initialised )
<a name="l00116"></a>00116 {
<a name="l00117"></a>00117 Wire.requestFrom ( _i2cAddr, (uint8_t)1 );
<a name="l00118"></a>00118 <span class="preprocessor">#if (ARDUINO &lt; 100)</span>
<a name="l00119"></a>00119 <span class="preprocessor"></span> retVal = ( _dirMask &amp; Wire.receive ( ) );
<a name="l00120"></a>00120 <span class="preprocessor">#else</span>
<a name="l00121"></a>00121 <span class="preprocessor"></span> retVal = ( _dirMask &amp; Wire.read ( ) );
<a name="l00122"></a>00122 <span class="preprocessor">#endif </span>
<a name="l00123"></a>00123 <span class="preprocessor"></span>
<a name="l00124"></a>00124 }
<a name="l00125"></a>00125 <span class="keywordflow">return</span> ( retVal );
<a name="l00126"></a>00126 }
<a name="l00127"></a>00127
<a name="l00128"></a>00128 <span class="comment">//</span>
<a name="l00129"></a>00129 <span class="comment">// write</span>
<a name="l00130"></a><a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">00130</a> <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">I2CIO::write</a> ( uint8_t value )
<a name="l00131"></a>00131 {
<a name="l00132"></a>00132 <span class="keywordtype">int</span> status = 0;
<a name="l00133"></a>00133
<a name="l00134"></a>00134 <span class="keywordflow">if</span> ( _initialised )
<a name="l00135"></a>00135 {
<a name="l00136"></a>00136 <span class="comment">// Only write HIGH the values of the ports that have been initialised as</span>
<a name="l00137"></a>00137 <span class="comment">// outputs updating the output shadow of the device</span>
<a name="l00138"></a>00138 _shadow = ( value &amp; ~(_dirMask) );
<a name="l00139"></a>00139
<a name="l00140"></a>00140 Wire.beginTransmission ( _i2cAddr );
<a name="l00141"></a>00141 <span class="preprocessor">#if (ARDUINO &lt; 100)</span>
<a name="l00142"></a>00142 <span class="preprocessor"></span> Wire.send ( _shadow );
<a name="l00143"></a>00143 <span class="preprocessor">#else</span>
<a name="l00144"></a>00144 <span class="preprocessor"></span> Wire.write ( _shadow );
<a name="l00145"></a>00145 <span class="preprocessor">#endif </span>
<a name="l00146"></a>00146 <span class="preprocessor"></span> status = Wire.endTransmission ();
<a name="l00147"></a>00147 }
<a name="l00148"></a>00148 <span class="keywordflow">return</span> ( (status == 0) );
<a name="l00149"></a>00149 }
<a name="l00150"></a>00150
<a name="l00151"></a>00151 <span class="comment">//</span>
<a name="l00152"></a>00152 <span class="comment">// digitalRead</span>
<a name="l00153"></a><a class="code" href="class_i2_c_i_o.html#ac26221011a8b49bcea9ef62712ea88a7">00153</a> uint8_t <a class="code" href="class_i2_c_i_o.html#ac26221011a8b49bcea9ef62712ea88a7">I2CIO::digitalRead</a> ( uint8_t pin )
<a name="l00154"></a>00154 {
<a name="l00155"></a>00155 uint8_t pinVal = 0;
<a name="l00156"></a>00156
<a name="l00157"></a>00157 <span class="comment">// Check if initialised and that the pin is within range of the device</span>
<a name="l00158"></a>00158 <span class="comment">// -------------------------------------------------------------------</span>
<a name="l00159"></a>00159 <span class="keywordflow">if</span> ( ( _initialised ) &amp;&amp; ( pin &lt;= 7 ) )
<a name="l00160"></a>00160 {
<a name="l00161"></a>00161 <span class="comment">// Remove the values which are not inputs and get the value of the pin</span>
<a name="l00162"></a>00162 pinVal = this-&gt;<a class="code" href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">read</a>() &amp; _dirMask;
<a name="l00163"></a>00163 pinVal = ( pinVal &gt;&gt; pin ) &amp; 0x01; <span class="comment">// Get the pin value</span>
<a name="l00164"></a>00164 }
<a name="l00165"></a>00165 <span class="keywordflow">return</span> (pinVal);
<a name="l00166"></a>00166 }
<a name="l00167"></a>00167
<a name="l00168"></a>00168 <span class="comment">//</span>
<a name="l00169"></a>00169 <span class="comment">// digitalWrite</span>
<a name="l00170"></a><a class="code" href="class_i2_c_i_o.html#a473206162522b847546777d16a7c6dcd">00170</a> <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#a473206162522b847546777d16a7c6dcd">I2CIO::digitalWrite</a> ( uint8_t pin, uint8_t level )
<a name="l00171"></a>00171 {
<a name="l00172"></a>00172 uint8_t writeVal;
<a name="l00173"></a>00173 <span class="keywordtype">int</span> status = 0;
<a name="l00174"></a>00174
<a name="l00175"></a>00175 <span class="comment">// Check if initialised and that the pin is within range of the device</span>
<a name="l00176"></a>00176 <span class="comment">// -------------------------------------------------------------------</span>
<a name="l00177"></a>00177 <span class="keywordflow">if</span> ( ( _initialised ) &amp;&amp; ( pin &lt;= 7 ) )
<a name="l00178"></a>00178 {
<a name="l00179"></a>00179 <span class="comment">// Only write to HIGH the port if the port has been configured as</span>
<a name="l00180"></a>00180 <span class="comment">// an OUTPUT pin. Add the new state of the pin to the shadow</span>
<a name="l00181"></a>00181 writeVal = ( 1 &lt;&lt; pin ) &amp; ~_dirMask;
<a name="l00182"></a>00182 <span class="keywordflow">if</span> ( level == HIGH )
<a name="l00183"></a>00183 {
<a name="l00184"></a>00184 _shadow |= writeVal;
<a name="l00185"></a>00185
<a name="l00186"></a>00186 }
<a name="l00187"></a>00187 <span class="keywordflow">else</span>
<a name="l00188"></a>00188 {
<a name="l00189"></a>00189 _shadow &amp;= ~writeVal;
<a name="l00190"></a>00190 }
<a name="l00191"></a>00191 status = this-&gt;<a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a> ( _shadow );
<a name="l00192"></a>00192 }
<a name="l00193"></a>00193 <span class="keywordflow">return</span> ( status );
<a name="l00194"></a>00194 }
<a name="l00195"></a>00195
<a name="l00196"></a>00196 <span class="comment">//</span>
<a name="l00197"></a>00197 <span class="comment">// PRIVATE METHODS</span>
<a name="l00198"></a>00198 <span class="comment">// ---------------------------------------------------------------------------</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,114 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/I2CIO.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Defines</a> </div>
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/I2CIO.h File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;inttypes.h&gt;</code><br/>
</div>
<p><a href="_i2_c_i_o_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html">I2CIO</a></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_i2_c_i_o_8h.html#a218dbde2f6fda8c5825e25da10864c71">_I2CIO_VERSION</a>&#160;&#160;&#160;&quot;1.0.0&quot;</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a218dbde2f6fda8c5825e25da10864c71"></a><!-- doxytag: member="I2CIO.h::_I2CIO_VERSION" ref="a218dbde2f6fda8c5825e25da10864c71" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define _I2CIO_VERSION&#160;&#160;&#160;&quot;1.0.0&quot;</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_i2_c_i_o_8h_source.html#l00032">32</a> of file <a class="el" href="_i2_c_i_o_8h_source.html">I2CIO.h</a>.</p>
</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,147 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/I2CIO.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/I2CIO.h</div> </div>
</div>
<div class="contents">
<a href="_i2_c_i_o_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created by Francisco Malpartida on 20/08/11.</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2011 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no </span>
<a name="l00007"></a>00007 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// Thread Safe: No</span>
<a name="l00010"></a>00010 <span class="comment">// Extendable: Yes</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// @file I2CIO.h</span>
<a name="l00013"></a>00013 <span class="comment">// This file implements a basic IO library using the PCF8574 I2C IO Expander</span>
<a name="l00014"></a>00014 <span class="comment">// chip.</span>
<a name="l00015"></a>00015 <span class="comment">// </span>
<a name="l00016"></a>00016 <span class="comment">// @brief </span>
<a name="l00017"></a>00017 <span class="comment">// Implement a basic IO library to drive the PCF8574* I2C IO Expander ASIC.</span>
<a name="l00018"></a>00018 <span class="comment">// The library implements basic IO general methods to configure IO pin direction</span>
<a name="l00019"></a>00019 <span class="comment">// read and write uint8_t operations and basic pin level routines to set or read</span>
<a name="l00020"></a>00020 <span class="comment">// a particular IO port.</span>
<a name="l00021"></a>00021 <span class="comment">//</span>
<a name="l00022"></a>00022 <span class="comment">// @version API 1.0.0</span>
<a name="l00023"></a>00023 <span class="comment">//</span>
<a name="l00024"></a>00024 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
<a name="l00025"></a>00025 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00026"></a>00026
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef _I2CIO_H_</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define _I2CIO_H_</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00031"></a>00031
<a name="l00032"></a><a class="code" href="_i2_c_i_o_8h.html#a218dbde2f6fda8c5825e25da10864c71">00032</a> <span class="preprocessor">#define _I2CIO_VERSION &quot;1.0.0&quot;</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00041"></a><a class="code" href="class_i2_c_i_o.html">00041</a> <span class="keyword">class </span><a class="code" href="class_i2_c_i_o.html">I2CIO</a>
<a name="l00042"></a>00042 {
<a name="l00043"></a>00043 <span class="keyword">public</span>:
<a name="l00049"></a>00049 <a class="code" href="class_i2_c_i_o.html#a32eb7832075ad6011d67874405a0d0a6">I2CIO</a> ( );
<a name="l00050"></a>00050
<a name="l00062"></a>00062 <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">begin</a> ( uint8_t i2cAddr );
<a name="l00063"></a>00063
<a name="l00073"></a>00073 <span class="keywordtype">void</span> <a class="code" href="class_i2_c_i_o.html#a53b94274eb6bb68564cf5243323db887">pinMode</a> ( uint8_t pin, uint8_t dir );
<a name="l00074"></a>00074
<a name="l00083"></a>00083 <span class="keywordtype">void</span> <a class="code" href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">portMode</a> ( uint8_t dir );
<a name="l00084"></a>00084
<a name="l00094"></a>00094 uint8_t <a class="code" href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">read</a> ( <span class="keywordtype">void</span> );
<a name="l00095"></a>00095
<a name="l00108"></a>00108 uint8_t <a class="code" href="class_i2_c_i_o.html#ac26221011a8b49bcea9ef62712ea88a7">digitalRead</a> ( uint8_t pin );
<a name="l00109"></a>00109
<a name="l00123"></a>00123 <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a> ( uint8_t value );
<a name="l00124"></a>00124
<a name="l00136"></a>00136 <span class="keywordtype">int</span> <a class="code" href="class_i2_c_i_o.html#a473206162522b847546777d16a7c6dcd">digitalWrite</a> ( uint8_t pin, uint8_t level );
<a name="l00137"></a>00137
<a name="l00138"></a>00138
<a name="l00139"></a>00139
<a name="l00140"></a>00140 <span class="keyword">private</span>:
<a name="l00141"></a>00141 uint8_t _shadow; <span class="comment">// Shadow output</span>
<a name="l00142"></a>00142 uint8_t _dirMask; <span class="comment">// Direction mask</span>
<a name="l00143"></a>00143 uint8_t _i2cAddr; <span class="comment">// I2C address</span>
<a name="l00144"></a>00144 <span class="keywordtype">bool</span> _initialised; <span class="comment">// Initialised object</span>
<a name="l00145"></a>00145
<a name="l00146"></a>00146 };
<a name="l00147"></a>00147
<a name="l00148"></a>00148 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,93 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LCD.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LCD.cpp File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &lt;WProgram.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_l_c_d_8h_source.html">LCD.h</a>&quot;</code><br/>
</div>
<p><a href="_l_c_d_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
</table>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,431 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LCD.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LCD.cpp</div> </div>
</div>
<div class="contents">
<a href="_l_c_d_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created by Francisco Malpartida on 20/08/11.</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2011 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no </span>
<a name="l00007"></a>00007 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// Thread Safe: No</span>
<a name="l00010"></a>00010 <span class="comment">// Extendable: Yes</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// @file LCD.cpp</span>
<a name="l00013"></a>00013 <span class="comment">// This file implements a basic liquid crystal library that comes as standard</span>
<a name="l00014"></a>00014 <span class="comment">// in the Arduino SDK.</span>
<a name="l00015"></a>00015 <span class="comment">// </span>
<a name="l00016"></a>00016 <span class="comment">// @brief </span>
<a name="l00017"></a>00017 <span class="comment">// This is a basic implementation of the HD44780 library of the</span>
<a name="l00018"></a>00018 <span class="comment">// Arduino SDK. This library is a refactored version of the one supplied</span>
<a name="l00019"></a>00019 <span class="comment">// in the Arduino SDK in such a way that it simplifies its extension</span>
<a name="l00020"></a>00020 <span class="comment">// to support other mechanism to communicate to LCDs such as I2C, Serial, SR, ...</span>
<a name="l00021"></a>00021 <span class="comment">// The original library has been reworked in such a way that this will be</span>
<a name="l00022"></a>00022 <span class="comment">// the base class implementing all generic methods to command an LCD based</span>
<a name="l00023"></a>00023 <span class="comment">// on the Hitachi HD44780 and compatible chipsets.</span>
<a name="l00024"></a>00024 <span class="comment">//</span>
<a name="l00025"></a>00025 <span class="comment">// This base class is a pure abstract class and needs to be extended. As reference,</span>
<a name="l00026"></a>00026 <span class="comment">// it has been extended to drive 4 and 8 bit mode control, LCDs and I2C extension</span>
<a name="l00027"></a>00027 <span class="comment">// backpacks such as the I2CLCDextraIO using the PCF8574* I2C IO Expander ASIC.</span>
<a name="l00028"></a>00028 <span class="comment">//</span>
<a name="l00029"></a>00029 <span class="comment">//</span>
<a name="l00030"></a>00030 <span class="comment">// @version API 1.1.0</span>
<a name="l00031"></a>00031 <span class="comment">//</span>
<a name="l00032"></a>00032 <span class="comment">// 2012.03.29 bperrybap - changed comparision to use LCD_5x8DOTS rather than 0</span>
<a name="l00033"></a>00033 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
<a name="l00034"></a>00034 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00037"></a>00037 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00038"></a>00038
<a name="l00039"></a>00039 <span class="preprocessor">#if (ARDUINO &lt; 100)</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#include &lt;WProgram.h&gt;</span>
<a name="l00041"></a>00041 <span class="preprocessor">#else</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Arduino.h&gt;</span>
<a name="l00043"></a>00043 <span class="preprocessor">#endif</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="_l_c_d_8h.html">LCD.h</a>&quot;</span>
<a name="l00045"></a>00045
<a name="l00046"></a>00046 <span class="comment">// CLASS CONSTRUCTORS</span>
<a name="l00047"></a>00047 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00048"></a>00048 <span class="comment">// Constructor</span>
<a name="l00049"></a><a class="code" href="class_l_c_d.html#a00bb2db1390721abc7b24ac4b8c276c8">00049</a> <a class="code" href="class_l_c_d.html#a00bb2db1390721abc7b24ac4b8c276c8">LCD::LCD</a> ()
<a name="l00050"></a>00050 {
<a name="l00051"></a>00051
<a name="l00052"></a>00052 }
<a name="l00053"></a>00053
<a name="l00054"></a>00054 <span class="comment">// PUBLIC METHODS</span>
<a name="l00055"></a>00055 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00056"></a>00056 <span class="comment">// When the display powers up, it is configured as follows:</span>
<a name="l00057"></a>00057 <span class="comment">//</span>
<a name="l00058"></a>00058 <span class="comment">// 1. Display clear</span>
<a name="l00059"></a>00059 <span class="comment">// 2. Function set: </span>
<a name="l00060"></a>00060 <span class="comment">// DL = 1; 8-bit interface data </span>
<a name="l00061"></a>00061 <span class="comment">// N = 0; 1-line display </span>
<a name="l00062"></a>00062 <span class="comment">// F = 0; 5x8 dot character font </span>
<a name="l00063"></a>00063 <span class="comment">// 3. Display on/off control: </span>
<a name="l00064"></a>00064 <span class="comment">// D = 0; Display off </span>
<a name="l00065"></a>00065 <span class="comment">// C = 0; Cursor off </span>
<a name="l00066"></a>00066 <span class="comment">// B = 0; Blinking off </span>
<a name="l00067"></a>00067 <span class="comment">// 4. Entry mode set: </span>
<a name="l00068"></a>00068 <span class="comment">// I/D = 1; Increment by 1 </span>
<a name="l00069"></a>00069 <span class="comment">// S = 0; No shift </span>
<a name="l00070"></a>00070 <span class="comment">//</span>
<a name="l00071"></a>00071 <span class="comment">// Note, however, that resetting the Arduino doesn&#39;t reset the LCD, so we</span>
<a name="l00072"></a>00072 <span class="comment">// can&#39;t assume that its in that state when a sketch starts (and the</span>
<a name="l00073"></a>00073 <span class="comment">// LiquidCrystal constructor is called).</span>
<a name="l00074"></a>00074 <span class="comment">// A call to begin() will reinitialize the LCD.</span>
<a name="l00075"></a>00075 <span class="comment">//</span>
<a name="l00076"></a><a class="code" href="class_l_c_d.html#a3f587d1cbb2d59765ef60a5216b56fea">00076</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a3f587d1cbb2d59765ef60a5216b56fea">LCD::begin</a>(uint8_t cols, uint8_t lines, uint8_t dotsize)
<a name="l00077"></a>00077 {
<a name="l00078"></a>00078 <span class="keywordflow">if</span> (lines &gt; 1)
<a name="l00079"></a>00079 {
<a name="l00080"></a>00080 <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> |= <a class="code" href="_l_c_d_8h.html#a7987e93538df2819583ba43b81ddbb25">LCD_2LINE</a>;
<a name="l00081"></a>00081 }
<a name="l00082"></a>00082 <a class="code" href="class_l_c_d.html#ac1374911fb145fea430c21092ada0c06">_numlines</a> = lines;
<a name="l00083"></a>00083 <a class="code" href="class_l_c_d.html#a88b16ea0e5c7d1cabc5007d48bcbd2b0">_cols</a> = cols;
<a name="l00084"></a>00084
<a name="l00085"></a>00085 <span class="comment">// for some 1 line displays you can select a 10 pixel high font</span>
<a name="l00086"></a>00086 <span class="comment">// ------------------------------------------------------------</span>
<a name="l00087"></a>00087 <span class="keywordflow">if</span> ((dotsize != <a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">LCD_5x8DOTS</a>) &amp;&amp; (lines == 1))
<a name="l00088"></a>00088 {
<a name="l00089"></a>00089 <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> |= <a class="code" href="_l_c_d_8h.html#abb3210156d88d3fe18c9352eb161fe42">LCD_5x10DOTS</a>;
<a name="l00090"></a>00090 }
<a name="l00091"></a>00091
<a name="l00092"></a>00092 <span class="comment">// SEE PAGE 45/46 FOR INITIALIZATION SPECIFICATION!</span>
<a name="l00093"></a>00093 <span class="comment">// according to datasheet, we need at least 40ms after power rises above 2.7V</span>
<a name="l00094"></a>00094 <span class="comment">// before sending commands. Arduino can turn on way before 4.5V so we&#39;ll wait </span>
<a name="l00095"></a>00095 <span class="comment">// 50</span>
<a name="l00096"></a>00096 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00097"></a>00097 delay (100); <span class="comment">// 100ms delay</span>
<a name="l00098"></a>00098
<a name="l00099"></a>00099 <span class="comment">//put the LCD into 4 bit or 8 bit mode</span>
<a name="l00100"></a>00100 <span class="comment">// -------------------------------------</span>
<a name="l00101"></a>00101 <span class="keywordflow">if</span> (! (<a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> &amp; <a class="code" href="_l_c_d_8h.html#a59a57ca857dae5d89eb5f2a38c4ac6f0">LCD_8BITMODE</a>))
<a name="l00102"></a>00102 {
<a name="l00103"></a>00103 <span class="comment">// this is according to the hitachi HD44780 datasheet</span>
<a name="l00104"></a>00104 <span class="comment">// figure 24, pg 46</span>
<a name="l00105"></a>00105
<a name="l00106"></a>00106 <span class="comment">// we start in 8bit mode, try to set 4 bit mode</span>
<a name="l00107"></a>00107 send(0x03, <a class="code" href="_l_c_d_8h.html#aa1e30e32b6c2cf8d90a9281328472dbe">FOUR_BITS</a>);
<a name="l00108"></a>00108 delayMicroseconds(4500); <span class="comment">// wait min 4.1ms</span>
<a name="l00109"></a>00109
<a name="l00110"></a>00110 <span class="comment">// second try</span>
<a name="l00111"></a>00111 send ( 0x03, <a class="code" href="_l_c_d_8h.html#aa1e30e32b6c2cf8d90a9281328472dbe">FOUR_BITS</a> );
<a name="l00112"></a>00112 delayMicroseconds(4500); <span class="comment">// wait min 4.1ms</span>
<a name="l00113"></a>00113
<a name="l00114"></a>00114 <span class="comment">// third go!</span>
<a name="l00115"></a>00115 send( 0x03, <a class="code" href="_l_c_d_8h.html#aa1e30e32b6c2cf8d90a9281328472dbe">FOUR_BITS</a> );
<a name="l00116"></a>00116 delayMicroseconds(150);
<a name="l00117"></a>00117
<a name="l00118"></a>00118 <span class="comment">// finally, set to 4-bit interface</span>
<a name="l00119"></a>00119 send ( 0x02, <a class="code" href="_l_c_d_8h.html#aa1e30e32b6c2cf8d90a9281328472dbe">FOUR_BITS</a> );
<a name="l00120"></a>00120 }
<a name="l00121"></a>00121 <span class="keywordflow">else</span>
<a name="l00122"></a>00122 {
<a name="l00123"></a>00123 <span class="comment">// this is according to the hitachi HD44780 datasheet</span>
<a name="l00124"></a>00124 <span class="comment">// page 45 figure 23</span>
<a name="l00125"></a>00125
<a name="l00126"></a>00126 <span class="comment">// Send function set command sequence</span>
<a name="l00127"></a>00127 command(<a class="code" href="_l_c_d_8h.html#aaef882ae70d1f485cd132815d9716111">LCD_FUNCTIONSET</a> | <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a>);
<a name="l00128"></a>00128 delayMicroseconds(4500); <span class="comment">// wait more than 4.1ms</span>
<a name="l00129"></a>00129
<a name="l00130"></a>00130 <span class="comment">// second try</span>
<a name="l00131"></a>00131 command(<a class="code" href="_l_c_d_8h.html#aaef882ae70d1f485cd132815d9716111">LCD_FUNCTIONSET</a> | <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a>);
<a name="l00132"></a>00132 delayMicroseconds(150);
<a name="l00133"></a>00133
<a name="l00134"></a>00134 <span class="comment">// third go</span>
<a name="l00135"></a>00135 command(<a class="code" href="_l_c_d_8h.html#aaef882ae70d1f485cd132815d9716111">LCD_FUNCTIONSET</a> | <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a>);
<a name="l00136"></a>00136 }
<a name="l00137"></a>00137
<a name="l00138"></a>00138 <span class="comment">// finally, set # lines, font size, etc.</span>
<a name="l00139"></a>00139 command(<a class="code" href="_l_c_d_8h.html#aaef882ae70d1f485cd132815d9716111">LCD_FUNCTIONSET</a> | <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a>);
<a name="l00140"></a>00140
<a name="l00141"></a>00141 <span class="comment">// turn the display on with no cursor or blinking default</span>
<a name="l00142"></a>00142 <a class="code" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a> = <a class="code" href="_l_c_d_8h.html#a76236ae8317b34bbc98ea56bc0a2639c">LCD_DISPLAYON</a> | <a class="code" href="_l_c_d_8h.html#a32b194a3adaa0a0bb69acee2e6a754fa">LCD_CURSOROFF</a> | <a class="code" href="_l_c_d_8h.html#a4b28243034cec656b0ed490ba6979752">LCD_BLINKOFF</a>;
<a name="l00143"></a>00143 <a class="code" href="class_l_c_d.html#a5b07cf05e8e5e7c53654f5ca0cf58b89">display</a>();
<a name="l00144"></a>00144
<a name="l00145"></a>00145 <span class="comment">// clear the LCD</span>
<a name="l00146"></a>00146 <a class="code" href="class_l_c_d.html#afa699e0beeeee03cce8cef87eba81c4a">clear</a>();
<a name="l00147"></a>00147
<a name="l00148"></a>00148 <span class="comment">// Initialize to default text direction (for romance languages)</span>
<a name="l00149"></a>00149 <a class="code" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a> = <a class="code" href="_l_c_d_8h.html#ae7c6309fce6200bd7526d090a4a84dd0">LCD_ENTRYLEFT</a> | <a class="code" href="_l_c_d_8h.html#a049ee97e98d04788c1da9a55590fbe42">LCD_ENTRYSHIFTDECREMENT</a>;
<a name="l00150"></a>00150 <span class="comment">// set the entry mode</span>
<a name="l00151"></a>00151 command(<a class="code" href="_l_c_d_8h.html#a5597e1d5819ea2f0734ad4313abf6703">LCD_ENTRYMODESET</a> | <a class="code" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a>);
<a name="l00152"></a>00152
<a name="l00153"></a>00153 <a class="code" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a>();
<a name="l00154"></a>00154
<a name="l00155"></a>00155 }
<a name="l00156"></a>00156
<a name="l00157"></a>00157 <span class="comment">// Common LCD Commands</span>
<a name="l00158"></a>00158 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00159"></a><a class="code" href="class_l_c_d.html#afa699e0beeeee03cce8cef87eba81c4a">00159</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#afa699e0beeeee03cce8cef87eba81c4a">LCD::clear</a>()
<a name="l00160"></a>00160 {
<a name="l00161"></a>00161 command(<a class="code" href="_l_c_d_8h.html#acc3509bc0442b41e2b816555de473ed2">LCD_CLEARDISPLAY</a>); <span class="comment">// clear display, set cursor position to zero</span>
<a name="l00162"></a>00162 delayMicroseconds(<a class="code" href="_l_c_d_8h.html#ad25b138788d83e67f840588754e2df2f">HOME_CLEAR_EXEC</a>); <span class="comment">// this command is time consuming</span>
<a name="l00163"></a>00163 }
<a name="l00164"></a>00164
<a name="l00165"></a><a class="code" href="class_l_c_d.html#aee45ad37f09312f5d9982257e2d37e68">00165</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#aee45ad37f09312f5d9982257e2d37e68">LCD::home</a>()
<a name="l00166"></a>00166 {
<a name="l00167"></a>00167 command(<a class="code" href="_l_c_d_8h.html#a154c86a887633d0f6d9988e4dbb1f419">LCD_RETURNHOME</a>); <span class="comment">// set cursor position to zero</span>
<a name="l00168"></a>00168 delayMicroseconds(<a class="code" href="_l_c_d_8h.html#ad25b138788d83e67f840588754e2df2f">HOME_CLEAR_EXEC</a>); <span class="comment">// This command is time consuming</span>
<a name="l00169"></a>00169 }
<a name="l00170"></a>00170
<a name="l00171"></a><a class="code" href="class_l_c_d.html#a48220450fd152b25994eb7d0ba340e8d">00171</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a48220450fd152b25994eb7d0ba340e8d">LCD::setCursor</a>(uint8_t col, uint8_t row)
<a name="l00172"></a>00172 {
<a name="l00173"></a>00173 <span class="keyword">const</span> byte row_offsetsDef[] = { 0x00, 0x40, 0x14, 0x54 }; <span class="comment">// For regular LCDs</span>
<a name="l00174"></a>00174 <span class="keyword">const</span> byte row_offsetsLarge[] = { 0x00, 0x40, 0x10, 0x50 }; <span class="comment">// For 16x4 LCDs</span>
<a name="l00175"></a>00175
<a name="l00176"></a>00176 <span class="keywordflow">if</span> ( row &gt;= <a class="code" href="class_l_c_d.html#ac1374911fb145fea430c21092ada0c06">_numlines</a> )
<a name="l00177"></a>00177 {
<a name="l00178"></a>00178 row = <a class="code" href="class_l_c_d.html#ac1374911fb145fea430c21092ada0c06">_numlines</a>-1; <span class="comment">// rows start at 0</span>
<a name="l00179"></a>00179 }
<a name="l00180"></a>00180
<a name="l00181"></a>00181 <span class="comment">// 16x4 LCDs have special memory map layout</span>
<a name="l00182"></a>00182 <span class="comment">// ----------------------------------------</span>
<a name="l00183"></a>00183 <span class="keywordflow">if</span> ( <a class="code" href="class_l_c_d.html#a88b16ea0e5c7d1cabc5007d48bcbd2b0">_cols</a> == 16 &amp;&amp; <a class="code" href="class_l_c_d.html#ac1374911fb145fea430c21092ada0c06">_numlines</a> == 4 )
<a name="l00184"></a>00184 {
<a name="l00185"></a>00185 command(<a class="code" href="_l_c_d_8h.html#a15008b832807a208d9d88c74e6751ebf">LCD_SETDDRAMADDR</a> | (col + row_offsetsLarge[row]));
<a name="l00186"></a>00186 }
<a name="l00187"></a>00187 <span class="keywordflow">else</span>
<a name="l00188"></a>00188 {
<a name="l00189"></a>00189 command(<a class="code" href="_l_c_d_8h.html#a15008b832807a208d9d88c74e6751ebf">LCD_SETDDRAMADDR</a> | (col + row_offsetsDef[row]));
<a name="l00190"></a>00190 }
<a name="l00191"></a>00191
<a name="l00192"></a>00192 }
<a name="l00193"></a>00193
<a name="l00194"></a>00194 <span class="comment">// Turn the display on/off</span>
<a name="l00195"></a><a class="code" href="class_l_c_d.html#af3974da6d988ba2d21c25135ada12108">00195</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#af3974da6d988ba2d21c25135ada12108">LCD::noDisplay</a>()
<a name="l00196"></a>00196 {
<a name="l00197"></a>00197 <a class="code" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a> &amp;= ~<a class="code" href="_l_c_d_8h.html#a76236ae8317b34bbc98ea56bc0a2639c">LCD_DISPLAYON</a>;
<a name="l00198"></a>00198 command(<a class="code" href="_l_c_d_8h.html#adfb8b2b8b8a08d7313504d7a4f89d99f">LCD_DISPLAYCONTROL</a> | <a class="code" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a>);
<a name="l00199"></a>00199 }
<a name="l00200"></a>00200
<a name="l00201"></a><a class="code" href="class_l_c_d.html#a5b07cf05e8e5e7c53654f5ca0cf58b89">00201</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a5b07cf05e8e5e7c53654f5ca0cf58b89">LCD::display</a>()
<a name="l00202"></a>00202 {
<a name="l00203"></a>00203 <a class="code" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a> |= <a class="code" href="_l_c_d_8h.html#a76236ae8317b34bbc98ea56bc0a2639c">LCD_DISPLAYON</a>;
<a name="l00204"></a>00204 command(<a class="code" href="_l_c_d_8h.html#adfb8b2b8b8a08d7313504d7a4f89d99f">LCD_DISPLAYCONTROL</a> | <a class="code" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a>);
<a name="l00205"></a>00205 }
<a name="l00206"></a>00206
<a name="l00207"></a>00207 <span class="comment">// Turns the underline cursor on/off</span>
<a name="l00208"></a><a class="code" href="class_l_c_d.html#aec8ffaa1e69c7a6e13ac0cfbc29151d9">00208</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#aec8ffaa1e69c7a6e13ac0cfbc29151d9">LCD::noCursor</a>()
<a name="l00209"></a>00209 {
<a name="l00210"></a>00210 <a class="code" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a> &amp;= ~<a class="code" href="_l_c_d_8h.html#ab67f0adccde68de88eee0513fdfc4574">LCD_CURSORON</a>;
<a name="l00211"></a>00211 command(<a class="code" href="_l_c_d_8h.html#adfb8b2b8b8a08d7313504d7a4f89d99f">LCD_DISPLAYCONTROL</a> | <a class="code" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a>);
<a name="l00212"></a>00212 }
<a name="l00213"></a><a class="code" href="class_l_c_d.html#a194814f64dfa50a90e07e0fe0d361620">00213</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a194814f64dfa50a90e07e0fe0d361620">LCD::cursor</a>()
<a name="l00214"></a>00214 {
<a name="l00215"></a>00215 <a class="code" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a> |= <a class="code" href="_l_c_d_8h.html#ab67f0adccde68de88eee0513fdfc4574">LCD_CURSORON</a>;
<a name="l00216"></a>00216 command(<a class="code" href="_l_c_d_8h.html#adfb8b2b8b8a08d7313504d7a4f89d99f">LCD_DISPLAYCONTROL</a> | <a class="code" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a>);
<a name="l00217"></a>00217 }
<a name="l00218"></a>00218
<a name="l00219"></a>00219 <span class="comment">// Turns on/off the blinking cursor</span>
<a name="l00220"></a><a class="code" href="class_l_c_d.html#a3b755c4b397b5985752be8c30ee1a9b5">00220</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a3b755c4b397b5985752be8c30ee1a9b5">LCD::noBlink</a>()
<a name="l00221"></a>00221 {
<a name="l00222"></a>00222 <a class="code" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a> &amp;= ~<a class="code" href="_l_c_d_8h.html#ac3b19d4e6553b9bbf18a23387e439206">LCD_BLINKON</a>;
<a name="l00223"></a>00223 command(<a class="code" href="_l_c_d_8h.html#adfb8b2b8b8a08d7313504d7a4f89d99f">LCD_DISPLAYCONTROL</a> | <a class="code" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a>);
<a name="l00224"></a>00224 }
<a name="l00225"></a>00225
<a name="l00226"></a><a class="code" href="class_l_c_d.html#a878b36878fa8287093964eba83aace77">00226</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a878b36878fa8287093964eba83aace77">LCD::blink</a>()
<a name="l00227"></a>00227 {
<a name="l00228"></a>00228 <a class="code" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a> |= <a class="code" href="_l_c_d_8h.html#ac3b19d4e6553b9bbf18a23387e439206">LCD_BLINKON</a>;
<a name="l00229"></a>00229 command(<a class="code" href="_l_c_d_8h.html#adfb8b2b8b8a08d7313504d7a4f89d99f">LCD_DISPLAYCONTROL</a> | <a class="code" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a>);
<a name="l00230"></a>00230 }
<a name="l00231"></a>00231
<a name="l00232"></a>00232 <span class="comment">// These commands scroll the display without changing the RAM</span>
<a name="l00233"></a><a class="code" href="class_l_c_d.html#a6f3a503055b3b8dcf0f61b2633c584f7">00233</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a6f3a503055b3b8dcf0f61b2633c584f7">LCD::scrollDisplayLeft</a>(<span class="keywordtype">void</span>)
<a name="l00234"></a>00234 {
<a name="l00235"></a>00235 command(<a class="code" href="_l_c_d_8h.html#a61f16a2b7550e4700f7898a7587c5594">LCD_CURSORSHIFT</a> | <a class="code" href="_l_c_d_8h.html#ab2f7b67abfac33f610acfd5d7a971f40">LCD_DISPLAYMOVE</a> | <a class="code" href="_l_c_d_8h.html#aafb86adb0dfca1e65d65b2cd1946a009">LCD_MOVELEFT</a>);
<a name="l00236"></a>00236 }
<a name="l00237"></a>00237
<a name="l00238"></a><a class="code" href="class_l_c_d.html#abfc44b294772f09020bfa32af8a79571">00238</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#abfc44b294772f09020bfa32af8a79571">LCD::scrollDisplayRight</a>(<span class="keywordtype">void</span>)
<a name="l00239"></a>00239 {
<a name="l00240"></a>00240 command(<a class="code" href="_l_c_d_8h.html#a61f16a2b7550e4700f7898a7587c5594">LCD_CURSORSHIFT</a> | <a class="code" href="_l_c_d_8h.html#ab2f7b67abfac33f610acfd5d7a971f40">LCD_DISPLAYMOVE</a> | <a class="code" href="_l_c_d_8h.html#acf5999180233790bb2c9902efde58f7f">LCD_MOVERIGHT</a>);
<a name="l00241"></a>00241 }
<a name="l00242"></a>00242
<a name="l00243"></a>00243 <span class="comment">// This is for text that flows Left to Right</span>
<a name="l00244"></a><a class="code" href="class_l_c_d.html#a238e9f6476dc7df64af04eb6c87f6ac7">00244</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a238e9f6476dc7df64af04eb6c87f6ac7">LCD::leftToRight</a>(<span class="keywordtype">void</span>)
<a name="l00245"></a>00245 {
<a name="l00246"></a>00246 <a class="code" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a> |= <a class="code" href="_l_c_d_8h.html#ae7c6309fce6200bd7526d090a4a84dd0">LCD_ENTRYLEFT</a>;
<a name="l00247"></a>00247 command(<a class="code" href="_l_c_d_8h.html#a5597e1d5819ea2f0734ad4313abf6703">LCD_ENTRYMODESET</a> | <a class="code" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a>);
<a name="l00248"></a>00248 }
<a name="l00249"></a>00249
<a name="l00250"></a>00250 <span class="comment">// This is for text that flows Right to Left</span>
<a name="l00251"></a><a class="code" href="class_l_c_d.html#ac014830eadc26bfd86308ea8734f4428">00251</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#ac014830eadc26bfd86308ea8734f4428">LCD::rightToLeft</a>(<span class="keywordtype">void</span>)
<a name="l00252"></a>00252 {
<a name="l00253"></a>00253 <a class="code" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a> &amp;= ~<a class="code" href="_l_c_d_8h.html#ae7c6309fce6200bd7526d090a4a84dd0">LCD_ENTRYLEFT</a>;
<a name="l00254"></a>00254 command(<a class="code" href="_l_c_d_8h.html#a5597e1d5819ea2f0734ad4313abf6703">LCD_ENTRYMODESET</a> | <a class="code" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a>);
<a name="l00255"></a>00255 }
<a name="l00256"></a>00256
<a name="l00257"></a>00257 <span class="comment">// This method moves the cursor one space to the right</span>
<a name="l00258"></a><a class="code" href="class_l_c_d.html#a09eec0c712e54b066f5894635c1fe75c">00258</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a09eec0c712e54b066f5894635c1fe75c">LCD::moveCursorRight</a>(<span class="keywordtype">void</span>)
<a name="l00259"></a>00259 {
<a name="l00260"></a>00260 command(<a class="code" href="_l_c_d_8h.html#a61f16a2b7550e4700f7898a7587c5594">LCD_CURSORSHIFT</a> | <a class="code" href="_l_c_d_8h.html#ac21f0302ac4136775877d5f4759e4f74">LCD_CURSORMOVE</a> | <a class="code" href="_l_c_d_8h.html#acf5999180233790bb2c9902efde58f7f">LCD_MOVERIGHT</a>);
<a name="l00261"></a>00261 }
<a name="l00262"></a>00262
<a name="l00263"></a>00263 <span class="comment">// This method moves the cursor one space to the left</span>
<a name="l00264"></a><a class="code" href="class_l_c_d.html#aad2abc99d1aca5403873579d9d72c2d4">00264</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#aad2abc99d1aca5403873579d9d72c2d4">LCD::moveCursorLeft</a>(<span class="keywordtype">void</span>)
<a name="l00265"></a>00265 {
<a name="l00266"></a>00266 command(<a class="code" href="_l_c_d_8h.html#a61f16a2b7550e4700f7898a7587c5594">LCD_CURSORSHIFT</a> | <a class="code" href="_l_c_d_8h.html#ac21f0302ac4136775877d5f4759e4f74">LCD_CURSORMOVE</a> | <a class="code" href="_l_c_d_8h.html#aafb86adb0dfca1e65d65b2cd1946a009">LCD_MOVELEFT</a>);
<a name="l00267"></a>00267 }
<a name="l00268"></a>00268
<a name="l00269"></a>00269
<a name="l00270"></a>00270 <span class="comment">// This will &#39;right justify&#39; text from the cursor</span>
<a name="l00271"></a><a class="code" href="class_l_c_d.html#abb3ed88d530f6283e6159b4973e7da9e">00271</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#abb3ed88d530f6283e6159b4973e7da9e">LCD::autoscroll</a>(<span class="keywordtype">void</span>)
<a name="l00272"></a>00272 {
<a name="l00273"></a>00273 <a class="code" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a> |= <a class="code" href="_l_c_d_8h.html#aa2cf1d0f4a319e53c009cffe1184466c">LCD_ENTRYSHIFTINCREMENT</a>;
<a name="l00274"></a>00274 command(<a class="code" href="_l_c_d_8h.html#a5597e1d5819ea2f0734ad4313abf6703">LCD_ENTRYMODESET</a> | <a class="code" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a>);
<a name="l00275"></a>00275 }
<a name="l00276"></a>00276
<a name="l00277"></a>00277 <span class="comment">// This will &#39;left justify&#39; text from the cursor</span>
<a name="l00278"></a><a class="code" href="class_l_c_d.html#a96035dde40efbf73390e00b5beb00231">00278</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a96035dde40efbf73390e00b5beb00231">LCD::noAutoscroll</a>(<span class="keywordtype">void</span>)
<a name="l00279"></a>00279 {
<a name="l00280"></a>00280 <a class="code" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a> &amp;= ~<a class="code" href="_l_c_d_8h.html#aa2cf1d0f4a319e53c009cffe1184466c">LCD_ENTRYSHIFTINCREMENT</a>;
<a name="l00281"></a>00281 command(<a class="code" href="_l_c_d_8h.html#a5597e1d5819ea2f0734ad4313abf6703">LCD_ENTRYMODESET</a> | <a class="code" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a>);
<a name="l00282"></a>00282 }
<a name="l00283"></a>00283
<a name="l00284"></a>00284 <span class="comment">// Write to CGRAM of new characters</span>
<a name="l00285"></a><a class="code" href="class_l_c_d.html#a91cba8f93c692abcddf8bc3de58d2d3a">00285</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a91cba8f93c692abcddf8bc3de58d2d3a">LCD::createChar</a>(uint8_t location, uint8_t charmap[])
<a name="l00286"></a>00286 {
<a name="l00287"></a>00287 location &amp;= 0x7; <span class="comment">// we only have 8 locations 0-7</span>
<a name="l00288"></a>00288
<a name="l00289"></a>00289 command(<a class="code" href="_l_c_d_8h.html#aae6ea856879c11dee58493184582a52f">LCD_SETCGRAMADDR</a> | (location &lt;&lt; 3));
<a name="l00290"></a>00290 delayMicroseconds(30);
<a name="l00291"></a>00291
<a name="l00292"></a>00292 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i&lt;8; i++)
<a name="l00293"></a>00293 {
<a name="l00294"></a>00294 <a class="code" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">write</a>(charmap[i]); <span class="comment">// call the virtual write method</span>
<a name="l00295"></a>00295 delayMicroseconds(40);
<a name="l00296"></a>00296 }
<a name="l00297"></a>00297 }
<a name="l00298"></a>00298
<a name="l00299"></a>00299 <span class="comment">//</span>
<a name="l00300"></a>00300 <span class="comment">// Switch on the backlight</span>
<a name="l00301"></a><a class="code" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">00301</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">LCD::backlight</a> ( <span class="keywordtype">void</span> )
<a name="l00302"></a>00302 {
<a name="l00303"></a>00303 <a class="code" href="class_l_c_d.html#a3305570d7b37eb93f2cf840263c15828">setBacklight</a>(255);
<a name="l00304"></a>00304 }
<a name="l00305"></a>00305
<a name="l00306"></a>00306 <span class="comment">//</span>
<a name="l00307"></a>00307 <span class="comment">// Switch off the backlight</span>
<a name="l00308"></a><a class="code" href="class_l_c_d.html#a2a331b4e142734411b2f1cfaffe7a488">00308</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a2a331b4e142734411b2f1cfaffe7a488">LCD::noBacklight</a> ( <span class="keywordtype">void</span> )
<a name="l00309"></a>00309 {
<a name="l00310"></a>00310 <a class="code" href="class_l_c_d.html#a3305570d7b37eb93f2cf840263c15828">setBacklight</a>(0);
<a name="l00311"></a>00311 }
<a name="l00312"></a>00312
<a name="l00313"></a>00313 <span class="comment">//</span>
<a name="l00314"></a>00314 <span class="comment">// Switch fully on the LCD (backlight and LCD)</span>
<a name="l00315"></a><a class="code" href="class_l_c_d.html#a718da3a638deb59bd1c7a5222a52d98a">00315</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a718da3a638deb59bd1c7a5222a52d98a">LCD::on</a> ( <span class="keywordtype">void</span> )
<a name="l00316"></a>00316 {
<a name="l00317"></a>00317 <a class="code" href="class_l_c_d.html#a5b07cf05e8e5e7c53654f5ca0cf58b89">display</a>();
<a name="l00318"></a>00318 <a class="code" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a>();
<a name="l00319"></a>00319 }
<a name="l00320"></a>00320
<a name="l00321"></a>00321 <span class="comment">//</span>
<a name="l00322"></a>00322 <span class="comment">// Switch fully off the LCD (backlight and LCD) </span>
<a name="l00323"></a><a class="code" href="class_l_c_d.html#a191639be183be1476c9bfe6d455d23b2">00323</a> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a191639be183be1476c9bfe6d455d23b2">LCD::off</a> ( <span class="keywordtype">void</span> )
<a name="l00324"></a>00324 {
<a name="l00325"></a>00325 <a class="code" href="class_l_c_d.html#a2a331b4e142734411b2f1cfaffe7a488">noBacklight</a>();
<a name="l00326"></a>00326 <a class="code" href="class_l_c_d.html#af3974da6d988ba2d21c25135ada12108">noDisplay</a>();
<a name="l00327"></a>00327 }
<a name="l00328"></a>00328
<a name="l00329"></a>00329 <span class="comment">// General LCD commands - generic methods used by the rest of the commands</span>
<a name="l00330"></a>00330 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00331"></a>00331 <span class="keywordtype">void</span> LCD::command(uint8_t value)
<a name="l00332"></a>00332 {
<a name="l00333"></a>00333 send(value, <a class="code" href="_l_c_d_8h.html#ab0d87e07831e7e4943caef187872123e">COMMAND</a>);
<a name="l00334"></a>00334 }
<a name="l00335"></a>00335
<a name="l00336"></a>00336 <span class="preprocessor">#if (ARDUINO &lt; 100)</span>
<a name="l00337"></a><a class="code" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">00337</a> <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">LCD::write</a>(uint8_t value)
<a name="l00338"></a>00338 {
<a name="l00339"></a>00339 send(value, <a class="code" href="_l_c_d_8h.html#aad9ae913bdfab20dd94ad04ee2d5b045">DATA</a>);
<a name="l00340"></a>00340 }
<a name="l00341"></a>00341 <span class="preprocessor">#else</span>
<a name="l00342"></a>00342 <span class="preprocessor"></span><span class="keywordtype">size_t</span> <a class="code" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">LCD::write</a>(uint8_t value)
<a name="l00343"></a>00343 {
<a name="l00344"></a>00344 send(value, <a class="code" href="_l_c_d_8h.html#aad9ae913bdfab20dd94ad04ee2d5b045">DATA</a>);
<a name="l00345"></a>00345 <span class="keywordflow">return</span> 1; <span class="comment">// assume OK</span>
<a name="l00346"></a>00346 }
<a name="l00347"></a>00347 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,711 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LCD.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LCD.h File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;WProgram.h&gt;</code><br/>
<code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &lt;Print.h&gt;</code><br/>
</div>
<p><a href="_l_c_d_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html">LCD</a></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#a0f50ae3b4bdb42dd5ad74b2c604a7515">BACKLIGHT_OFF</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#aa5bad1c51f5fac029f3deacfef48c54b">BACKLIGHT_ON</a>&#160;&#160;&#160;255</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#ab0d87e07831e7e4943caef187872123e">COMMAND</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#aad9ae913bdfab20dd94ad04ee2d5b045">DATA</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#aa1e30e32b6c2cf8d90a9281328472dbe">FOUR_BITS</a>&#160;&#160;&#160;2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#ad25b138788d83e67f840588754e2df2f">HOME_CLEAR_EXEC</a>&#160;&#160;&#160;2000</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#a8c85cf88d8af66a47c42249d81c94641">LCD_1LINE</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#a7987e93538df2819583ba43b81ddbb25">LCD_2LINE</a>&#160;&#160;&#160;0x08</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#ab8c35d355d2372090c7a347e961c9224">LCD_4BITMODE</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#abb3210156d88d3fe18c9352eb161fe42">LCD_5x10DOTS</a>&#160;&#160;&#160;0x04</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">LCD_5x8DOTS</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#a59a57ca857dae5d89eb5f2a38c4ac6f0">LCD_8BITMODE</a>&#160;&#160;&#160;0x10</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#a4b28243034cec656b0ed490ba6979752">LCD_BLINKOFF</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#ac3b19d4e6553b9bbf18a23387e439206">LCD_BLINKON</a>&#160;&#160;&#160;0x01</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#acc3509bc0442b41e2b816555de473ed2">LCD_CLEARDISPLAY</a>&#160;&#160;&#160;0x01</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#ac21f0302ac4136775877d5f4759e4f74">LCD_CURSORMOVE</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#a32b194a3adaa0a0bb69acee2e6a754fa">LCD_CURSOROFF</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#ab67f0adccde68de88eee0513fdfc4574">LCD_CURSORON</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#a61f16a2b7550e4700f7898a7587c5594">LCD_CURSORSHIFT</a>&#160;&#160;&#160;0x10</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#adfb8b2b8b8a08d7313504d7a4f89d99f">LCD_DISPLAYCONTROL</a>&#160;&#160;&#160;0x08</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#ab2f7b67abfac33f610acfd5d7a971f40">LCD_DISPLAYMOVE</a>&#160;&#160;&#160;0x08</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#a257ebe775cac7140cf82aa40d8ce545a">LCD_DISPLAYOFF</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#a76236ae8317b34bbc98ea56bc0a2639c">LCD_DISPLAYON</a>&#160;&#160;&#160;0x04</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#ae7c6309fce6200bd7526d090a4a84dd0">LCD_ENTRYLEFT</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#a5597e1d5819ea2f0734ad4313abf6703">LCD_ENTRYMODESET</a>&#160;&#160;&#160;0x04</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#a43c26ba2e66880fac95ef640b56873ad">LCD_ENTRYRIGHT</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#a049ee97e98d04788c1da9a55590fbe42">LCD_ENTRYSHIFTDECREMENT</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#aa2cf1d0f4a319e53c009cffe1184466c">LCD_ENTRYSHIFTINCREMENT</a>&#160;&#160;&#160;0x01</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#aaef882ae70d1f485cd132815d9716111">LCD_FUNCTIONSET</a>&#160;&#160;&#160;0x20</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#aafb86adb0dfca1e65d65b2cd1946a009">LCD_MOVELEFT</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#acf5999180233790bb2c9902efde58f7f">LCD_MOVERIGHT</a>&#160;&#160;&#160;0x04</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#a154c86a887633d0f6d9988e4dbb1f419">LCD_RETURNHOME</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#aae6ea856879c11dee58493184582a52f">LCD_SETCGRAMADDR</a>&#160;&#160;&#160;0x40</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#a15008b832807a208d9d88c74e6751ebf">LCD_SETDDRAMADDR</a>&#160;&#160;&#160;0x80</td></tr>
<tr><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> { <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a>,
<a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca62d66a51fa7574c652597716f7709865">NEGATIVE</a>
}</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_c_d_8h.html#a6eac41e4be58d7736ac0c19de225c0dc">waitUsec</a> (uint16_t uSec)</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a0f50ae3b4bdb42dd5ad74b2c604a7515"></a><!-- doxytag: member="LCD.h::BACKLIGHT_OFF" ref="a0f50ae3b4bdb42dd5ad74b2c604a7515" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define BACKLIGHT_OFF&#160;&#160;&#160;0</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Backlight off constant declaration Used in combination with the setBacklight to swith off the <a class="el" href="class_l_c_d.html">LCD</a> backlight. setBacklight </p>
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00151">151</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="aa5bad1c51f5fac029f3deacfef48c54b"></a><!-- doxytag: member="LCD.h::BACKLIGHT_ON" ref="aa5bad1c51f5fac029f3deacfef48c54b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define BACKLIGHT_ON&#160;&#160;&#160;255</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Backlight on constant declaration Used in combination with the setBacklight to swith on the <a class="el" href="class_l_c_d.html">LCD</a> backlight. setBacklight </p>
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00159">159</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="ab0d87e07831e7e4943caef187872123e"></a><!-- doxytag: member="LCD.h::COMMAND" ref="ab0d87e07831e7e4943caef187872123e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define COMMAND&#160;&#160;&#160;0</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00132">132</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="aad9ae913bdfab20dd94ad04ee2d5b045"></a><!-- doxytag: member="LCD.h::DATA" ref="aad9ae913bdfab20dd94ad04ee2d5b045" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define DATA&#160;&#160;&#160;1</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00133">133</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="aa1e30e32b6c2cf8d90a9281328472dbe"></a><!-- doxytag: member="LCD.h::FOUR_BITS" ref="aa1e30e32b6c2cf8d90a9281328472dbe" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define FOUR_BITS&#160;&#160;&#160;2</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00134">134</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="ad25b138788d83e67f840588754e2df2f"></a><!-- doxytag: member="LCD.h::HOME_CLEAR_EXEC" ref="ad25b138788d83e67f840588754e2df2f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define HOME_CLEAR_EXEC&#160;&#160;&#160;2000</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Defines the duration of the home and clear commands This constant defines the time it takes for the home and clear commands in the <a class="el" href="class_l_c_d.html">LCD</a> - Time in microseconds. </p>
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00143">143</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a8c85cf88d8af66a47c42249d81c94641"></a><!-- doxytag: member="LCD.h::LCD_1LINE" ref="a8c85cf88d8af66a47c42249d81c94641" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_1LINE&#160;&#160;&#160;0x00</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00125">125</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a7987e93538df2819583ba43b81ddbb25"></a><!-- doxytag: member="LCD.h::LCD_2LINE" ref="a7987e93538df2819583ba43b81ddbb25" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_2LINE&#160;&#160;&#160;0x08</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00124">124</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="ab8c35d355d2372090c7a347e961c9224"></a><!-- doxytag: member="LCD.h::LCD_4BITMODE" ref="ab8c35d355d2372090c7a347e961c9224" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_4BITMODE&#160;&#160;&#160;0x00</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00123">123</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="abb3210156d88d3fe18c9352eb161fe42"></a><!-- doxytag: member="LCD.h::LCD_5x10DOTS" ref="abb3210156d88d3fe18c9352eb161fe42" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_5x10DOTS&#160;&#160;&#160;0x04</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00126">126</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a9ef57e724c1b846dae0f531aff6fb464"></a><!-- doxytag: member="LCD.h::LCD_5x8DOTS" ref="a9ef57e724c1b846dae0f531aff6fb464" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_5x8DOTS&#160;&#160;&#160;0x00</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00127">127</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a59a57ca857dae5d89eb5f2a38c4ac6f0"></a><!-- doxytag: member="LCD.h::LCD_8BITMODE" ref="a59a57ca857dae5d89eb5f2a38c4ac6f0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_8BITMODE&#160;&#160;&#160;0x10</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00122">122</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a4b28243034cec656b0ed490ba6979752"></a><!-- doxytag: member="LCD.h::LCD_BLINKOFF" ref="a4b28243034cec656b0ed490ba6979752" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_BLINKOFF&#160;&#160;&#160;0x00</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00111">111</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="ac3b19d4e6553b9bbf18a23387e439206"></a><!-- doxytag: member="LCD.h::LCD_BLINKON" ref="ac3b19d4e6553b9bbf18a23387e439206" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_BLINKON&#160;&#160;&#160;0x01</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00110">110</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="acc3509bc0442b41e2b816555de473ed2"></a><!-- doxytag: member="LCD.h::LCD_CLEARDISPLAY" ref="acc3509bc0442b41e2b816555de473ed2" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_CLEARDISPLAY&#160;&#160;&#160;0x01</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>All these definitions shouldn't be used unless you are writing a driver. All these definitions are for driver implementation only and shouldn't be used by applications. </p>
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00088">88</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="ac21f0302ac4136775877d5f4759e4f74"></a><!-- doxytag: member="LCD.h::LCD_CURSORMOVE" ref="ac21f0302ac4136775877d5f4759e4f74" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_CURSORMOVE&#160;&#160;&#160;0x00</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00116">116</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a32b194a3adaa0a0bb69acee2e6a754fa"></a><!-- doxytag: member="LCD.h::LCD_CURSOROFF" ref="a32b194a3adaa0a0bb69acee2e6a754fa" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_CURSOROFF&#160;&#160;&#160;0x00</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00109">109</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="ab67f0adccde68de88eee0513fdfc4574"></a><!-- doxytag: member="LCD.h::LCD_CURSORON" ref="ab67f0adccde68de88eee0513fdfc4574" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_CURSORON&#160;&#160;&#160;0x02</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00108">108</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a61f16a2b7550e4700f7898a7587c5594"></a><!-- doxytag: member="LCD.h::LCD_CURSORSHIFT" ref="a61f16a2b7550e4700f7898a7587c5594" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_CURSORSHIFT&#160;&#160;&#160;0x10</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00092">92</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="adfb8b2b8b8a08d7313504d7a4f89d99f"></a><!-- doxytag: member="LCD.h::LCD_DISPLAYCONTROL" ref="adfb8b2b8b8a08d7313504d7a4f89d99f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_DISPLAYCONTROL&#160;&#160;&#160;0x08</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00091">91</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="ab2f7b67abfac33f610acfd5d7a971f40"></a><!-- doxytag: member="LCD.h::LCD_DISPLAYMOVE" ref="ab2f7b67abfac33f610acfd5d7a971f40" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_DISPLAYMOVE&#160;&#160;&#160;0x08</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00115">115</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a257ebe775cac7140cf82aa40d8ce545a"></a><!-- doxytag: member="LCD.h::LCD_DISPLAYOFF" ref="a257ebe775cac7140cf82aa40d8ce545a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_DISPLAYOFF&#160;&#160;&#160;0x00</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00107">107</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a76236ae8317b34bbc98ea56bc0a2639c"></a><!-- doxytag: member="LCD.h::LCD_DISPLAYON" ref="a76236ae8317b34bbc98ea56bc0a2639c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_DISPLAYON&#160;&#160;&#160;0x04</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00106">106</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="ae7c6309fce6200bd7526d090a4a84dd0"></a><!-- doxytag: member="LCD.h::LCD_ENTRYLEFT" ref="ae7c6309fce6200bd7526d090a4a84dd0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_ENTRYLEFT&#160;&#160;&#160;0x02</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00100">100</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a5597e1d5819ea2f0734ad4313abf6703"></a><!-- doxytag: member="LCD.h::LCD_ENTRYMODESET" ref="a5597e1d5819ea2f0734ad4313abf6703" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_ENTRYMODESET&#160;&#160;&#160;0x04</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00090">90</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a43c26ba2e66880fac95ef640b56873ad"></a><!-- doxytag: member="LCD.h::LCD_ENTRYRIGHT" ref="a43c26ba2e66880fac95ef640b56873ad" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_ENTRYRIGHT&#160;&#160;&#160;0x00</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00099">99</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a049ee97e98d04788c1da9a55590fbe42"></a><!-- doxytag: member="LCD.h::LCD_ENTRYSHIFTDECREMENT" ref="a049ee97e98d04788c1da9a55590fbe42" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_ENTRYSHIFTDECREMENT&#160;&#160;&#160;0x00</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00102">102</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="aa2cf1d0f4a319e53c009cffe1184466c"></a><!-- doxytag: member="LCD.h::LCD_ENTRYSHIFTINCREMENT" ref="aa2cf1d0f4a319e53c009cffe1184466c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_ENTRYSHIFTINCREMENT&#160;&#160;&#160;0x01</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00101">101</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="aaef882ae70d1f485cd132815d9716111"></a><!-- doxytag: member="LCD.h::LCD_FUNCTIONSET" ref="aaef882ae70d1f485cd132815d9716111" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_FUNCTIONSET&#160;&#160;&#160;0x20</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00093">93</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="aafb86adb0dfca1e65d65b2cd1946a009"></a><!-- doxytag: member="LCD.h::LCD_MOVELEFT" ref="aafb86adb0dfca1e65d65b2cd1946a009" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_MOVELEFT&#160;&#160;&#160;0x00</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00118">118</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="acf5999180233790bb2c9902efde58f7f"></a><!-- doxytag: member="LCD.h::LCD_MOVERIGHT" ref="acf5999180233790bb2c9902efde58f7f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_MOVERIGHT&#160;&#160;&#160;0x04</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00117">117</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a154c86a887633d0f6d9988e4dbb1f419"></a><!-- doxytag: member="LCD.h::LCD_RETURNHOME" ref="a154c86a887633d0f6d9988e4dbb1f419" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_RETURNHOME&#160;&#160;&#160;0x02</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00089">89</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="aae6ea856879c11dee58493184582a52f"></a><!-- doxytag: member="LCD.h::LCD_SETCGRAMADDR" ref="aae6ea856879c11dee58493184582a52f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_SETCGRAMADDR&#160;&#160;&#160;0x40</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00094">94</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a15008b832807a208d9d88c74e6751ebf"></a><!-- doxytag: member="LCD.h::LCD_SETDDRAMADDR" ref="a15008b832807a208d9d88c74e6751ebf" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_SETDDRAMADDR&#160;&#160;&#160;0x80</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00095">95</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="aeeef728bf4726268aa5e99391a1502bc"></a><!-- doxytag: member="LCD.h::t_backlighPol" ref="aeeef728bf4726268aa5e99391a1502bc" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5"></a><!-- doxytag: member="POSITIVE" ref="aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5" args="" -->POSITIVE</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aeeef728bf4726268aa5e99391a1502bca62d66a51fa7574c652597716f7709865"></a><!-- doxytag: member="NEGATIVE" ref="aeeef728bf4726268aa5e99391a1502bca62d66a51fa7574c652597716f7709865" args="" -->NEGATIVE</em>&nbsp;</td><td>
</td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00167">167</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a6eac41e4be58d7736ac0c19de225c0dc"></a><!-- doxytag: member="LCD.h::waitUsec" ref="a6eac41e4be58d7736ac0c19de225c0dc" args="(uint16_t uSec)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static void waitUsec </td>
<td>(</td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>uSec</em></td><td>)</td>
<td><code> [inline, static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Enables disables fast waits for write operations for <a class="el" href="class_l_c_d.html">LCD</a> If defined, the library will avoid doing un-necessary waits. this can be done, because the time taken by Arduino's slow digitalWrite operations. If fast digitalIO operations, comment this line out or undefine the mode.</p>
<p>waits for a given time in microseconds (compilation dependent). Waits for a given time defined in microseconds depending on the FAST_MODE define. If the FAST_MODE is defined the call will return inmediatelly. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">uSec[in]</td><td>time in microseconds. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>None </dd></dl>
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00071">71</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,301 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LCD.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LCD.h</div> </div>
</div>
<div class="contents">
<a href="_l_c_d_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created by Francisco Malpartida on 20/08/11.</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2011 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no </span>
<a name="l00007"></a>00007 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// Thread Safe: No</span>
<a name="l00010"></a>00010 <span class="comment">// Extendable: Yes</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// @file LCD.h</span>
<a name="l00013"></a>00013 <span class="comment">// This file implements a basic liquid crystal library that comes as standard</span>
<a name="l00014"></a>00014 <span class="comment">// in the Arduino SDK.</span>
<a name="l00015"></a>00015 <span class="comment">// </span>
<a name="l00016"></a>00016 <span class="comment">// @brief </span>
<a name="l00017"></a>00017 <span class="comment">// This is a basic implementation of the LiquidCrystal library of the</span>
<a name="l00018"></a>00018 <span class="comment">// Arduino SDK. This library is a refactored version of the one supplied</span>
<a name="l00019"></a>00019 <span class="comment">// in the Arduino SDK in such a way that it simplifies its extension</span>
<a name="l00020"></a>00020 <span class="comment">// to support other mechanism to communicate to LCDs such as I2C, Serial, SR, </span>
<a name="l00021"></a>00021 <span class="comment">// The original library has been reworked in such a way that this will be</span>
<a name="l00022"></a>00022 <span class="comment">// the base class implementing all generic methods to command an LCD based</span>
<a name="l00023"></a>00023 <span class="comment">// on the Hitachi HD44780 and compatible chipsets.</span>
<a name="l00024"></a>00024 <span class="comment">//</span>
<a name="l00025"></a>00025 <span class="comment">// This base class is a pure abstract class and needs to be extended. As reference,</span>
<a name="l00026"></a>00026 <span class="comment">// it has been extended to drive 4 and 8 bit mode control, LCDs and I2C extension</span>
<a name="l00027"></a>00027 <span class="comment">// backpacks such as the I2CLCDextraIO using the PCF8574* I2C IO Expander ASIC.</span>
<a name="l00028"></a>00028 <span class="comment">//</span>
<a name="l00029"></a>00029 <span class="comment">// The functionality provided by this class and its base class is identical</span>
<a name="l00030"></a>00030 <span class="comment">// to the original functionality of the Arduino LiquidCrystal library.</span>
<a name="l00031"></a>00031 <span class="comment">//</span>
<a name="l00032"></a>00032 <span class="comment">// @version API 1.1.0</span>
<a name="l00033"></a>00033 <span class="comment">//</span>
<a name="l00034"></a>00034 <span class="comment">//</span>
<a name="l00035"></a>00035 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
<a name="l00036"></a>00036 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00037"></a>00037 <span class="preprocessor">#ifndef _LCD_H_</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define _LCD_H_</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span>
<a name="l00040"></a>00040 <span class="preprocessor">#if (ARDUINO &lt; 100)</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#include &lt;WProgram.h&gt;</span>
<a name="l00042"></a>00042 <span class="preprocessor">#else</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Arduino.h&gt;</span>
<a name="l00044"></a>00044 <span class="preprocessor">#endif</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span>
<a name="l00046"></a>00046 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00047"></a>00047 <span class="preprocessor">#include &lt;Print.h&gt;</span>
<a name="l00048"></a>00048
<a name="l00049"></a>00049
<a name="l00058"></a>00058 <span class="preprocessor">#ifdef __AVR__</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#define FAST_MODE</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span>
<a name="l00071"></a><a class="code" href="_l_c_d_8h.html#a6eac41e4be58d7736ac0c19de225c0dc">00071</a> <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="_l_c_d_8h.html#a6eac41e4be58d7736ac0c19de225c0dc">waitUsec</a> ( uint16_t uSec )
<a name="l00072"></a>00072 {
<a name="l00073"></a>00073 <span class="preprocessor">#ifndef FAST_MODE</span>
<a name="l00074"></a>00074 <span class="preprocessor"></span> delayMicroseconds ( uSec );
<a name="l00075"></a>00075 <span class="preprocessor">#endif // FAST_MODE</span>
<a name="l00076"></a>00076 <span class="preprocessor"></span>}
<a name="l00077"></a>00077
<a name="l00078"></a>00078
<a name="l00086"></a>00086 <span class="comment">// LCD Commands</span>
<a name="l00087"></a>00087 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00088"></a><a class="code" href="_l_c_d_8h.html#acc3509bc0442b41e2b816555de473ed2">00088</a> <span class="preprocessor">#define LCD_CLEARDISPLAY 0x01</span>
<a name="l00089"></a><a class="code" href="_l_c_d_8h.html#a154c86a887633d0f6d9988e4dbb1f419">00089</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_RETURNHOME 0x02</span>
<a name="l00090"></a><a class="code" href="_l_c_d_8h.html#a5597e1d5819ea2f0734ad4313abf6703">00090</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_ENTRYMODESET 0x04</span>
<a name="l00091"></a><a class="code" href="_l_c_d_8h.html#adfb8b2b8b8a08d7313504d7a4f89d99f">00091</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_DISPLAYCONTROL 0x08</span>
<a name="l00092"></a><a class="code" href="_l_c_d_8h.html#a61f16a2b7550e4700f7898a7587c5594">00092</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_CURSORSHIFT 0x10</span>
<a name="l00093"></a><a class="code" href="_l_c_d_8h.html#aaef882ae70d1f485cd132815d9716111">00093</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_FUNCTIONSET 0x20</span>
<a name="l00094"></a><a class="code" href="_l_c_d_8h.html#aae6ea856879c11dee58493184582a52f">00094</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_SETCGRAMADDR 0x40</span>
<a name="l00095"></a><a class="code" href="_l_c_d_8h.html#a15008b832807a208d9d88c74e6751ebf">00095</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_SETDDRAMADDR 0x80</span>
<a name="l00096"></a>00096 <span class="preprocessor"></span>
<a name="l00097"></a>00097 <span class="comment">// flags for display entry mode</span>
<a name="l00098"></a>00098 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00099"></a><a class="code" href="_l_c_d_8h.html#a43c26ba2e66880fac95ef640b56873ad">00099</a> <span class="preprocessor">#define LCD_ENTRYRIGHT 0x00</span>
<a name="l00100"></a><a class="code" href="_l_c_d_8h.html#ae7c6309fce6200bd7526d090a4a84dd0">00100</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_ENTRYLEFT 0x02</span>
<a name="l00101"></a><a class="code" href="_l_c_d_8h.html#aa2cf1d0f4a319e53c009cffe1184466c">00101</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_ENTRYSHIFTINCREMENT 0x01</span>
<a name="l00102"></a><a class="code" href="_l_c_d_8h.html#a049ee97e98d04788c1da9a55590fbe42">00102</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_ENTRYSHIFTDECREMENT 0x00</span>
<a name="l00103"></a>00103 <span class="preprocessor"></span>
<a name="l00104"></a>00104 <span class="comment">// flags for display on/off and cursor control</span>
<a name="l00105"></a>00105 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00106"></a><a class="code" href="_l_c_d_8h.html#a76236ae8317b34bbc98ea56bc0a2639c">00106</a> <span class="preprocessor">#define LCD_DISPLAYON 0x04</span>
<a name="l00107"></a><a class="code" href="_l_c_d_8h.html#a257ebe775cac7140cf82aa40d8ce545a">00107</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_DISPLAYOFF 0x00</span>
<a name="l00108"></a><a class="code" href="_l_c_d_8h.html#ab67f0adccde68de88eee0513fdfc4574">00108</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_CURSORON 0x02</span>
<a name="l00109"></a><a class="code" href="_l_c_d_8h.html#a32b194a3adaa0a0bb69acee2e6a754fa">00109</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_CURSOROFF 0x00</span>
<a name="l00110"></a><a class="code" href="_l_c_d_8h.html#ac3b19d4e6553b9bbf18a23387e439206">00110</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_BLINKON 0x01</span>
<a name="l00111"></a><a class="code" href="_l_c_d_8h.html#a4b28243034cec656b0ed490ba6979752">00111</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_BLINKOFF 0x00</span>
<a name="l00112"></a>00112 <span class="preprocessor"></span>
<a name="l00113"></a>00113 <span class="comment">// flags for display/cursor shift</span>
<a name="l00114"></a>00114 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00115"></a><a class="code" href="_l_c_d_8h.html#ab2f7b67abfac33f610acfd5d7a971f40">00115</a> <span class="preprocessor">#define LCD_DISPLAYMOVE 0x08</span>
<a name="l00116"></a><a class="code" href="_l_c_d_8h.html#ac21f0302ac4136775877d5f4759e4f74">00116</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_CURSORMOVE 0x00</span>
<a name="l00117"></a><a class="code" href="_l_c_d_8h.html#acf5999180233790bb2c9902efde58f7f">00117</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_MOVERIGHT 0x04</span>
<a name="l00118"></a><a class="code" href="_l_c_d_8h.html#aafb86adb0dfca1e65d65b2cd1946a009">00118</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_MOVELEFT 0x00</span>
<a name="l00119"></a>00119 <span class="preprocessor"></span>
<a name="l00120"></a>00120 <span class="comment">// flags for function set</span>
<a name="l00121"></a>00121 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00122"></a><a class="code" href="_l_c_d_8h.html#a59a57ca857dae5d89eb5f2a38c4ac6f0">00122</a> <span class="preprocessor">#define LCD_8BITMODE 0x10</span>
<a name="l00123"></a><a class="code" href="_l_c_d_8h.html#ab8c35d355d2372090c7a347e961c9224">00123</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_4BITMODE 0x00</span>
<a name="l00124"></a><a class="code" href="_l_c_d_8h.html#a7987e93538df2819583ba43b81ddbb25">00124</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_2LINE 0x08</span>
<a name="l00125"></a><a class="code" href="_l_c_d_8h.html#a8c85cf88d8af66a47c42249d81c94641">00125</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_1LINE 0x00</span>
<a name="l00126"></a><a class="code" href="_l_c_d_8h.html#abb3210156d88d3fe18c9352eb161fe42">00126</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_5x10DOTS 0x04</span>
<a name="l00127"></a><a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">00127</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_5x8DOTS 0x00</span>
<a name="l00128"></a>00128 <span class="preprocessor"></span>
<a name="l00129"></a>00129
<a name="l00130"></a>00130 <span class="comment">// Define COMMAND and DATA LCD Rs (used by send method).</span>
<a name="l00131"></a>00131 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00132"></a><a class="code" href="_l_c_d_8h.html#ab0d87e07831e7e4943caef187872123e">00132</a> <span class="preprocessor">#define COMMAND 0</span>
<a name="l00133"></a><a class="code" href="_l_c_d_8h.html#aad9ae913bdfab20dd94ad04ee2d5b045">00133</a> <span class="preprocessor"></span><span class="preprocessor">#define DATA 1</span>
<a name="l00134"></a><a class="code" href="_l_c_d_8h.html#aa1e30e32b6c2cf8d90a9281328472dbe">00134</a> <span class="preprocessor"></span><span class="preprocessor">#define FOUR_BITS 2</span>
<a name="l00135"></a>00135 <span class="preprocessor"></span>
<a name="l00136"></a>00136
<a name="l00143"></a><a class="code" href="_l_c_d_8h.html#ad25b138788d83e67f840588754e2df2f">00143</a> <span class="preprocessor">#define HOME_CLEAR_EXEC 2000</span>
<a name="l00144"></a>00144 <span class="preprocessor"></span>
<a name="l00151"></a><a class="code" href="_l_c_d_8h.html#a0f50ae3b4bdb42dd5ad74b2c604a7515">00151</a> <span class="preprocessor">#define BACKLIGHT_OFF 0</span>
<a name="l00152"></a>00152 <span class="preprocessor"></span>
<a name="l00159"></a><a class="code" href="_l_c_d_8h.html#aa5bad1c51f5fac029f3deacfef48c54b">00159</a> <span class="preprocessor">#define BACKLIGHT_ON 255</span>
<a name="l00160"></a>00160 <span class="preprocessor"></span>
<a name="l00161"></a>00161
<a name="l00167"></a><a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">00167</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> { <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a>, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca62d66a51fa7574c652597716f7709865">NEGATIVE</a> } <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>;
<a name="l00168"></a>00168
<a name="l00169"></a><a class="code" href="class_l_c_d.html">00169</a> <span class="keyword">class </span><a class="code" href="class_l_c_d.html">LCD</a> : <span class="keyword">public</span> Print
<a name="l00170"></a>00170 {
<a name="l00171"></a>00171 <span class="keyword">public</span>:
<a name="l00172"></a>00172
<a name="l00179"></a>00179 <a class="code" href="class_l_c_d.html#a00bb2db1390721abc7b24ac4b8c276c8">LCD</a> ( );
<a name="l00180"></a>00180
<a name="l00196"></a>00196 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a3f587d1cbb2d59765ef60a5216b56fea">begin</a>(uint8_t cols, uint8_t rows, uint8_t charsize = <a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">LCD_5x8DOTS</a>);
<a name="l00197"></a>00197
<a name="l00208"></a>00208 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#afa699e0beeeee03cce8cef87eba81c4a">clear</a>();
<a name="l00209"></a>00209
<a name="l00221"></a>00221 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#aee45ad37f09312f5d9982257e2d37e68">home</a>();
<a name="l00222"></a>00222
<a name="l00231"></a>00231 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#af3974da6d988ba2d21c25135ada12108">noDisplay</a>();
<a name="l00232"></a>00232
<a name="l00242"></a>00242 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a5b07cf05e8e5e7c53654f5ca0cf58b89">display</a>();
<a name="l00243"></a>00243
<a name="l00250"></a>00250 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a3b755c4b397b5985752be8c30ee1a9b5">noBlink</a>();
<a name="l00251"></a>00251
<a name="l00260"></a>00260 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a878b36878fa8287093964eba83aace77">blink</a>();
<a name="l00261"></a>00261
<a name="l00268"></a>00268 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#aec8ffaa1e69c7a6e13ac0cfbc29151d9">noCursor</a>();
<a name="l00269"></a>00269
<a name="l00278"></a>00278 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a194814f64dfa50a90e07e0fe0d361620">cursor</a>();
<a name="l00279"></a>00279
<a name="l00287"></a>00287 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a6f3a503055b3b8dcf0f61b2633c584f7">scrollDisplayLeft</a>();
<a name="l00288"></a>00288
<a name="l00296"></a>00296 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#abfc44b294772f09020bfa32af8a79571">scrollDisplayRight</a>();
<a name="l00297"></a>00297
<a name="l00309"></a>00309 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a238e9f6476dc7df64af04eb6c87f6ac7">leftToRight</a>();
<a name="l00310"></a>00310
<a name="l00322"></a>00322 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#ac014830eadc26bfd86308ea8734f4428">rightToLeft</a>();
<a name="l00323"></a>00323
<a name="l00330"></a>00330 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#aad2abc99d1aca5403873579d9d72c2d4">moveCursorLeft</a>();
<a name="l00331"></a>00331
<a name="l00332"></a>00332
<a name="l00339"></a>00339 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a09eec0c712e54b066f5894635c1fe75c">moveCursorRight</a>();
<a name="l00340"></a>00340
<a name="l00354"></a>00354 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#abb3ed88d530f6283e6159b4973e7da9e">autoscroll</a>();
<a name="l00355"></a>00355
<a name="l00364"></a>00364 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a96035dde40efbf73390e00b5beb00231">noAutoscroll</a>();
<a name="l00365"></a>00365
<a name="l00382"></a>00382 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a91cba8f93c692abcddf8bc3de58d2d3a">createChar</a>(uint8_t location, uint8_t charmap[]);
<a name="l00383"></a>00383
<a name="l00393"></a>00393 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a48220450fd152b25994eb7d0ba340e8d">setCursor</a>(uint8_t col, uint8_t row);
<a name="l00394"></a>00394
<a name="l00402"></a>00402 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a> ( <span class="keywordtype">void</span> );
<a name="l00403"></a>00403
<a name="l00411"></a>00411 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a2a331b4e142734411b2f1cfaffe7a488">noBacklight</a> ( <span class="keywordtype">void</span> );
<a name="l00412"></a>00412
<a name="l00420"></a>00420 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a718da3a638deb59bd1c7a5222a52d98a">on</a> ( <span class="keywordtype">void</span> );
<a name="l00421"></a>00421
<a name="l00429"></a>00429 <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a191639be183be1476c9bfe6d455d23b2">off</a> ( <span class="keywordtype">void</span> );
<a name="l00430"></a>00430
<a name="l00431"></a>00431 <span class="comment">//</span>
<a name="l00432"></a>00432 <span class="comment">// virtual class methods</span>
<a name="l00433"></a>00433 <span class="comment">// --------------------------------------------------------------------------</span>
<a name="l00444"></a><a class="code" href="class_l_c_d.html#a53f4ee9b39d9ab3d7ae4d9f8dedca3bc">00444</a> <span class="comment"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a53f4ee9b39d9ab3d7ae4d9f8dedca3bc">setBacklightPin</a> ( uint8_t value, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol ) { };
<a name="l00445"></a>00445
<a name="l00463"></a><a class="code" href="class_l_c_d.html#a3305570d7b37eb93f2cf840263c15828">00463</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a3305570d7b37eb93f2cf840263c15828">setBacklight</a> ( uint8_t value ) { };
<a name="l00464"></a>00464
<a name="l00476"></a>00476 <span class="preprocessor">#if (ARDUINO &lt; 100)</span>
<a name="l00477"></a>00477 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">write</a>(uint8_t value);
<a name="l00478"></a>00478 <span class="preprocessor">#else</span>
<a name="l00479"></a>00479 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a class="code" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">write</a>(uint8_t value);
<a name="l00480"></a>00480 <span class="preprocessor">#endif</span>
<a name="l00481"></a>00481 <span class="preprocessor"></span>
<a name="l00482"></a>00482 <span class="preprocessor">#if (ARDUINO &lt; 100)</span>
<a name="l00483"></a>00483 <span class="preprocessor"></span> <span class="keyword">using</span> <a class="code" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">Print::write</a>;
<a name="l00484"></a>00484 <span class="preprocessor">#else</span>
<a name="l00485"></a>00485 <span class="preprocessor"></span> <span class="keyword">using</span> <a class="code" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">Print::write</a>;
<a name="l00486"></a>00486 <span class="preprocessor">#endif </span>
<a name="l00487"></a>00487 <span class="preprocessor"></span>
<a name="l00488"></a>00488 <span class="keyword">protected</span>:
<a name="l00489"></a>00489 <span class="comment">// Internal LCD variables to control the LCD shared between all derived</span>
<a name="l00490"></a>00490 <span class="comment">// classes.</span>
<a name="l00491"></a><a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">00491</a> uint8_t <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a>; <span class="comment">// LCD_5x10DOTS or LCD_5x8DOTS, LCD_4BITMODE or </span>
<a name="l00492"></a>00492 <span class="comment">// LCD_8BITMODE, LCD_1LINE or LCD_2LINE</span>
<a name="l00493"></a><a class="code" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">00493</a> uint8_t <a class="code" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a>; <span class="comment">// LCD base control command LCD on/off, blink, cursor</span>
<a name="l00494"></a>00494 <span class="comment">// all commands are &quot;ored&quot; to its contents.</span>
<a name="l00495"></a><a class="code" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">00495</a> uint8_t <a class="code" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a>; <span class="comment">// Text entry mode to the LCD</span>
<a name="l00496"></a><a class="code" href="class_l_c_d.html#ac1374911fb145fea430c21092ada0c06">00496</a> uint8_t <a class="code" href="class_l_c_d.html#ac1374911fb145fea430c21092ada0c06">_numlines</a>; <span class="comment">// Number of lines of the LCD, initialized with begin()</span>
<a name="l00497"></a><a class="code" href="class_l_c_d.html#a88b16ea0e5c7d1cabc5007d48bcbd2b0">00497</a> uint8_t <a class="code" href="class_l_c_d.html#a88b16ea0e5c7d1cabc5007d48bcbd2b0">_cols</a>; <span class="comment">// Number of columns in the LCD</span>
<a name="l00498"></a><a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">00498</a> <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> <a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a>; <span class="comment">// Backlight polarity</span>
<a name="l00499"></a>00499
<a name="l00500"></a>00500 <span class="keyword">private</span>:
<a name="l00513"></a>00513 <span class="keywordtype">void</span> command(uint8_t value);
<a name="l00514"></a>00514
<a name="l00528"></a>00528 <span class="preprocessor">#if (ARDUINO &lt; 100)</span>
<a name="l00529"></a>00529 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> send(uint8_t value, uint8_t mode) { };
<a name="l00530"></a>00530 <span class="preprocessor">#else</span>
<a name="l00531"></a>00531 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> send(uint8_t value, uint8_t mode) = 0;
<a name="l00532"></a>00532 <span class="preprocessor">#endif</span>
<a name="l00533"></a>00533 <span class="preprocessor"></span>
<a name="l00534"></a>00534 };
<a name="l00535"></a>00535
<a name="l00536"></a>00536 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,146 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Defines</a> </div>
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal.cpp File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &lt;WProgram.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_liquid_crystal_8h_source.html">LiquidCrystal.h</a>&quot;</code><br/>
</div>
<p><a href="_liquid_crystal_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal_8cpp.html#a31e1c14e8c2845dec3301f0ebd36b43c">LCD_4BIT</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal_8cpp.html#a57d84af8cf61ceee4eb91db77889f071">LCD_8BIT</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>&#160;&#160;&#160;0xFF</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a31e1c14e8c2845dec3301f0ebd36b43c"></a><!-- doxytag: member="LiquidCrystal.cpp::LCD_4BIT" ref="a31e1c14e8c2845dec3301f0ebd36b43c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_4BIT&#160;&#160;&#160;1</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal_8cpp_source.html#l00045">45</a> of file <a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a57d84af8cf61ceee4eb91db77889f071"></a><!-- doxytag: member="LiquidCrystal.cpp::LCD_8BIT" ref="a57d84af8cf61ceee4eb91db77889f071" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_8BIT&#160;&#160;&#160;0</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal_8cpp_source.html#l00046">46</a> of file <a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a65fa786d6e31fe8b1aa51784a9736581"></a><!-- doxytag: member="LiquidCrystal.cpp::LCD_NOBACKLIGHT" ref="a65fa786d6e31fe8b1aa51784a9736581" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_NOBACKLIGHT&#160;&#160;&#160;0xFF</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal_8cpp_source.html#l00042">42</a> of file <a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a>.</p>
</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,383 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal.cpp</div> </div>
</div>
<div class="contents">
<a href="_liquid_crystal_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created by Francisco Malpartida on 20/08/11.</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2011 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no </span>
<a name="l00007"></a>00007 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// Thread Safe: No</span>
<a name="l00010"></a>00010 <span class="comment">// Extendable: Yes</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// @file LiquidCrystal.cpp</span>
<a name="l00013"></a>00013 <span class="comment">// This file implements a basic liquid crystal library that comes as standard</span>
<a name="l00014"></a>00014 <span class="comment">// in the Arduino SDK.</span>
<a name="l00015"></a>00015 <span class="comment">// </span>
<a name="l00016"></a>00016 <span class="comment">// @brief </span>
<a name="l00017"></a>00017 <span class="comment">// This is a basic implementation of the LiquidCrystal library of the</span>
<a name="l00018"></a>00018 <span class="comment">// Arduino SDK. The original library has been reworked in such a way that </span>
<a name="l00019"></a>00019 <span class="comment">// this class implements the all methods to command an LCD based</span>
<a name="l00020"></a>00020 <span class="comment">// on the Hitachi HD44780 and compatible chipsets using the parallel port of</span>
<a name="l00021"></a>00021 <span class="comment">// the LCD (4 bit and 8 bit).</span>
<a name="l00022"></a>00022 <span class="comment">//</span>
<a name="l00023"></a>00023 <span class="comment">// The functionality provided by this class and its base class is identical</span>
<a name="l00024"></a>00024 <span class="comment">// to the original functionality of the Arduino LiquidCrystal library.</span>
<a name="l00025"></a>00025 <span class="comment">//</span>
<a name="l00026"></a>00026 <span class="comment">//</span>
<a name="l00027"></a>00027 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
<a name="l00028"></a>00028 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00032"></a>00032
<a name="l00033"></a>00033 <span class="preprocessor">#if (ARDUINO &lt; 100)</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#include &lt;WProgram.h&gt;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#else</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Arduino.h&gt;</span>
<a name="l00037"></a>00037 <span class="preprocessor">#endif</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="_liquid_crystal_8h.html">LiquidCrystal.h</a>&quot;</span>
<a name="l00039"></a>00039
<a name="l00040"></a>00040 <span class="comment">// CONSTANT definitions</span>
<a name="l00041"></a>00041 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00042"></a><a class="code" href="_liquid_crystal_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">00042</a> <span class="preprocessor">#define LCD_NOBACKLIGHT 0xFF</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span>
<a name="l00044"></a>00044 <span class="comment">// LCD driver configuration (4bit or 8bit driver control)</span>
<a name="l00045"></a><a class="code" href="_liquid_crystal_8cpp.html#a31e1c14e8c2845dec3301f0ebd36b43c">00045</a> <span class="preprocessor">#define LCD_4BIT 1</span>
<a name="l00046"></a><a class="code" href="_liquid_crystal_8cpp.html#a57d84af8cf61ceee4eb91db77889f071">00046</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_8BIT 0</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span>
<a name="l00048"></a>00048 <span class="comment">// STATIC helper functions</span>
<a name="l00049"></a>00049 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00050"></a>00050
<a name="l00051"></a>00051
<a name="l00052"></a>00052 <span class="comment">// CONSTRUCTORS</span>
<a name="l00053"></a>00053 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00054"></a>00054
<a name="l00055"></a><a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">00055</a> <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal::LiquidCrystal</a>(uint8_t rs, uint8_t enable,
<a name="l00056"></a>00056 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
<a name="l00057"></a>00057 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
<a name="l00058"></a>00058 {
<a name="l00059"></a>00059 init(<a class="code" href="_liquid_crystal_8cpp.html#a57d84af8cf61ceee4eb91db77889f071">LCD_8BIT</a>, rs, 255, enable, d0, d1, d2, d3, d4, d5, d6, d7);
<a name="l00060"></a>00060 }
<a name="l00061"></a>00061
<a name="l00062"></a><a class="code" href="class_liquid_crystal.html#a30e3d865c4b4a003a36cb45903f93644">00062</a> <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal::LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable,
<a name="l00063"></a>00063 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
<a name="l00064"></a>00064 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
<a name="l00065"></a>00065 {
<a name="l00066"></a>00066 init(<a class="code" href="_liquid_crystal_8cpp.html#a57d84af8cf61ceee4eb91db77889f071">LCD_8BIT</a>, rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7);
<a name="l00067"></a>00067 }
<a name="l00068"></a>00068
<a name="l00069"></a><a class="code" href="class_liquid_crystal.html#a0a0a8dfa7a2e775a031fd65f5c6366ec">00069</a> <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal::LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable,
<a name="l00070"></a>00070 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
<a name="l00071"></a>00071 {
<a name="l00072"></a>00072 init(<a class="code" href="_liquid_crystal_8cpp.html#a31e1c14e8c2845dec3301f0ebd36b43c">LCD_4BIT</a>, rs, rw, enable, d0, d1, d2, d3, 0, 0, 0, 0);
<a name="l00073"></a>00073 }
<a name="l00074"></a>00074
<a name="l00075"></a><a class="code" href="class_liquid_crystal.html#a23124e6dd5ac4a9b6147629b96e91953">00075</a> <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal::LiquidCrystal</a>(uint8_t rs, uint8_t enable,
<a name="l00076"></a>00076 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)
<a name="l00077"></a>00077 {
<a name="l00078"></a>00078 init(<a class="code" href="_liquid_crystal_8cpp.html#a31e1c14e8c2845dec3301f0ebd36b43c">LCD_4BIT</a>, rs, 255, enable, d0, d1, d2, d3, 0, 0, 0, 0);
<a name="l00079"></a>00079 }
<a name="l00080"></a>00080
<a name="l00081"></a>00081 <span class="comment">// Contructors with backlight control</span>
<a name="l00082"></a><a class="code" href="class_liquid_crystal.html#aff2330186495fde93370d46c0ca2cbf0">00082</a> <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal::LiquidCrystal</a>(uint8_t rs, uint8_t enable,
<a name="l00083"></a>00083 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
<a name="l00084"></a>00084 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
<a name="l00085"></a>00085 uint8_t backlightPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)
<a name="l00086"></a>00086 {
<a name="l00087"></a>00087 init(<a class="code" href="_liquid_crystal_8cpp.html#a57d84af8cf61ceee4eb91db77889f071">LCD_8BIT</a>, rs, 255, enable, d0, d1, d2, d3, d4, d5, d6, d7);
<a name="l00088"></a>00088 <a class="code" href="class_liquid_crystal.html#a63740dc1198d8169a39d9c6daff0efc9">setBacklightPin</a> ( backlightPin, pol );
<a name="l00089"></a>00089 }
<a name="l00090"></a>00090
<a name="l00091"></a><a class="code" href="class_liquid_crystal.html#ae0c3c8f7661634b1400f00a1c9c02c26">00091</a> <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal::LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable,
<a name="l00092"></a>00092 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
<a name="l00093"></a>00093 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
<a name="l00094"></a>00094 uint8_t backlightPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)
<a name="l00095"></a>00095 {
<a name="l00096"></a>00096 init(<a class="code" href="_liquid_crystal_8cpp.html#a57d84af8cf61ceee4eb91db77889f071">LCD_8BIT</a>, rs, rw, enable, d0, d1, d2, d3, d4, d5, d6, d7);
<a name="l00097"></a>00097 <a class="code" href="class_liquid_crystal.html#a63740dc1198d8169a39d9c6daff0efc9">setBacklightPin</a> ( backlightPin, pol );
<a name="l00098"></a>00098 }
<a name="l00099"></a>00099
<a name="l00100"></a><a class="code" href="class_liquid_crystal.html#a8b90122c67a6d14b967c8a11ba490670">00100</a> <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal::LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable,
<a name="l00101"></a>00101 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
<a name="l00102"></a>00102 uint8_t backlightPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)
<a name="l00103"></a>00103 {
<a name="l00104"></a>00104 init(<a class="code" href="_liquid_crystal_8cpp.html#a31e1c14e8c2845dec3301f0ebd36b43c">LCD_4BIT</a>, rs, rw, enable, d0, d1, d2, d3, 0, 0, 0, 0);
<a name="l00105"></a>00105 <a class="code" href="class_liquid_crystal.html#a63740dc1198d8169a39d9c6daff0efc9">setBacklightPin</a> ( backlightPin, pol );
<a name="l00106"></a>00106 }
<a name="l00107"></a>00107
<a name="l00108"></a><a class="code" href="class_liquid_crystal.html#a52a4de3d866e347208a32dfc9d797729">00108</a> <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal::LiquidCrystal</a>(uint8_t rs, uint8_t enable,
<a name="l00109"></a>00109 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
<a name="l00110"></a>00110 uint8_t backlightPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)
<a name="l00111"></a>00111 {
<a name="l00112"></a>00112 init(<a class="code" href="_liquid_crystal_8cpp.html#a31e1c14e8c2845dec3301f0ebd36b43c">LCD_4BIT</a>, rs, 255, enable, d0, d1, d2, d3, 0, 0, 0, 0);
<a name="l00113"></a>00113 <a class="code" href="class_liquid_crystal.html#a63740dc1198d8169a39d9c6daff0efc9">setBacklightPin</a> ( backlightPin, pol );
<a name="l00114"></a>00114 }
<a name="l00115"></a>00115
<a name="l00116"></a>00116 <span class="comment">// PUBLIC METHODS</span>
<a name="l00117"></a>00117 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00118"></a>00118
<a name="l00119"></a>00119 <span class="comment">/************ low level data pushing commands **********/</span>
<a name="l00120"></a>00120 <span class="comment">//</span>
<a name="l00121"></a>00121 <span class="comment">// send</span>
<a name="l00122"></a><a class="code" href="class_liquid_crystal.html#a56142f8b3753bedd133e4139e5eb5089">00122</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#a56142f8b3753bedd133e4139e5eb5089">LiquidCrystal::send</a>(uint8_t value, uint8_t mode)
<a name="l00123"></a>00123 {
<a name="l00124"></a>00124 <span class="comment">// Only interested in COMMAND or DATA</span>
<a name="l00125"></a>00125 digitalWrite( _rs_pin, ( mode == <a class="code" href="_l_c_d_8h.html#aad9ae913bdfab20dd94ad04ee2d5b045">DATA</a> ) );
<a name="l00126"></a>00126
<a name="l00127"></a>00127 <span class="comment">// if there is a RW pin indicated, set it low to Write</span>
<a name="l00128"></a>00128 <span class="comment">// ---------------------------------------------------</span>
<a name="l00129"></a>00129 <span class="keywordflow">if</span> (_rw_pin != 255)
<a name="l00130"></a>00130 {
<a name="l00131"></a>00131 digitalWrite(_rw_pin, LOW);
<a name="l00132"></a>00132 }
<a name="l00133"></a>00133
<a name="l00134"></a>00134 <span class="keywordflow">if</span> ( mode != <a class="code" href="_l_c_d_8h.html#aa1e30e32b6c2cf8d90a9281328472dbe">FOUR_BITS</a> )
<a name="l00135"></a>00135 {
<a name="l00136"></a>00136 <span class="keywordflow">if</span> ( (<a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> &amp; <a class="code" href="_l_c_d_8h.html#a59a57ca857dae5d89eb5f2a38c4ac6f0">LCD_8BITMODE</a> ) )
<a name="l00137"></a>00137 {
<a name="l00138"></a>00138 writeNbits(value, 8);
<a name="l00139"></a>00139 }
<a name="l00140"></a>00140 <span class="keywordflow">else</span>
<a name="l00141"></a>00141 {
<a name="l00142"></a>00142 writeNbits ( value &gt;&gt; 4, 4 );
<a name="l00143"></a>00143 writeNbits ( value, 4 );
<a name="l00144"></a>00144 }
<a name="l00145"></a>00145 }
<a name="l00146"></a>00146 <span class="keywordflow">else</span>
<a name="l00147"></a>00147 {
<a name="l00148"></a>00148 writeNbits ( value, 4 );
<a name="l00149"></a>00149 }
<a name="l00150"></a>00150 <a class="code" href="_l_c_d_8h.html#a6eac41e4be58d7736ac0c19de225c0dc">waitUsec</a> ( <a class="code" href="_liquid_crystal_8h.html#adebff0f00a59c9f9863bc196938d5726">EXEC_TIME</a> ); <span class="comment">// wait for the command to execute by the LCD</span>
<a name="l00151"></a>00151 }
<a name="l00152"></a>00152
<a name="l00153"></a>00153 <span class="comment">//</span>
<a name="l00154"></a>00154 <span class="comment">// setBacklightPin</span>
<a name="l00155"></a><a class="code" href="class_liquid_crystal.html#a63740dc1198d8169a39d9c6daff0efc9">00155</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#a63740dc1198d8169a39d9c6daff0efc9">LiquidCrystal::setBacklightPin</a> ( uint8_t pin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol )
<a name="l00156"></a>00156 {
<a name="l00157"></a>00157 pinMode ( pin, OUTPUT ); <span class="comment">// Difine the backlight pin as output</span>
<a name="l00158"></a>00158 _backlightPin = pin;
<a name="l00159"></a>00159 <a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> = pol;
<a name="l00160"></a>00160 <a class="code" href="class_liquid_crystal.html#aa2b898366e1c656ac313b9007c98cebd">setBacklight</a>(<a class="code" href="_l_c_d_8h.html#a0f50ae3b4bdb42dd5ad74b2c604a7515">BACKLIGHT_OFF</a>); <span class="comment">// Set the backlight low by default</span>
<a name="l00161"></a>00161 }
<a name="l00162"></a>00162
<a name="l00163"></a>00163 <span class="comment">//</span>
<a name="l00164"></a>00164 <span class="comment">// setBackligh</span>
<a name="l00165"></a><a class="code" href="class_liquid_crystal.html#aa2b898366e1c656ac313b9007c98cebd">00165</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#aa2b898366e1c656ac313b9007c98cebd">LiquidCrystal::setBacklight</a> ( uint8_t value )
<a name="l00166"></a>00166 {
<a name="l00167"></a>00167 <span class="comment">// Check if there is a pin assigned to the backlight</span>
<a name="l00168"></a>00168 <span class="comment">// ---------------------------------------------------</span>
<a name="l00169"></a>00169 <span class="keywordflow">if</span> ( _backlightPin != <a class="code" href="_liquid_crystal_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a> )
<a name="l00170"></a>00170 {
<a name="l00171"></a>00171 <span class="comment">// Check if the pin is associated to a timer, i.e. PWM</span>
<a name="l00172"></a>00172 <span class="comment">// ---------------------------------------------------</span>
<a name="l00173"></a>00173 <span class="keywordflow">if</span>(digitalPinToTimer(_backlightPin) != NOT_ON_TIMER)
<a name="l00174"></a>00174 {
<a name="l00175"></a>00175 <span class="comment">// Check for control polarity inversion</span>
<a name="l00176"></a>00176 <span class="comment">// ---------------------------------------------------</span>
<a name="l00177"></a>00177 <span class="keywordflow">if</span> ( <a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> == <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a> )
<a name="l00178"></a>00178 {
<a name="l00179"></a>00179 analogWrite ( _backlightPin, value );
<a name="l00180"></a>00180 }
<a name="l00181"></a>00181 <span class="keywordflow">else</span>
<a name="l00182"></a>00182 {
<a name="l00183"></a>00183 analogWrite ( _backlightPin, 255 - value );
<a name="l00184"></a>00184 }
<a name="l00185"></a>00185 }
<a name="l00186"></a>00186 <span class="comment">// Not a PWM pin, set the backlight pin for POSI or NEG</span>
<a name="l00187"></a>00187 <span class="comment">// polarity</span>
<a name="l00188"></a>00188 <span class="comment">// --------------------------------------------------------</span>
<a name="l00189"></a>00189 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (((value &gt; 0) &amp;&amp; (<a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> == <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a>)) ||
<a name="l00190"></a>00190 ((value == 0) &amp;&amp; (<a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> == <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca62d66a51fa7574c652597716f7709865">NEGATIVE</a>)))
<a name="l00191"></a>00191 {
<a name="l00192"></a>00192 digitalWrite( _backlightPin, HIGH);
<a name="l00193"></a>00193 }
<a name="l00194"></a>00194 <span class="keywordflow">else</span>
<a name="l00195"></a>00195 {
<a name="l00196"></a>00196 digitalWrite( _backlightPin, LOW);
<a name="l00197"></a>00197 }
<a name="l00198"></a>00198 }
<a name="l00199"></a>00199 }
<a name="l00200"></a>00200
<a name="l00201"></a>00201 <span class="comment">// PRIVATE METHODS</span>
<a name="l00202"></a>00202 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00203"></a>00203
<a name="l00204"></a>00204
<a name="l00205"></a>00205 <span class="comment">// init</span>
<a name="l00206"></a>00206 <span class="keywordtype">void</span> LiquidCrystal::init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
<a name="l00207"></a>00207 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
<a name="l00208"></a>00208 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
<a name="l00209"></a>00209 {
<a name="l00210"></a>00210 uint8_t i;
<a name="l00211"></a>00211
<a name="l00212"></a>00212 <span class="comment">// Initialize the IO pins</span>
<a name="l00213"></a>00213 <span class="comment">// -----------------------</span>
<a name="l00214"></a>00214
<a name="l00215"></a>00215 _rs_pin = rs;
<a name="l00216"></a>00216 _rw_pin = rw;
<a name="l00217"></a>00217 _enable_pin = enable;
<a name="l00218"></a>00218
<a name="l00219"></a>00219 _data_pins[0] = d0;
<a name="l00220"></a>00220 _data_pins[1] = d1;
<a name="l00221"></a>00221 _data_pins[2] = d2;
<a name="l00222"></a>00222 _data_pins[3] = d3;
<a name="l00223"></a>00223 _data_pins[4] = d4;
<a name="l00224"></a>00224 _data_pins[5] = d5;
<a name="l00225"></a>00225 _data_pins[6] = d6;
<a name="l00226"></a>00226 _data_pins[7] = d7;
<a name="l00227"></a>00227
<a name="l00228"></a>00228 <span class="comment">// Initialize the IO port direction to OUTPUT</span>
<a name="l00229"></a>00229 <span class="comment">// ------------------------------------------</span>
<a name="l00230"></a>00230
<a name="l00231"></a>00231 <span class="keywordflow">for</span> ( i = 0; i &lt; 4; i++ )
<a name="l00232"></a>00232 {
<a name="l00233"></a>00233 pinMode ( _data_pins[i], OUTPUT );
<a name="l00234"></a>00234 }
<a name="l00235"></a>00235
<a name="l00236"></a>00236 <span class="comment">// Initialize the rest of the ports if it is an 8bit controlled LCD</span>
<a name="l00237"></a>00237 <span class="comment">// ----------------------------------------------------------------</span>
<a name="l00238"></a>00238
<a name="l00239"></a>00239 <span class="keywordflow">if</span> ( !fourbitmode )
<a name="l00240"></a>00240 {
<a name="l00241"></a>00241 <span class="keywordflow">for</span> ( i = 4; i &lt; 8; i++ )
<a name="l00242"></a>00242 {
<a name="l00243"></a>00243 pinMode ( _data_pins[i], OUTPUT );
<a name="l00244"></a>00244 }
<a name="l00245"></a>00245 }
<a name="l00246"></a>00246 pinMode(_rs_pin, OUTPUT);
<a name="l00247"></a>00247
<a name="l00248"></a>00248 <span class="comment">// we can save 1 pin by not using RW. Indicate by passing 255 instead of pin#</span>
<a name="l00249"></a>00249 <span class="keywordflow">if</span> (_rw_pin != 255)
<a name="l00250"></a>00250 {
<a name="l00251"></a>00251 pinMode(_rw_pin, OUTPUT);
<a name="l00252"></a>00252 }
<a name="l00253"></a>00253
<a name="l00254"></a>00254 pinMode(_enable_pin, OUTPUT);
<a name="l00255"></a>00255
<a name="l00256"></a>00256 <span class="comment">// Initialise displaymode functions to defaults: LCD_1LINE and LCD_5x8DOTS</span>
<a name="l00257"></a>00257 <span class="comment">// -------------------------------------------------------------------------</span>
<a name="l00258"></a>00258 <span class="keywordflow">if</span> (fourbitmode)
<a name="l00259"></a>00259 <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> = <a class="code" href="_l_c_d_8h.html#ab8c35d355d2372090c7a347e961c9224">LCD_4BITMODE</a> | <a class="code" href="_l_c_d_8h.html#a8c85cf88d8af66a47c42249d81c94641">LCD_1LINE</a> | <a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">LCD_5x8DOTS</a>;
<a name="l00260"></a>00260 <span class="keywordflow">else</span>
<a name="l00261"></a>00261 <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> = <a class="code" href="_l_c_d_8h.html#a59a57ca857dae5d89eb5f2a38c4ac6f0">LCD_8BITMODE</a> | <a class="code" href="_l_c_d_8h.html#a8c85cf88d8af66a47c42249d81c94641">LCD_1LINE</a> | <a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">LCD_5x8DOTS</a>;
<a name="l00262"></a>00262
<a name="l00263"></a>00263 <span class="comment">// Now we pull both RS and R/W low to begin commands</span>
<a name="l00264"></a>00264 digitalWrite(_rs_pin, LOW);
<a name="l00265"></a>00265 digitalWrite(_enable_pin, LOW);
<a name="l00266"></a>00266
<a name="l00267"></a>00267 <span class="keywordflow">if</span> (_rw_pin != 255)
<a name="l00268"></a>00268 {
<a name="l00269"></a>00269 digitalWrite(_rw_pin, LOW);
<a name="l00270"></a>00270 }
<a name="l00271"></a>00271
<a name="l00272"></a>00272 <span class="comment">// Initialise the backlight pin no nothing</span>
<a name="l00273"></a>00273 _backlightPin = <a class="code" href="_liquid_crystal_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
<a name="l00274"></a>00274 <a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> = <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a>;
<a name="l00275"></a>00275 }
<a name="l00276"></a>00276
<a name="l00277"></a>00277 <span class="comment">//</span>
<a name="l00278"></a>00278 <span class="comment">// pulseEnable</span>
<a name="l00279"></a>00279 <span class="keywordtype">void</span> LiquidCrystal::pulseEnable(<span class="keywordtype">void</span>)
<a name="l00280"></a>00280 {
<a name="l00281"></a>00281 <span class="comment">// There is no need for the delays, since the digitalWrite operation</span>
<a name="l00282"></a>00282 <span class="comment">// takes longer.</span>
<a name="l00283"></a>00283 digitalWrite(_enable_pin, HIGH);
<a name="l00284"></a>00284 <a class="code" href="_l_c_d_8h.html#a6eac41e4be58d7736ac0c19de225c0dc">waitUsec</a>(1); <span class="comment">// enable pulse must be &gt; 450ns </span>
<a name="l00285"></a>00285 digitalWrite(_enable_pin, LOW);
<a name="l00286"></a>00286 }
<a name="l00287"></a>00287
<a name="l00288"></a>00288 <span class="comment">//</span>
<a name="l00289"></a>00289 <span class="comment">// write4bits</span>
<a name="l00290"></a>00290 <span class="keywordtype">void</span> LiquidCrystal::writeNbits(uint8_t value, uint8_t numBits)
<a name="l00291"></a>00291 {
<a name="l00292"></a>00292 <span class="keywordflow">for</span> (uint8_t i = 0; i &lt; numBits; i++)
<a name="l00293"></a>00293 {
<a name="l00294"></a>00294 digitalWrite(_data_pins[i], (value &gt;&gt; i) &amp; 0x01);
<a name="l00295"></a>00295 }
<a name="l00296"></a>00296 pulseEnable();
<a name="l00297"></a>00297 }
<a name="l00298"></a>00298
<a name="l00299"></a>00299
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,117 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Defines</a> </div>
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal.h File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_l_c_d_8h_source.html">LCD.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>&quot;</code><br/>
</div>
<p><a href="_liquid_crystal_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal.html">LiquidCrystal</a></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal_8h.html#adebff0f00a59c9f9863bc196938d5726">EXEC_TIME</a>&#160;&#160;&#160;37</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="adebff0f00a59c9f9863bc196938d5726"></a><!-- doxytag: member="LiquidCrystal.h::EXEC_TIME" ref="adebff0f00a59c9f9863bc196938d5726" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define EXEC_TIME&#160;&#160;&#160;37</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Command execution time on the <a class="el" href="class_l_c_d.html">LCD</a>. This defines how long a command takes to execute by the <a class="el" href="class_l_c_d.html">LCD</a>. The time is expressed in micro-seconds. </p>
<p>Definition at line <a class="el" href="_liquid_crystal_8h_source.html#l00042">42</a> of file <a class="el" href="_liquid_crystal_8h_source.html">LiquidCrystal.h</a>.</p>
</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,176 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal.h</div> </div>
</div>
<div class="contents">
<a href="_liquid_crystal_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created by Francisco Malpartida on 20/08/11.</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2011 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no </span>
<a name="l00007"></a>00007 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// Thread Safe: No</span>
<a name="l00010"></a>00010 <span class="comment">// Extendable: Yes</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// @file LiquidCrystal.h</span>
<a name="l00013"></a>00013 <span class="comment">// This file implements a basic liquid crystal library that comes as standard</span>
<a name="l00014"></a>00014 <span class="comment">// in the Arduino SDK.</span>
<a name="l00015"></a>00015 <span class="comment">// </span>
<a name="l00016"></a>00016 <span class="comment">// @brief </span>
<a name="l00017"></a>00017 <span class="comment">// This is a basic implementation of the LiquidCrystal library of the</span>
<a name="l00018"></a>00018 <span class="comment">// Arduino SDK. The original library has been reworked in such a way that </span>
<a name="l00019"></a>00019 <span class="comment">// this class implements the all methods to command an LCD based</span>
<a name="l00020"></a>00020 <span class="comment">// on the Hitachi HD44780 and compatible chipsets using the parallel port of</span>
<a name="l00021"></a>00021 <span class="comment">// the LCD (4 bit and 8 bit).</span>
<a name="l00022"></a>00022 <span class="comment">//</span>
<a name="l00023"></a>00023 <span class="comment">//</span>
<a name="l00024"></a>00024 <span class="comment">//</span>
<a name="l00025"></a>00025 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
<a name="l00026"></a>00026 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef LiquidCrystal_4bit_h</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define LiquidCrystal_4bit_h</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00031"></a>00031
<a name="l00032"></a>00032 <span class="preprocessor">#include &quot;<a class="code" href="_l_c_d_8h.html">LCD.h</a>&quot;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &quot;<a class="code" href="_fast_i_o_8h.html">FastIO.h</a>&quot;</span>
<a name="l00034"></a>00034
<a name="l00035"></a>00035
<a name="l00042"></a><a class="code" href="_liquid_crystal_8h.html#adebff0f00a59c9f9863bc196938d5726">00042</a> <span class="preprocessor">#define EXEC_TIME 37</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span>
<a name="l00044"></a><a class="code" href="class_liquid_crystal.html">00044</a> <span class="keyword">class </span><a class="code" href="class_liquid_crystal.html">LiquidCrystal</a> : <span class="keyword">public</span> <a class="code" href="class_l_c_d.html">LCD</a>
<a name="l00045"></a>00045 {
<a name="l00046"></a>00046 <span class="keyword">public</span>:
<a name="l00053"></a>00053 <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t enable,
<a name="l00054"></a>00054 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
<a name="l00055"></a>00055 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
<a name="l00056"></a>00056 <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable,
<a name="l00057"></a>00057 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
<a name="l00058"></a>00058 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
<a name="l00059"></a>00059
<a name="l00060"></a>00060 <span class="comment">// Constructors with backlight control</span>
<a name="l00061"></a>00061 <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t enable,
<a name="l00062"></a>00062 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
<a name="l00063"></a>00063 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
<a name="l00064"></a>00064 uint8_t backlightPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol);
<a name="l00065"></a>00065 <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable,
<a name="l00066"></a>00066 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
<a name="l00067"></a>00067 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
<a name="l00068"></a>00068 uint8_t backlightPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol);
<a name="l00075"></a>00075 <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable,
<a name="l00076"></a>00076 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
<a name="l00077"></a>00077 <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t enable,
<a name="l00078"></a>00078 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3);
<a name="l00079"></a>00079
<a name="l00080"></a>00080 <span class="comment">// Constructors with backlight control</span>
<a name="l00081"></a>00081 <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable,
<a name="l00082"></a>00082 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
<a name="l00083"></a>00083 uint8_t backlightPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol);
<a name="l00084"></a>00084 <a class="code" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t enable,
<a name="l00085"></a>00085 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
<a name="l00086"></a>00086 uint8_t backlightPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol);
<a name="l00099"></a>00099 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#a56142f8b3753bedd133e4139e5eb5089">send</a>(uint8_t value, uint8_t mode);
<a name="l00100"></a>00100
<a name="l00109"></a>00109 <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#a63740dc1198d8169a39d9c6daff0efc9">setBacklightPin</a> ( uint8_t pin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol );
<a name="l00110"></a>00110
<a name="l00125"></a>00125 <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal.html#aa2b898366e1c656ac313b9007c98cebd">setBacklight</a> ( uint8_t value );
<a name="l00126"></a>00126
<a name="l00127"></a>00127 <span class="keyword">private</span>:
<a name="l00128"></a>00128
<a name="l00134"></a>00134 <span class="keywordtype">void</span> init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
<a name="l00135"></a>00135 uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
<a name="l00136"></a>00136 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
<a name="l00137"></a>00137
<a name="l00144"></a>00144 <span class="keywordtype">void</span> writeNbits(uint8_t value, uint8_t numBits);
<a name="l00145"></a>00145
<a name="l00152"></a>00152 <span class="keywordtype">void</span> pulseEnable();
<a name="l00153"></a>00153
<a name="l00154"></a>00154 uint8_t _rs_pin; <span class="comment">// LOW: command. HIGH: character.</span>
<a name="l00155"></a>00155 uint8_t _rw_pin; <span class="comment">// LOW: write to LCD. HIGH: read from LCD.</span>
<a name="l00156"></a>00156 uint8_t _enable_pin; <span class="comment">// activated by a HIGH pulse.</span>
<a name="l00157"></a>00157 uint8_t _data_pins[8]; <span class="comment">// Data pins.</span>
<a name="l00158"></a>00158 uint8_t _backlightPin; <span class="comment">// Pin associated to control the LCD backlight</span>
<a name="l00159"></a>00159 };
<a name="l00160"></a>00160
<a name="l00161"></a>00161 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,247 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_I2C.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Defines</a> </div>
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_I2C.cpp File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;WProgram.h&gt;</code><br/>
<code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_i2_c_i_o_8h_source.html">I2CIO.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_liquid_crystal___i2_c_8h_source.html">LiquidCrystal_I2C.h</a>&quot;</code><br/>
</div>
<p><a href="_liquid_crystal___i2_c_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___i2_c_8cpp.html#a3d9bb178282c3cb69740c94ba1e48fed">D4</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___i2_c_8cpp.html#a2ddd4183d444d6d128cbdbd6269e4e0c">D5</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___i2_c_8cpp.html#a79a18a7f5ccf7a7ca31f302bd62527a6">D6</a>&#160;&#160;&#160;2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___i2_c_8cpp.html#a2ba78f059a7ebebc95e7beef690e88d6">D7</a>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___i2_c_8cpp.html#a22e6626f2c98ed902f8ded47f6438c05">EN</a>&#160;&#160;&#160;6</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___i2_c_8cpp.html#ac059d24dfe9c1e1f7c07cb7869a1833b">LCD_BACKLIGHT</a>&#160;&#160;&#160;0xFF</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___i2_c_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___i2_c_8cpp.html#af8903d8eea3868940c60af887473b152">RS</a>&#160;&#160;&#160;4</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___i2_c_8cpp.html#afc4ded33ac0ca43defcce639e965748a">RW</a>&#160;&#160;&#160;5</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a3d9bb178282c3cb69740c94ba1e48fed"></a><!-- doxytag: member="LiquidCrystal_I2C.cpp::D4" ref="a3d9bb178282c3cb69740c94ba1e48fed" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define D4&#160;&#160;&#160;0</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="class_l_c_d.html">LCD</a> dataline allocation this library only supports 4 bit <a class="el" href="class_l_c_d.html">LCD</a> control mode. D4, D5, D6, D7 <a class="el" href="class_l_c_d.html">LCD</a> data lines pin mapping of the extender module </p>
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00088">88</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a2ddd4183d444d6d128cbdbd6269e4e0c"></a><!-- doxytag: member="LiquidCrystal_I2C.cpp::D5" ref="a2ddd4183d444d6d128cbdbd6269e4e0c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define D5&#160;&#160;&#160;1</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00089">89</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a79a18a7f5ccf7a7ca31f302bd62527a6"></a><!-- doxytag: member="LiquidCrystal_I2C.cpp::D6" ref="a79a18a7f5ccf7a7ca31f302bd62527a6" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define D6&#160;&#160;&#160;2</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00090">90</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a2ba78f059a7ebebc95e7beef690e88d6"></a><!-- doxytag: member="LiquidCrystal_I2C.cpp::D7" ref="a2ba78f059a7ebebc95e7beef690e88d6" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define D7&#160;&#160;&#160;3</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00091">91</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a22e6626f2c98ed902f8ded47f6438c05"></a><!-- doxytag: member="LiquidCrystal_I2C.cpp::EN" ref="a22e6626f2c98ed902f8ded47f6438c05" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define EN&#160;&#160;&#160;6</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Enable bit of the <a class="el" href="class_l_c_d.html">LCD</a> Defines the IO of the expander connected to the <a class="el" href="class_l_c_d.html">LCD</a> Enable </p>
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00066">66</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ac059d24dfe9c1e1f7c07cb7869a1833b"></a><!-- doxytag: member="LiquidCrystal_I2C.cpp::LCD_BACKLIGHT" ref="ac059d24dfe9c1e1f7c07cb7869a1833b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_BACKLIGHT&#160;&#160;&#160;0xFF</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>LCD_BACKLIGHT BACKLIGHT MASK used when backlight is on </p>
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00055">55</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a65fa786d6e31fe8b1aa51784a9736581"></a><!-- doxytag: member="LiquidCrystal_I2C.cpp::LCD_NOBACKLIGHT" ref="a65fa786d6e31fe8b1aa51784a9736581" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_NOBACKLIGHT&#160;&#160;&#160;0x00</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>LCD_NOBACKLIGHT NO BACKLIGHT MASK </p>
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00048">48</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="af8903d8eea3868940c60af887473b152"></a><!-- doxytag: member="LiquidCrystal_I2C.cpp::RS" ref="af8903d8eea3868940c60af887473b152" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define RS&#160;&#160;&#160;4</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Register bit of the <a class="el" href="class_l_c_d.html">LCD</a> Defines the IO of the expander connected to the <a class="el" href="class_l_c_d.html">LCD</a> Register select pin </p>
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00080">80</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="afc4ded33ac0ca43defcce639e965748a"></a><!-- doxytag: member="LiquidCrystal_I2C.cpp::RW" ref="afc4ded33ac0ca43defcce639e965748a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define RW&#160;&#160;&#160;5</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Read/Write bit of the <a class="el" href="class_l_c_d.html">LCD</a> Defines the IO of the expander connected to the <a class="el" href="class_l_c_d.html">LCD</a> Rw pin </p>
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00073">73</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,344 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_I2C.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_I2C.cpp</div> </div>
</div>
<div class="contents">
<a href="_liquid_crystal___i2_c_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created by Francisco Malpartida on 20/08/11.</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2011 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no </span>
<a name="l00007"></a>00007 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// Thread Safe: No</span>
<a name="l00010"></a>00010 <span class="comment">// Extendable: Yes</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// @file LiquidCrystal_I2C.c</span>
<a name="l00013"></a>00013 <span class="comment">// This file implements a basic liquid crystal library that comes as standard</span>
<a name="l00014"></a>00014 <span class="comment">// in the Arduino SDK but using an I2C IO extension board.</span>
<a name="l00015"></a>00015 <span class="comment">// </span>
<a name="l00016"></a>00016 <span class="comment">// @brief </span>
<a name="l00017"></a>00017 <span class="comment">// This is a basic implementation of the LiquidCrystal library of the</span>
<a name="l00018"></a>00018 <span class="comment">// Arduino SDK. The original library has been reworked in such a way that </span>
<a name="l00019"></a>00019 <span class="comment">// this class implements the all methods to command an LCD based</span>
<a name="l00020"></a>00020 <span class="comment">// on the Hitachi HD44780 and compatible chipsets using I2C extension</span>
<a name="l00021"></a>00021 <span class="comment">// backpacks such as the I2CLCDextraIO with the PCF8574* I2C IO Expander ASIC.</span>
<a name="l00022"></a>00022 <span class="comment">//</span>
<a name="l00023"></a>00023 <span class="comment">// The functionality provided by this class and its base class is identical</span>
<a name="l00024"></a>00024 <span class="comment">// to the original functionality of the Arduino LiquidCrystal library.</span>
<a name="l00025"></a>00025 <span class="comment">//</span>
<a name="l00026"></a>00026 <span class="comment">//</span>
<a name="l00027"></a>00027 <span class="comment">//</span>
<a name="l00028"></a>00028 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
<a name="l00029"></a>00029 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00030"></a>00030 <span class="preprocessor">#if (ARDUINO &lt; 100)</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#include &lt;WProgram.h&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#else</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Arduino.h&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#endif</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &quot;<a class="code" href="_i2_c_i_o_8h.html">I2CIO.h</a>&quot;</span>
<a name="l00037"></a>00037 <span class="preprocessor">#include &quot;<a class="code" href="_liquid_crystal___i2_c_8h.html">LiquidCrystal_I2C.h</a>&quot;</span>
<a name="l00038"></a>00038
<a name="l00039"></a>00039 <span class="comment">// CONSTANT definitions</span>
<a name="l00040"></a>00040 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00041"></a>00041
<a name="l00042"></a>00042 <span class="comment">// flags for backlight control</span>
<a name="l00048"></a><a class="code" href="_liquid_crystal___i2_c_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">00048</a> <span class="comment"></span><span class="preprocessor">#define LCD_NOBACKLIGHT 0x00</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span>
<a name="l00055"></a><a class="code" href="_liquid_crystal___i2_c_8cpp.html#ac059d24dfe9c1e1f7c07cb7869a1833b">00055</a> <span class="preprocessor">#define LCD_BACKLIGHT 0xFF</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span>
<a name="l00057"></a>00057
<a name="l00058"></a>00058 <span class="comment">// Default library configuration parameters used by class constructor with</span>
<a name="l00059"></a>00059 <span class="comment">// only the I2C address field.</span>
<a name="l00060"></a>00060 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00066"></a><a class="code" href="_liquid_crystal___i2_c_8cpp.html#a22e6626f2c98ed902f8ded47f6438c05">00066</a> <span class="comment"></span><span class="preprocessor">#define EN 6 // Enable bit</span>
<a name="l00067"></a>00067 <span class="preprocessor"></span>
<a name="l00073"></a><a class="code" href="_liquid_crystal___i2_c_8cpp.html#afc4ded33ac0ca43defcce639e965748a">00073</a> <span class="preprocessor">#define RW 5 // Read/Write bit</span>
<a name="l00074"></a>00074 <span class="preprocessor"></span>
<a name="l00080"></a><a class="code" href="_liquid_crystal___i2_c_8cpp.html#af8903d8eea3868940c60af887473b152">00080</a> <span class="preprocessor">#define RS 4 // Register select bit</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span>
<a name="l00088"></a><a class="code" href="_liquid_crystal___i2_c_8cpp.html#a3d9bb178282c3cb69740c94ba1e48fed">00088</a> <span class="preprocessor">#define D4 0</span>
<a name="l00089"></a><a class="code" href="_liquid_crystal___i2_c_8cpp.html#a2ddd4183d444d6d128cbdbd6269e4e0c">00089</a> <span class="preprocessor"></span><span class="preprocessor">#define D5 1</span>
<a name="l00090"></a><a class="code" href="_liquid_crystal___i2_c_8cpp.html#a79a18a7f5ccf7a7ca31f302bd62527a6">00090</a> <span class="preprocessor"></span><span class="preprocessor">#define D6 2</span>
<a name="l00091"></a><a class="code" href="_liquid_crystal___i2_c_8cpp.html#a2ba78f059a7ebebc95e7beef690e88d6">00091</a> <span class="preprocessor"></span><span class="preprocessor">#define D7 3</span>
<a name="l00092"></a>00092 <span class="preprocessor"></span>
<a name="l00093"></a>00093
<a name="l00094"></a>00094 <span class="comment">// CONSTRUCTORS</span>
<a name="l00095"></a>00095 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00096"></a><a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">00096</a> <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C::LiquidCrystal_I2C</a>( uint8_t lcd_Addr )
<a name="l00097"></a>00097 {
<a name="l00098"></a>00098 config(lcd_Addr, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a22e6626f2c98ed902f8ded47f6438c05">EN</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#afc4ded33ac0ca43defcce639e965748a">RW</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#af8903d8eea3868940c60af887473b152">RS</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a3d9bb178282c3cb69740c94ba1e48fed">D4</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a2ddd4183d444d6d128cbdbd6269e4e0c">D5</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a79a18a7f5ccf7a7ca31f302bd62527a6">D6</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a2ba78f059a7ebebc95e7beef690e88d6">D7</a>);
<a name="l00099"></a>00099 }
<a name="l00100"></a>00100
<a name="l00101"></a>00101
<a name="l00102"></a><a class="code" href="class_liquid_crystal___i2_c.html#a9fc9bc519ebbf7503dadc11622e02ed6">00102</a> <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C::LiquidCrystal_I2C</a>(uint8_t lcd_Addr, uint8_t backlighPin,
<a name="l00103"></a>00103 <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol = <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a>)
<a name="l00104"></a>00104 {
<a name="l00105"></a>00105 config(lcd_Addr, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a22e6626f2c98ed902f8ded47f6438c05">EN</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#afc4ded33ac0ca43defcce639e965748a">RW</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#af8903d8eea3868940c60af887473b152">RS</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a3d9bb178282c3cb69740c94ba1e48fed">D4</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a2ddd4183d444d6d128cbdbd6269e4e0c">D5</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a79a18a7f5ccf7a7ca31f302bd62527a6">D6</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a2ba78f059a7ebebc95e7beef690e88d6">D7</a>);
<a name="l00106"></a>00106 <a class="code" href="class_liquid_crystal___i2_c.html#a2eaf86f62d1f169b3763b03fbf88f70b">setBacklightPin</a>(backlighPin, pol);
<a name="l00107"></a>00107 }
<a name="l00108"></a>00108
<a name="l00109"></a><a class="code" href="class_liquid_crystal___i2_c.html#a517f8847ebf09f0eacfb9c7232975fce">00109</a> <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C::LiquidCrystal_I2C</a>(uint8_t lcd_Addr, uint8_t En, uint8_t Rw,
<a name="l00110"></a>00110 uint8_t Rs)
<a name="l00111"></a>00111 {
<a name="l00112"></a>00112 config(lcd_Addr, En, Rw, Rs, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a3d9bb178282c3cb69740c94ba1e48fed">D4</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a2ddd4183d444d6d128cbdbd6269e4e0c">D5</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a79a18a7f5ccf7a7ca31f302bd62527a6">D6</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a2ba78f059a7ebebc95e7beef690e88d6">D7</a>);
<a name="l00113"></a>00113 }
<a name="l00114"></a>00114
<a name="l00115"></a><a class="code" href="class_liquid_crystal___i2_c.html#add1f2da7de4ec9b9cd5c9b5fab712464">00115</a> <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C::LiquidCrystal_I2C</a>(uint8_t lcd_Addr, uint8_t En, uint8_t Rw,
<a name="l00116"></a>00116 uint8_t Rs, uint8_t backlighPin,
<a name="l00117"></a>00117 <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol = <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a>)
<a name="l00118"></a>00118 {
<a name="l00119"></a>00119 config(lcd_Addr, En, Rw, Rs, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a3d9bb178282c3cb69740c94ba1e48fed">D4</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a2ddd4183d444d6d128cbdbd6269e4e0c">D5</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a79a18a7f5ccf7a7ca31f302bd62527a6">D6</a>, <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a2ba78f059a7ebebc95e7beef690e88d6">D7</a>);
<a name="l00120"></a>00120 <a class="code" href="class_liquid_crystal___i2_c.html#a2eaf86f62d1f169b3763b03fbf88f70b">setBacklightPin</a>(backlighPin, pol);
<a name="l00121"></a>00121 }
<a name="l00122"></a>00122
<a name="l00123"></a><a class="code" href="class_liquid_crystal___i2_c.html#a7d9b54d3a91fa0e0e50db27cda6b4654">00123</a> <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C::LiquidCrystal_I2C</a>(uint8_t lcd_Addr, uint8_t En, uint8_t Rw,
<a name="l00124"></a>00124 uint8_t Rs, uint8_t d4, uint8_t d5,
<a name="l00125"></a>00125 uint8_t d6, uint8_t d7 )
<a name="l00126"></a>00126 {
<a name="l00127"></a>00127 config(lcd_Addr, En, Rw, Rs, d4, d5, d6, d7);
<a name="l00128"></a>00128 }
<a name="l00129"></a>00129
<a name="l00130"></a><a class="code" href="class_liquid_crystal___i2_c.html#ab15622287533de7a47f3e2012ebf18be">00130</a> <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C::LiquidCrystal_I2C</a>(uint8_t lcd_Addr, uint8_t En, uint8_t Rw,
<a name="l00131"></a>00131 uint8_t Rs, uint8_t d4, uint8_t d5,
<a name="l00132"></a>00132 uint8_t d6, uint8_t d7, uint8_t backlighPin,
<a name="l00133"></a>00133 <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol = <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a> )
<a name="l00134"></a>00134 {
<a name="l00135"></a>00135 config(lcd_Addr, En, Rw, Rs, d4, d5, d6, d7);
<a name="l00136"></a>00136 <a class="code" href="class_liquid_crystal___i2_c.html#a2eaf86f62d1f169b3763b03fbf88f70b">setBacklightPin</a>(backlighPin, pol);
<a name="l00137"></a>00137 }
<a name="l00138"></a>00138
<a name="l00139"></a>00139 <span class="comment">// PUBLIC METHODS</span>
<a name="l00140"></a>00140 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00141"></a>00141
<a name="l00142"></a>00142 <span class="comment">//</span>
<a name="l00143"></a>00143 <span class="comment">// begin</span>
<a name="l00144"></a><a class="code" href="class_liquid_crystal___i2_c.html#aeee2ada537f0cfbfda8613324b57c4a6">00144</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___i2_c.html#aeee2ada537f0cfbfda8613324b57c4a6">LiquidCrystal_I2C::begin</a>(uint8_t cols, uint8_t lines, uint8_t dotsize)
<a name="l00145"></a>00145 {
<a name="l00146"></a>00146
<a name="l00147"></a>00147 init(); <span class="comment">// Initialise the I2C expander interface</span>
<a name="l00148"></a>00148 <a class="code" href="class_liquid_crystal___i2_c.html#aeee2ada537f0cfbfda8613324b57c4a6">LCD::begin</a> ( cols, lines, dotsize );
<a name="l00149"></a>00149 }
<a name="l00150"></a>00150
<a name="l00151"></a>00151
<a name="l00152"></a>00152 <span class="comment">// User commands - users can expand this section</span>
<a name="l00153"></a>00153 <span class="comment">//----------------------------------------------------------------------------</span>
<a name="l00154"></a>00154 <span class="comment">// Turn the (optional) backlight off/on</span>
<a name="l00155"></a>00155
<a name="l00156"></a>00156 <span class="comment">//</span>
<a name="l00157"></a>00157 <span class="comment">// setBacklightPin</span>
<a name="l00158"></a><a class="code" href="class_liquid_crystal___i2_c.html#a2eaf86f62d1f169b3763b03fbf88f70b">00158</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___i2_c.html#a2eaf86f62d1f169b3763b03fbf88f70b">LiquidCrystal_I2C::setBacklightPin</a> ( uint8_t value, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol = <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a> )
<a name="l00159"></a>00159 {
<a name="l00160"></a>00160 _backlightPinMask = ( 1 &lt;&lt; value );
<a name="l00161"></a>00161 <a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> = pol;
<a name="l00162"></a>00162 <a class="code" href="class_liquid_crystal___i2_c.html#af11b8fa0082616e2b6e6e4238589d8a8">setBacklight</a>(<a class="code" href="_l_c_d_8h.html#a0f50ae3b4bdb42dd5ad74b2c604a7515">BACKLIGHT_OFF</a>);
<a name="l00163"></a>00163 }
<a name="l00164"></a>00164
<a name="l00165"></a>00165 <span class="comment">//</span>
<a name="l00166"></a>00166 <span class="comment">// setBacklight</span>
<a name="l00167"></a><a class="code" href="class_liquid_crystal___i2_c.html#af11b8fa0082616e2b6e6e4238589d8a8">00167</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___i2_c.html#af11b8fa0082616e2b6e6e4238589d8a8">LiquidCrystal_I2C::setBacklight</a>( uint8_t value )
<a name="l00168"></a>00168 {
<a name="l00169"></a>00169 <span class="comment">// Check if backlight is available</span>
<a name="l00170"></a>00170 <span class="comment">// ----------------------------------------------------</span>
<a name="l00171"></a>00171 <span class="keywordflow">if</span> ( _backlightPinMask != 0x0 )
<a name="l00172"></a>00172 {
<a name="l00173"></a>00173 <span class="comment">// Check for polarity to configure mask accordingly</span>
<a name="l00174"></a>00174 <span class="comment">// ----------------------------------------------------------</span>
<a name="l00175"></a>00175 <span class="keywordflow">if</span> (((<a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> == <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a>) &amp;&amp; (value &gt; 0)) ||
<a name="l00176"></a>00176 ((<a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> == <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca62d66a51fa7574c652597716f7709865">NEGATIVE</a> ) &amp;&amp; ( value == 0 )))
<a name="l00177"></a>00177 {
<a name="l00178"></a>00178 _backlightStsMask = _backlightPinMask &amp; <a class="code" href="_liquid_crystal___i2_c_8cpp.html#ac059d24dfe9c1e1f7c07cb7869a1833b">LCD_BACKLIGHT</a>;
<a name="l00179"></a>00179 }
<a name="l00180"></a>00180 <span class="keywordflow">else</span>
<a name="l00181"></a>00181 {
<a name="l00182"></a>00182 _backlightStsMask = _backlightPinMask &amp; <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
<a name="l00183"></a>00183 }
<a name="l00184"></a>00184 _i2cio.<a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a>( _backlightStsMask );
<a name="l00185"></a>00185 }
<a name="l00186"></a>00186 }
<a name="l00187"></a>00187
<a name="l00188"></a>00188
<a name="l00189"></a>00189 <span class="comment">// PRIVATE METHODS</span>
<a name="l00190"></a>00190 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00191"></a>00191
<a name="l00192"></a>00192 <span class="comment">//</span>
<a name="l00193"></a>00193 <span class="comment">// init</span>
<a name="l00194"></a>00194 <span class="keywordtype">int</span> LiquidCrystal_I2C::init()
<a name="l00195"></a>00195 {
<a name="l00196"></a>00196 <span class="keywordtype">int</span> status = 0;
<a name="l00197"></a>00197
<a name="l00198"></a>00198 <span class="comment">// initialize the backpack IO expander</span>
<a name="l00199"></a>00199 <span class="comment">// and display functions.</span>
<a name="l00200"></a>00200 <span class="comment">// ------------------------------------------------------------------------</span>
<a name="l00201"></a>00201 <span class="keywordflow">if</span> ( _i2cio.<a class="code" href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">begin</a> ( _Addr ) == 1 )
<a name="l00202"></a>00202 {
<a name="l00203"></a>00203 _i2cio.<a class="code" href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">portMode</a> ( OUTPUT ); <span class="comment">// Set the entire IO extender to OUTPUT</span>
<a name="l00204"></a>00204 <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> = <a class="code" href="_l_c_d_8h.html#ab8c35d355d2372090c7a347e961c9224">LCD_4BITMODE</a> | <a class="code" href="_l_c_d_8h.html#a8c85cf88d8af66a47c42249d81c94641">LCD_1LINE</a> | <a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">LCD_5x8DOTS</a>;
<a name="l00205"></a>00205 status = 1;
<a name="l00206"></a>00206 _i2cio.<a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a>(0); <span class="comment">// Set the entire port to LOW</span>
<a name="l00207"></a>00207 }
<a name="l00208"></a>00208 <span class="keywordflow">return</span> ( status );
<a name="l00209"></a>00209 }
<a name="l00210"></a>00210
<a name="l00211"></a>00211 <span class="comment">//</span>
<a name="l00212"></a>00212 <span class="comment">// config</span>
<a name="l00213"></a>00213 <span class="keywordtype">void</span> LiquidCrystal_I2C::config (uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs,
<a name="l00214"></a>00214 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7 )
<a name="l00215"></a>00215 {
<a name="l00216"></a>00216 _Addr = lcd_Addr;
<a name="l00217"></a>00217
<a name="l00218"></a>00218 _backlightPinMask = 0;
<a name="l00219"></a>00219 _backlightStsMask = <a class="code" href="_liquid_crystal___i2_c_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
<a name="l00220"></a>00220 <a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> = <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a>;
<a name="l00221"></a>00221
<a name="l00222"></a>00222 _En = ( 1 &lt;&lt; En );
<a name="l00223"></a>00223 _Rw = ( 1 &lt;&lt; Rw );
<a name="l00224"></a>00224 _Rs = ( 1 &lt;&lt; Rs );
<a name="l00225"></a>00225
<a name="l00226"></a>00226 <span class="comment">// Initialise pin mapping</span>
<a name="l00227"></a>00227 _data_pins[0] = ( 1 &lt;&lt; d4 );
<a name="l00228"></a>00228 _data_pins[1] = ( 1 &lt;&lt; d5 );
<a name="l00229"></a>00229 _data_pins[2] = ( 1 &lt;&lt; d6 );
<a name="l00230"></a>00230 _data_pins[3] = ( 1 &lt;&lt; d7 );
<a name="l00231"></a>00231 }
<a name="l00232"></a>00232
<a name="l00233"></a>00233
<a name="l00234"></a>00234
<a name="l00235"></a>00235 <span class="comment">// low level data pushing commands</span>
<a name="l00236"></a>00236 <span class="comment">//----------------------------------------------------------------------------</span>
<a name="l00237"></a>00237
<a name="l00238"></a>00238 <span class="comment">//</span>
<a name="l00239"></a>00239 <span class="comment">// send - write either command or data</span>
<a name="l00240"></a><a class="code" href="class_liquid_crystal___i2_c.html#a8bf1fab7efe13e8b17b96c42d1f810b4">00240</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___i2_c.html#a8bf1fab7efe13e8b17b96c42d1f810b4">LiquidCrystal_I2C::send</a>(uint8_t value, uint8_t mode)
<a name="l00241"></a>00241 {
<a name="l00242"></a>00242 <span class="comment">// No need to use the delay routines since the time taken to write takes</span>
<a name="l00243"></a>00243 <span class="comment">// longer that what is needed both for toggling and enable pin an to execute</span>
<a name="l00244"></a>00244 <span class="comment">// the command.</span>
<a name="l00245"></a>00245
<a name="l00246"></a>00246 <span class="keywordflow">if</span> ( mode == <a class="code" href="_l_c_d_8h.html#aa1e30e32b6c2cf8d90a9281328472dbe">FOUR_BITS</a> )
<a name="l00247"></a>00247 {
<a name="l00248"></a>00248 write4bits( (value &amp; 0x0F), <a class="code" href="_l_c_d_8h.html#ab0d87e07831e7e4943caef187872123e">COMMAND</a> );
<a name="l00249"></a>00249 }
<a name="l00250"></a>00250 <span class="keywordflow">else</span>
<a name="l00251"></a>00251 {
<a name="l00252"></a>00252 write4bits( (value &gt;&gt; 4), mode );
<a name="l00253"></a>00253 write4bits( (value &amp; 0x0F), mode);
<a name="l00254"></a>00254 }
<a name="l00255"></a>00255 }
<a name="l00256"></a>00256
<a name="l00257"></a>00257 <span class="comment">//</span>
<a name="l00258"></a>00258 <span class="comment">// write4bits</span>
<a name="l00259"></a>00259 <span class="keywordtype">void</span> LiquidCrystal_I2C::write4bits ( uint8_t value, uint8_t mode )
<a name="l00260"></a>00260 {
<a name="l00261"></a>00261 uint8_t pinMapValue = 0;
<a name="l00262"></a>00262
<a name="l00263"></a>00263 <span class="comment">// Map the value to LCD pin mapping</span>
<a name="l00264"></a>00264 <span class="comment">// --------------------------------</span>
<a name="l00265"></a>00265 <span class="keywordflow">for</span> ( uint8_t i = 0; i &lt; 4; i++ )
<a name="l00266"></a>00266 {
<a name="l00267"></a>00267 <span class="keywordflow">if</span> ( ( value &amp; 0x1 ) == 1 )
<a name="l00268"></a>00268 {
<a name="l00269"></a>00269 pinMapValue |= _data_pins[i];
<a name="l00270"></a>00270 }
<a name="l00271"></a>00271 value = ( value &gt;&gt; 1 );
<a name="l00272"></a>00272 }
<a name="l00273"></a>00273
<a name="l00274"></a>00274 <span class="comment">// Is it a command or data</span>
<a name="l00275"></a>00275 <span class="comment">// -----------------------</span>
<a name="l00276"></a>00276 <span class="keywordflow">if</span> ( mode == <a class="code" href="_l_c_d_8h.html#aad9ae913bdfab20dd94ad04ee2d5b045">DATA</a> )
<a name="l00277"></a>00277 {
<a name="l00278"></a>00278 mode = _Rs;
<a name="l00279"></a>00279 }
<a name="l00280"></a>00280
<a name="l00281"></a>00281 pinMapValue |= mode | _backlightStsMask;
<a name="l00282"></a>00282 pulseEnable ( pinMapValue );
<a name="l00283"></a>00283 }
<a name="l00284"></a>00284
<a name="l00285"></a>00285 <span class="comment">//</span>
<a name="l00286"></a>00286 <span class="comment">// pulseEnable</span>
<a name="l00287"></a>00287 <span class="keywordtype">void</span> LiquidCrystal_I2C::pulseEnable (uint8_t data)
<a name="l00288"></a>00288 {
<a name="l00289"></a>00289 _i2cio.<a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a> (data | _En); <span class="comment">// En HIGH</span>
<a name="l00290"></a>00290 _i2cio.<a class="code" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a> (data &amp; ~_En); <span class="comment">// En LOW</span>
<a name="l00291"></a>00291 }
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,97 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_I2C.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> </div>
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_I2C.h File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &lt;Print.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_i2_c_i_o_8h_source.html">I2CIO.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_l_c_d_8h_source.html">LCD.h</a>&quot;</code><br/>
</div>
<p><a href="_liquid_crystal___i2_c_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___i2_c.html">LiquidCrystal_I2C</a></td></tr>
</table>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,172 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_I2C.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_I2C.h</div> </div>
</div>
<div class="contents">
<a href="_liquid_crystal___i2_c_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created by Francisco Malpartida on 20/08/11.</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2011 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no </span>
<a name="l00007"></a>00007 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// Thread Safe: No</span>
<a name="l00010"></a>00010 <span class="comment">// Extendable: Yes</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// @file LiquidCrystal_I2C.h</span>
<a name="l00013"></a>00013 <span class="comment">// This file implements a basic liquid crystal library that comes as standard</span>
<a name="l00014"></a>00014 <span class="comment">// in the Arduino SDK but using an I2C IO extension board.</span>
<a name="l00015"></a>00015 <span class="comment">// </span>
<a name="l00016"></a>00016 <span class="comment">// @brief </span>
<a name="l00017"></a>00017 <span class="comment">// This is a basic implementation of the LiquidCrystal library of the</span>
<a name="l00018"></a>00018 <span class="comment">// Arduino SDK. The original library has been reworked in such a way that </span>
<a name="l00019"></a>00019 <span class="comment">// this class implements the all methods to command an LCD based</span>
<a name="l00020"></a>00020 <span class="comment">// on the Hitachi HD44780 and compatible chipsets using I2C extension</span>
<a name="l00021"></a>00021 <span class="comment">// backpacks such as the I2CLCDextraIO with the PCF8574* I2C IO Expander ASIC.</span>
<a name="l00022"></a>00022 <span class="comment">//</span>
<a name="l00023"></a>00023 <span class="comment">// The functionality provided by this class and its base class is identical</span>
<a name="l00024"></a>00024 <span class="comment">// to the original functionality of the Arduino LiquidCrystal library.</span>
<a name="l00025"></a>00025 <span class="comment">//</span>
<a name="l00026"></a>00026 <span class="comment">//</span>
<a name="l00027"></a>00027 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
<a name="l00028"></a>00028 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00029"></a>00029 <span class="preprocessor">#ifndef LiquidCrystal_I2C_h</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define LiquidCrystal_I2C_h</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;Print.h&gt;</span>
<a name="l00033"></a>00033
<a name="l00034"></a>00034 <span class="preprocessor">#include &quot;<a class="code" href="_i2_c_i_o_8h.html">I2CIO.h</a>&quot;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &quot;<a class="code" href="_l_c_d_8h.html">LCD.h</a>&quot;</span>
<a name="l00036"></a>00036
<a name="l00037"></a>00037
<a name="l00038"></a><a class="code" href="class_liquid_crystal___i2_c.html">00038</a> <span class="keyword">class </span><a class="code" href="class_liquid_crystal___i2_c.html">LiquidCrystal_I2C</a> : <span class="keyword">public</span> <a class="code" href="class_l_c_d.html">LCD</a>
<a name="l00039"></a>00039 {
<a name="l00040"></a>00040 <span class="keyword">public</span>:
<a name="l00041"></a>00041
<a name="l00051"></a>00051 <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C</a> (uint8_t lcd_Addr);
<a name="l00052"></a>00052 <span class="comment">// Constructor with backlight control</span>
<a name="l00053"></a>00053 <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C</a> (uint8_t lcd_Addr, uint8_t backlighPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol);
<a name="l00054"></a>00054
<a name="l00067"></a>00067 <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C</a>( uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs);
<a name="l00068"></a>00068 <span class="comment">// Constructor with backlight control</span>
<a name="l00069"></a>00069 <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C</a>(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs,
<a name="l00070"></a>00070 uint8_t backlighPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol);
<a name="l00071"></a>00071
<a name="l00088"></a>00088 <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C</a>(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs,
<a name="l00089"></a>00089 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7 );
<a name="l00090"></a>00090 <span class="comment">// Constructor with backlight control</span>
<a name="l00091"></a>00091 <a class="code" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C</a>(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs,
<a name="l00092"></a>00092 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
<a name="l00093"></a>00093 uint8_t backlighPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol);
<a name="l00110"></a>00110 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___i2_c.html#aeee2ada537f0cfbfda8613324b57c4a6">begin</a>(uint8_t cols, uint8_t rows, uint8_t charsize = <a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">LCD_5x8DOTS</a>);
<a name="l00111"></a>00111
<a name="l00124"></a>00124 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___i2_c.html#a8bf1fab7efe13e8b17b96c42d1f810b4">send</a>(uint8_t value, uint8_t mode);
<a name="l00125"></a>00125
<a name="l00134"></a>00134 <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___i2_c.html#a2eaf86f62d1f169b3763b03fbf88f70b">setBacklightPin</a> ( uint8_t value, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol );
<a name="l00135"></a>00135
<a name="l00145"></a>00145 <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___i2_c.html#af11b8fa0082616e2b6e6e4238589d8a8">setBacklight</a> ( uint8_t value );
<a name="l00146"></a>00146
<a name="l00147"></a>00147 <span class="keyword">private</span>:
<a name="l00148"></a>00148
<a name="l00154"></a>00154 <span class="keywordtype">int</span> init();
<a name="l00155"></a>00155
<a name="l00171"></a>00171 <span class="keywordtype">void</span> config (uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs,
<a name="l00172"></a>00172 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7 );
<a name="l00173"></a>00173
<a name="l00182"></a>00182 <span class="keywordtype">void</span> write4bits(uint8_t value, uint8_t mode);
<a name="l00183"></a>00183
<a name="l00190"></a>00190 <span class="keywordtype">void</span> pulseEnable(uint8_t);
<a name="l00191"></a>00191
<a name="l00192"></a>00192
<a name="l00193"></a>00193 uint8_t _Addr; <span class="comment">// I2C Address of the IO expander</span>
<a name="l00194"></a>00194 uint8_t _backlightPinMask; <span class="comment">// Backlight IO pin mask</span>
<a name="l00195"></a>00195 uint8_t _backlightStsMask; <span class="comment">// Backlight status mask</span>
<a name="l00196"></a>00196 <a class="code" href="class_i2_c_i_o.html">I2CIO</a> _i2cio; <span class="comment">// I2CIO PCF8574* expansion module driver I2CLCDextraIO</span>
<a name="l00197"></a>00197 uint8_t _En; <span class="comment">// LCD expander word for enable pin</span>
<a name="l00198"></a>00198 uint8_t _Rw; <span class="comment">// LCD expander word for R/W pin</span>
<a name="l00199"></a>00199 uint8_t _Rs; <span class="comment">// LCD expander word for Register Select pin</span>
<a name="l00200"></a>00200 uint8_t _data_pins[4]; <span class="comment">// LCD data lines</span>
<a name="l00201"></a>00201
<a name="l00202"></a>00202 };
<a name="l00203"></a>00203
<a name="l00204"></a>00204 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,89 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR2W.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR2W.cpp File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="_liquid_crystal___s_r2_w_8h_source.html">LiquidCrystal_SR2W.h</a>&quot;</code><br/>
</div>
<p><a href="_liquid_crystal___s_r2_w_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
</table>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,219 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR2W.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR2W.cpp</div> </div>
</div>
<div class="contents">
<a href="_liquid_crystal___s_r2_w_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created/Adapted by Bill Perry 2012-03-16</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2012 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no </span>
<a name="l00007"></a>00007 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// Thread Safe: No</span>
<a name="l00010"></a>00010 <span class="comment">// Extendable: Yes</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// @file LiquidCrystal_SR2W.cpp</span>
<a name="l00013"></a>00013 <span class="comment">// Connects a hd44780 LCD using 2 pins from the Arduino, via an 8-bit </span>
<a name="l00014"></a>00014 <span class="comment">// ShiftRegister (SR2W from now on).</span>
<a name="l00015"></a>00015 <span class="comment">// </span>
<a name="l00016"></a>00016 <span class="comment">// @brief </span>
<a name="l00017"></a>00017 <span class="comment">// This is a port of the ShiftRegLCD library from raron and ported to the</span>
<a name="l00018"></a>00018 <span class="comment">// LCD library.</span>
<a name="l00019"></a>00019 <span class="comment">//</span>
<a name="l00020"></a>00020 <span class="comment">//</span>
<a name="l00021"></a>00021 <span class="comment">// See the corresponding SR2W header file for full details.</span>
<a name="l00022"></a>00022 <span class="comment">//</span>
<a name="l00023"></a>00023 <span class="comment">// History</span>
<a name="l00024"></a>00024 <span class="comment">// 2012.03.29 bperrybap - Fixed incorrect use of 5x10 for default font </span>
<a name="l00025"></a>00025 <span class="comment">// (now matches original LQ library)</span>
<a name="l00026"></a>00026 <span class="comment">// Fixed typo in SR2W mask define names</span>
<a name="l00027"></a>00027 <span class="comment">// changed default backlight state to on</span>
<a name="l00028"></a>00028 <span class="comment">// 2012.03.16 bperrybap - created/modified from SR sources to create SR2W</span>
<a name="l00029"></a>00029 <span class="comment">// @author B. Perry - bperrybap@opensource.billsworld.billandterrie.com</span>
<a name="l00030"></a>00030 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00031"></a>00031
<a name="l00032"></a>00032 <span class="preprocessor">#include &quot;<a class="code" href="_liquid_crystal___s_r2_w_8h.html">LiquidCrystal_SR2W.h</a>&quot;</span>
<a name="l00033"></a>00033
<a name="l00034"></a>00034 <span class="comment">// CONSTRUCTORS</span>
<a name="l00035"></a>00035 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00036"></a>00036 <span class="comment">// Assuming 1 line 8 pixel high font</span>
<a name="l00037"></a><a class="code" href="class_liquid_crystal___s_r2_w.html#af307fdf5c8feb757e965074dcdeb1dd3">00037</a> <a class="code" href="class_liquid_crystal___s_r2_w.html#af307fdf5c8feb757e965074dcdeb1dd3">LiquidCrystal_SR2W::LiquidCrystal_SR2W</a> (uint8_t srdata, uint8_t srclock, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> blpol)
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039 init ( srdata, srclock, blpol, 1, 0 );
<a name="l00040"></a>00040 }
<a name="l00041"></a>00041
<a name="l00042"></a>00042
<a name="l00043"></a>00043 <span class="comment">// PRIVATE METHODS</span>
<a name="l00044"></a>00044 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00045"></a>00045
<a name="l00046"></a>00046 <span class="comment">//</span>
<a name="l00047"></a>00047 <span class="comment">// init</span>
<a name="l00048"></a>00048 <span class="keywordtype">void</span> LiquidCrystal_SR2W::init(uint8_t srdata, uint8_t srclock, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> blpol, uint8_t lines, uint8_t font)
<a name="l00049"></a>00049 {
<a name="l00050"></a>00050 _srDataRegister = <a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(srdata);
<a name="l00051"></a>00051 _srDataMask = <a class="code" href="_fast_i_o_8cpp.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a>(srdata);
<a name="l00052"></a>00052 _srClockRegister = <a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(srclock);
<a name="l00053"></a>00053 _srClockMask = <a class="code" href="_fast_i_o_8cpp.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a>(srclock);
<a name="l00054"></a>00054
<a name="l00055"></a>00055 _blPolarity = blpol;
<a name="l00056"></a>00056
<a name="l00057"></a>00057 <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> = <a class="code" href="_l_c_d_8h.html#ab8c35d355d2372090c7a347e961c9224">LCD_4BITMODE</a> | <a class="code" href="_l_c_d_8h.html#a8c85cf88d8af66a47c42249d81c94641">LCD_1LINE</a> | <a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">LCD_5x8DOTS</a>;
<a name="l00058"></a>00058
<a name="l00059"></a>00059 <a class="code" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a>(); <span class="comment">// set default backlight state to on</span>
<a name="l00060"></a>00060 }
<a name="l00061"></a>00061
<a name="l00062"></a>00062 <span class="comment">//</span>
<a name="l00063"></a>00063 <span class="comment">// loadSR</span>
<a name="l00064"></a>00064 <span class="keywordtype">void</span> LiquidCrystal_SR2W::loadSR(uint8_t val)
<a name="l00065"></a>00065 {
<a name="l00066"></a>00066 <span class="comment">// Clear to keep Enable LOW while clocking in new bits</span>
<a name="l00067"></a>00067 <a class="code" href="_fast_i_o_8cpp.html#a56c72b9f00680662229895ab22aaa743">fio_shiftOut</a>(_srDataRegister, _srDataMask, _srClockRegister, _srClockMask);
<a name="l00068"></a>00068
<a name="l00069"></a>00069
<a name="l00070"></a>00070 <span class="comment">// clock out SR data byte</span>
<a name="l00071"></a>00071 <a class="code" href="_fast_i_o_8cpp.html#a56c72b9f00680662229895ab22aaa743">fio_shiftOut</a>(_srDataRegister, _srDataMask, _srClockRegister, _srClockMask, val, MSBFIRST);
<a name="l00072"></a>00072
<a name="l00073"></a>00073
<a name="l00074"></a>00074 <span class="comment">// strobe LCD enable which can now be toggled by the data line</span>
<a name="l00075"></a>00075 <a class="code" href="_fast_i_o_8h.html#a04971fe5fabe4129736708c494e08e6d">ATOMIC_BLOCK</a>(<a class="code" href="_fast_i_o_8h.html#a362c18b15a09703e42e1c246c47420ef">ATOMIC_RESTORESTATE</a>)
<a name="l00076"></a>00076 {
<a name="l00077"></a>00077 <a class="code" href="_fast_i_o_8h.html#a89e1c62276052100c62b6c82a2e95622">fio_digitalWrite_HIGH</a>(_srDataRegister, _srDataMask);
<a name="l00078"></a>00078 <a class="code" href="_l_c_d_8h.html#a6eac41e4be58d7736ac0c19de225c0dc">waitUsec</a> (1); <span class="comment">// enable pulse must be &gt;450ns </span>
<a name="l00079"></a>00079 <a class="code" href="_fast_i_o_8h.html#accae9687fdfc5f3492fb6344d62eb190">fio_digitalWrite_SWITCHTO</a>(_srDataRegister, _srDataMask, LOW);
<a name="l00080"></a>00080 } <span class="comment">// end critical section</span>
<a name="l00081"></a>00081 }
<a name="l00082"></a>00082
<a name="l00083"></a>00083 <span class="comment">// PUBLIC METHODS</span>
<a name="l00084"></a>00084 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00085"></a>00085
<a name="l00086"></a>00086
<a name="l00087"></a>00087 <span class="comment">/************ low level data pushing commands **********/</span>
<a name="l00088"></a>00088 <span class="comment">//</span>
<a name="l00089"></a>00089 <span class="comment">// send</span>
<a name="l00090"></a><a class="code" href="class_liquid_crystal___s_r2_w.html#a65dc6f261c319be8e56f3c1f6a5c877d">00090</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r2_w.html#a65dc6f261c319be8e56f3c1f6a5c877d">LiquidCrystal_SR2W::send</a>(uint8_t value, uint8_t mode)
<a name="l00091"></a>00091 {
<a name="l00092"></a>00092 uint8_t myMode = ( mode == <a class="code" href="_l_c_d_8h.html#aad9ae913bdfab20dd94ad04ee2d5b045">DATA</a> ) ? <a class="code" href="_liquid_crystal___s_r2_w_8h.html#acce98b026d9fdcb2e126705c14af7500">SR2W_RS_MASK</a> : 0;
<a name="l00093"></a>00093
<a name="l00094"></a>00094 myMode = myMode | <a class="code" href="_liquid_crystal___s_r2_w_8h.html#a8d17b6abb5bcde6883dbdc86d34be9d8">SR2W_EN_MASK</a> | _blMask;
<a name="l00095"></a>00095
<a name="l00096"></a>00096 <span class="keywordflow">if</span> ( mode != <a class="code" href="_l_c_d_8h.html#aa1e30e32b6c2cf8d90a9281328472dbe">FOUR_BITS</a> )
<a name="l00097"></a>00097 {
<a name="l00098"></a>00098 loadSR(myMode | ((value &gt;&gt; 1) &amp; <a class="code" href="_liquid_crystal___s_r2_w_8h.html#a7cf86f2a173473d01e02b2ac786a8690">SR2W_DATA_MASK</a>)); <span class="comment">// upper nibble</span>
<a name="l00099"></a>00099 }
<a name="l00100"></a>00100
<a name="l00101"></a>00101 loadSR(myMode | ((value &lt;&lt; 3) &amp; <a class="code" href="_liquid_crystal___s_r2_w_8h.html#a7cf86f2a173473d01e02b2ac786a8690">SR2W_DATA_MASK</a>)); <span class="comment">// lower nibble</span>
<a name="l00102"></a>00102
<a name="l00103"></a>00103 <span class="comment">/*</span>
<a name="l00104"></a>00104 <span class="comment"> * Don&#39;t call waitUsec()</span>
<a name="l00105"></a>00105 <span class="comment"> * do our own delay optmization since this code is so fast it needs some added delay</span>
<a name="l00106"></a>00106 <span class="comment"> * even on slower AVRs.</span>
<a name="l00107"></a>00107 <span class="comment"> */</span>
<a name="l00108"></a>00108 <span class="preprocessor">#if (F_CPU &lt;= 16000000)</span>
<a name="l00109"></a>00109 <span class="preprocessor"></span> delayMicroseconds ( 10 ); <span class="comment">// commands &amp; data writes need &gt; 37us to complete</span>
<a name="l00110"></a>00110 <span class="preprocessor">#else</span>
<a name="l00111"></a>00111 <span class="preprocessor"></span> delayMicroseconds ( 37 ); <span class="comment">// commands &amp; data writes need &gt; 37us to complete</span>
<a name="l00112"></a>00112 <span class="preprocessor">#endif</span>
<a name="l00113"></a>00113 <span class="preprocessor"></span>}
<a name="l00114"></a>00114
<a name="l00115"></a>00115 <span class="comment">//</span>
<a name="l00116"></a>00116 <span class="comment">// setBacklight</span>
<a name="l00117"></a><a class="code" href="class_liquid_crystal___s_r2_w.html#a2158db27287c1564a03e7a1472beb3b6">00117</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r2_w.html#a2158db27287c1564a03e7a1472beb3b6">LiquidCrystal_SR2W::setBacklight</a> ( uint8_t value )
<a name="l00118"></a>00118 {
<a name="l00119"></a>00119 <span class="comment">// Check for polarity to configure mask accordingly</span>
<a name="l00120"></a>00120 <span class="comment">// ----------------------------------------------------------</span>
<a name="l00121"></a>00121 <span class="keywordflow">if</span> ( ((_blPolarity == <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a>) &amp;&amp; (value &gt; 0)) ||
<a name="l00122"></a>00122 ((_blPolarity == <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca62d66a51fa7574c652597716f7709865">NEGATIVE</a> ) &amp;&amp; ( value == 0 )) )
<a name="l00123"></a>00123 {
<a name="l00124"></a>00124 _blMask = <a class="code" href="_liquid_crystal___s_r2_w_8h.html#a53e3add69865ae57ca872cb41fcae9e3">SR2W_BL_MASK</a>;
<a name="l00125"></a>00125 }
<a name="l00126"></a>00126 <span class="keywordflow">else</span>
<a name="l00127"></a>00127 {
<a name="l00128"></a>00128 _blMask = 0;
<a name="l00129"></a>00129 }
<a name="l00130"></a>00130
<a name="l00131"></a>00131 <span class="comment">// send dummy data of blMask to set BL pin</span>
<a name="l00132"></a>00132 <span class="comment">// Note: loadSR() will strobe the data line trying to pulse EN</span>
<a name="l00133"></a>00133 <span class="comment">// but E will not strobe because the EN output bit is not set.</span>
<a name="l00134"></a>00134 loadSR(_blMask);
<a name="l00135"></a>00135 }
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,164 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR2W.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Defines</a> </div>
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR2W.h File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_l_c_d_8h_source.html">LCD.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>&quot;</code><br/>
</div>
<p><a href="_liquid_crystal___s_r2_w_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r2_w.html">LiquidCrystal_SR2W</a></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r2_w_8h.html#a53e3add69865ae57ca872cb41fcae9e3">SR2W_BL_MASK</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r2_w_8h.html#a7cf86f2a173473d01e02b2ac786a8690">SR2W_DATA_MASK</a>&#160;&#160;&#160;0x78</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r2_w_8h.html#a8d17b6abb5bcde6883dbdc86d34be9d8">SR2W_EN_MASK</a>&#160;&#160;&#160;0x80</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r2_w_8h.html#acce98b026d9fdcb2e126705c14af7500">SR2W_RS_MASK</a>&#160;&#160;&#160;0x04</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a53e3add69865ae57ca872cb41fcae9e3"></a><!-- doxytag: member="LiquidCrystal_SR2W.h::SR2W_BL_MASK" ref="a53e3add69865ae57ca872cb41fcae9e3" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SR2W_BL_MASK&#160;&#160;&#160;0x02</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r2_w_8h_source.html#l00132">132</a> of file <a class="el" href="_liquid_crystal___s_r2_w_8h_source.html">LiquidCrystal_SR2W.h</a>.</p>
</div>
</div>
<a class="anchor" id="a7cf86f2a173473d01e02b2ac786a8690"></a><!-- doxytag: member="LiquidCrystal_SR2W.h::SR2W_DATA_MASK" ref="a7cf86f2a173473d01e02b2ac786a8690" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SR2W_DATA_MASK&#160;&#160;&#160;0x78</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r2_w_8h_source.html#l00134">134</a> of file <a class="el" href="_liquid_crystal___s_r2_w_8h_source.html">LiquidCrystal_SR2W.h</a>.</p>
</div>
</div>
<a class="anchor" id="a8d17b6abb5bcde6883dbdc86d34be9d8"></a><!-- doxytag: member="LiquidCrystal_SR2W.h::SR2W_EN_MASK" ref="a8d17b6abb5bcde6883dbdc86d34be9d8" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SR2W_EN_MASK&#160;&#160;&#160;0x80</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r2_w_8h_source.html#l00135">135</a> of file <a class="el" href="_liquid_crystal___s_r2_w_8h_source.html">LiquidCrystal_SR2W.h</a>.</p>
</div>
</div>
<a class="anchor" id="acce98b026d9fdcb2e126705c14af7500"></a><!-- doxytag: member="LiquidCrystal_SR2W.h::SR2W_RS_MASK" ref="acce98b026d9fdcb2e126705c14af7500" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SR2W_RS_MASK&#160;&#160;&#160;0x04</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r2_w_8h_source.html#l00133">133</a> of file <a class="el" href="_liquid_crystal___s_r2_w_8h_source.html">LiquidCrystal_SR2W.h</a>.</p>
</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,245 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR2W.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR2W.h</div> </div>
</div>
<div class="contents">
<a href="_liquid_crystal___s_r2_w_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created/Adapted by Bill Perry 2012-03-16</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2012 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no </span>
<a name="l00007"></a>00007 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// @file LiquidCrystal_SR2W.h</span>
<a name="l00010"></a>00010 <span class="comment">// Connects a hd44780 LCD using 2 pins from the Arduino, via an 8-bit </span>
<a name="l00011"></a>00011 <span class="comment">// ShiftRegister (SR2W from now on).</span>
<a name="l00012"></a>00012 <span class="comment">// </span>
<a name="l00013"></a>00013 <span class="comment">// @brief </span>
<a name="l00014"></a>00014 <span class="comment">// This is the 2 wire shift register interface class for the LCD library</span>
<a name="l00015"></a>00015 <span class="comment">//</span>
<a name="l00016"></a>00016 <span class="comment">// The functionality provided by this class and its base class is a superset of</span>
<a name="l00017"></a>00017 <span class="comment">// the original functionality of the Arduino LiquidCrystal library and can</span>
<a name="l00018"></a>00018 <span class="comment">// be used as such.</span>
<a name="l00019"></a>00019 <span class="comment">// See the LCD class for a full description of the API functions available.</span>
<a name="l00020"></a>00020 <span class="comment">//</span>
<a name="l00021"></a>00021 <span class="comment">// It works with a 8-bit unlatched, no-tristate, unidirectional SIPO (Serial-In-Parallel-Out)</span>
<a name="l00022"></a>00022 <span class="comment">// shift register (IE a very simple SR), and an hd44780 LCD in 4-bit mode.</span>
<a name="l00023"></a>00023 <span class="comment">// Any such shift register should do (pref. 74LS family IC&#39;s for 2-wire).</span>
<a name="l00024"></a>00024 <span class="comment">// 74LS164 and 74HC595 have been exstensively tested.</span>
<a name="l00025"></a>00025 <span class="comment">//</span>
<a name="l00026"></a>00026 <span class="comment">//</span>
<a name="l00027"></a>00027 <span class="comment">// 2 Pins required from the Arduino:</span>
<a name="l00028"></a>00028 <span class="comment">// - Data/Enable</span>
<a name="l00029"></a>00029 <span class="comment">// - Clock</span>
<a name="l00030"></a>00030 <span class="comment">// The Data pin is also used to control the enable signal</span>
<a name="l00031"></a>00031 <span class="comment">// LCD RW-pin hardwired to LOW (only writing to LCD).</span>
<a name="l00032"></a>00032 <span class="comment">// Busy Flag (BF, data bit D7) is not read.</span>
<a name="l00033"></a>00033 <span class="comment">//</span>
<a name="l00034"></a>00034 <span class="comment">// Original project homepage: http://code.google.com/p/arduinoshiftreglcd/</span>
<a name="l00035"></a>00035 <span class="comment">//</span>
<a name="l00036"></a>00036 <span class="comment">// Shift register bits</span>
<a name="l00037"></a>00037 <span class="comment">// Bit #0 - (cannot be used on 74HC595)</span>
<a name="l00038"></a>00038 <span class="comment">// Bit #1 - optional backlight control</span>
<a name="l00039"></a>00039 <span class="comment">// Bit #2 - connects to RS (Register Select) on the LCD</span>
<a name="l00040"></a>00040 <span class="comment">// Bit #3 - connects to LCD data inputs D4</span>
<a name="l00041"></a>00041 <span class="comment">// Bit #4 - connects to LCD data inputs D5</span>
<a name="l00042"></a>00042 <span class="comment">// Bit #5 - connects to LCD data inputs D6</span>
<a name="l00043"></a>00043 <span class="comment">// Bit #6 - connects to LCD data inputs D7</span>
<a name="l00044"></a>00044 <span class="comment">// Bit #7 - enables the LCD enable-puls (via the diode-resistor AND &quot;gate&quot;)</span>
<a name="l00045"></a>00045 <span class="comment">// </span>
<a name="l00046"></a>00046 <span class="comment">// Wiring for a 74LS164</span>
<a name="l00047"></a>00047 <span class="comment">// ---------------------</span>
<a name="l00048"></a>00048 <span class="comment">// 1k/4.7k</span>
<a name="l00049"></a>00049 <span class="comment">// +--------[ Resistor ]--------+---(LCD Enable)</span>
<a name="l00050"></a>00050 <span class="comment">// | |</span>
<a name="l00051"></a>00051 <span class="comment">// | 74LS164 (VCC) |</span>
<a name="l00052"></a>00052 <span class="comment">// | +----u----+ | _V_ diode</span>
<a name="l00053"></a>00053 <span class="comment">// (data pin)---+---+--1-|A VCC|-14-+ |</span>
<a name="l00054"></a>00054 <span class="comment">// | | | |</span>
<a name="l00055"></a>00055 <span class="comment">// +--2-|B Q7|-13------+</span>
<a name="l00056"></a>00056 <span class="comment">// 3-|Q0 Q6|-12--(LCD D7)</span>
<a name="l00057"></a>00057 <span class="comment">// (BL Circuit)--------4-|Q1 Q5|-11--(LCD D6)</span>
<a name="l00058"></a>00058 <span class="comment">// (LCD RS)------------5-|Q2 Q4|-10--(LCD D5)</span>
<a name="l00059"></a>00059 <span class="comment">// (LCD D4)------------6-|Q3 /MR|--9--(VCC)</span>
<a name="l00060"></a>00060 <span class="comment">// +-7-|GND CP|--8--(clock pin)</span>
<a name="l00061"></a>00061 <span class="comment">// | +---------+ </span>
<a name="l00062"></a>00062 <span class="comment">// | 0.1uf</span>
<a name="l00063"></a>00063 <span class="comment">// (gnd)-----||----(vcc)</span>
<a name="l00064"></a>00064 <span class="comment">// </span>
<a name="l00065"></a>00065 <span class="comment">// Wiring for a 74HC595</span>
<a name="l00066"></a>00066 <span class="comment">// --------------------</span>
<a name="l00067"></a>00067 <span class="comment">// NOTE: the 74HC595 is a latching shift register. In order to get it to operate</span>
<a name="l00068"></a>00068 <span class="comment">// in a &quot;non latching&quot; mode, RCLK and SCLK are tied together. The side effect of this</span>
<a name="l00069"></a>00069 <span class="comment">// is that the latched output is one clock behind behind the internal shift register bits.</span>
<a name="l00070"></a>00070 <span class="comment">// To compensate for this the wiring is offset by one bit position lower.</span>
<a name="l00071"></a>00071 <span class="comment">// For example, while the backlight is hooked to Q0 it is still using bit 1 of</span>
<a name="l00072"></a>00072 <span class="comment">// of the shift register because the outputs are 1 clock behind the real internal shift</span>
<a name="l00073"></a>00073 <span class="comment">// register.</span>
<a name="l00074"></a>00074 <span class="comment">// </span>
<a name="l00075"></a>00075 <span class="comment">// 74HC595 (VCC)</span>
<a name="l00076"></a>00076 <span class="comment">// +----u----+ | +-----------------------(BL circuit)</span>
<a name="l00077"></a>00077 <span class="comment">// (LCD RS)------------1-|Q1 VCC|-16-+ | +--------------------(data pin)</span>
<a name="l00078"></a>00078 <span class="comment">// (LCD D4)------------2-|Q2 Q0|-15----+ | 1k/4.7k</span>
<a name="l00079"></a>00079 <span class="comment">// (LCD D5)------------3-|Q3 SER|-14-------+---[ Resistor ]--+--(LCD Enable)</span>
<a name="l00080"></a>00080 <span class="comment">// (LCD D6)------------4-|Q4 /OE|-13--(gnd) |</span>
<a name="l00081"></a>00081 <span class="comment">// (LCD D7)------------5-|Q5 RCLK|-12-------+ |</span>
<a name="l00082"></a>00082 <span class="comment">// | | | |</span>
<a name="l00083"></a>00083 <span class="comment">// +------6-|Q6 SCLK|-11-------+--(clock pin) |</span>
<a name="l00084"></a>00084 <span class="comment">// | 7-|Q7 /MR|-10--(VCC) |</span>
<a name="l00085"></a>00085 <span class="comment">// | +-8-|GND Q6&#39;|--9 |</span>
<a name="l00086"></a>00086 <span class="comment">// | | +---------+ diode _V_</span>
<a name="l00087"></a>00087 <span class="comment">// | | 0.1uf |</span>
<a name="l00088"></a>00088 <span class="comment">// | (gnd)-----||----(vcc) |</span>
<a name="l00089"></a>00089 <span class="comment">// +-----------------------------------------------+</span>
<a name="l00090"></a>00090 <span class="comment">// </span>
<a name="l00091"></a>00091 <span class="comment">//</span>
<a name="l00092"></a>00092 <span class="comment">// Backlight Control circuit</span>
<a name="l00093"></a>00093 <span class="comment">// -------------------------</span>
<a name="l00094"></a>00094 <span class="comment">// Because the shift resiter is not latching the outputs, the backlight circuitry</span>
<a name="l00095"></a>00095 <span class="comment">// will &quot;see&quot; the output bits as they are shifted into the shift register which</span>
<a name="l00096"></a>00096 <span class="comment">// can cause the backlight to flicker rather than remain constantly on/off.</span>
<a name="l00097"></a>00097 <span class="comment">// The circuit below slows down the transitions to the transistor to remove</span>
<a name="l00098"></a>00098 <span class="comment">// the visible flicker. When the BL input is HIGH the LCD backlight will turn on.</span>
<a name="l00099"></a>00099 <span class="comment">//</span>
<a name="l00100"></a>00100 <span class="comment">// (value depends on LCD, 100ohm is usually safe)</span>
<a name="l00101"></a>00101 <span class="comment">// (LCD BL anode)---[ resistor ]---(vcc)</span>
<a name="l00102"></a>00102 <span class="comment">//</span>
<a name="l00103"></a>00103 <span class="comment">// (LCD BL cathode)-------------------------------+</span>
<a name="l00104"></a>00104 <span class="comment">// |</span>
<a name="l00105"></a>00105 <span class="comment">// D</span>
<a name="l00106"></a>00106 <span class="comment">// |</span>
<a name="l00107"></a>00107 <span class="comment">// (BL input)----[ 4.7k Resistor ]----+-------G-|-&lt; (2N7000 FET)</span>
<a name="l00108"></a>00108 <span class="comment">// | |</span>
<a name="l00109"></a>00109 <span class="comment">// (0.1uf) = S</span>
<a name="l00110"></a>00110 <span class="comment">// | |</span>
<a name="l00111"></a>00111 <span class="comment">// (gnd) (gnd)</span>
<a name="l00112"></a>00112 <span class="comment">// </span>
<a name="l00113"></a>00113 <span class="comment">// </span>
<a name="l00114"></a>00114 <span class="comment">// </span>
<a name="l00115"></a>00115 <span class="comment">//</span>
<a name="l00116"></a>00116 <span class="comment">// History</span>
<a name="l00117"></a>00117 <span class="comment">// 2012.03.16 bperrybap - creation/adaption from SR header to create SR2W header.</span>
<a name="l00118"></a>00118 <span class="comment">// Fixed typo in SR2W mask define names</span>
<a name="l00119"></a>00119 <span class="comment">// @author B. Perry - bperrybap@opensource.billsworld.billandterrie.com</span>
<a name="l00120"></a>00120 <span class="comment">// --------------------------------------------------------------------------------</span>
<a name="l00121"></a>00121 <span class="preprocessor">#ifndef _LIQUIDCRYSTAL_SR2W_</span>
<a name="l00122"></a>00122 <span class="preprocessor"></span><span class="preprocessor">#define _LIQUIDCRYSTAL_SR2W_</span>
<a name="l00123"></a>00123 <span class="preprocessor"></span>
<a name="l00124"></a>00124 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00125"></a>00125 <span class="preprocessor">#include &quot;<a class="code" href="_l_c_d_8h.html">LCD.h</a>&quot;</span>
<a name="l00126"></a>00126 <span class="preprocessor">#include &quot;<a class="code" href="_fast_i_o_8h.html">FastIO.h</a>&quot;</span>
<a name="l00127"></a>00127
<a name="l00128"></a>00128
<a name="l00129"></a>00129 <span class="comment">// two-wire SR output bit constants</span>
<a name="l00130"></a>00130 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00131"></a>00131
<a name="l00132"></a><a class="code" href="_liquid_crystal___s_r2_w_8h.html#a53e3add69865ae57ca872cb41fcae9e3">00132</a> <span class="preprocessor">#define SR2W_BL_MASK 0x02</span>
<a name="l00133"></a><a class="code" href="_liquid_crystal___s_r2_w_8h.html#acce98b026d9fdcb2e126705c14af7500">00133</a> <span class="preprocessor"></span><span class="preprocessor">#define SR2W_RS_MASK 0x04</span>
<a name="l00134"></a><a class="code" href="_liquid_crystal___s_r2_w_8h.html#a7cf86f2a173473d01e02b2ac786a8690">00134</a> <span class="preprocessor"></span><span class="preprocessor">#define SR2W_DATA_MASK 0x78 // data bits are hard coded to be SR bits 6,5,4,3</span>
<a name="l00135"></a><a class="code" href="_liquid_crystal___s_r2_w_8h.html#a8d17b6abb5bcde6883dbdc86d34be9d8">00135</a> <span class="preprocessor"></span><span class="preprocessor">#define SR2W_EN_MASK 0x80 // cannot ever be changed</span>
<a name="l00136"></a>00136 <span class="preprocessor"></span>
<a name="l00137"></a><a class="code" href="class_liquid_crystal___s_r2_w.html">00137</a> <span class="keyword">class </span><a class="code" href="class_liquid_crystal___s_r2_w.html">LiquidCrystal_SR2W</a> : <span class="keyword">public</span> <a class="code" href="class_l_c_d.html">LCD</a>
<a name="l00138"></a>00138 {
<a name="l00139"></a>00139 <span class="keyword">public</span>:
<a name="l00151"></a>00151 <a class="code" href="class_liquid_crystal___s_r2_w.html#af307fdf5c8feb757e965074dcdeb1dd3">LiquidCrystal_SR2W</a> (uint8_t srdata, uint8_t srclock, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> blpol = <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a>);
<a name="l00152"></a>00152
<a name="l00165"></a>00165 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r2_w.html#a65dc6f261c319be8e56f3c1f6a5c877d">send</a>(uint8_t value, uint8_t mode);
<a name="l00166"></a>00166
<a name="l00167"></a>00167
<a name="l00177"></a>00177 <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r2_w.html#a2158db27287c1564a03e7a1472beb3b6">setBacklight</a> ( uint8_t mode );
<a name="l00178"></a>00178
<a name="l00179"></a>00179 <span class="keyword">private</span>:
<a name="l00180"></a>00180
<a name="l00186"></a>00186 <span class="keywordtype">void</span> init ( uint8_t srdata, uint8_t srclock, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> blpol, uint8_t lines, uint8_t font );
<a name="l00187"></a>00187
<a name="l00192"></a>00192 <span class="keywordtype">void</span> loadSR (uint8_t val);
<a name="l00193"></a>00193
<a name="l00194"></a>00194 <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> _srDataRegister; <span class="comment">// Serial Data pin</span>
<a name="l00195"></a>00195 <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> _srDataMask;
<a name="l00196"></a>00196 <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> _srClockRegister; <span class="comment">// Clock Pin</span>
<a name="l00197"></a>00197 <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> _srClockMask;
<a name="l00198"></a>00198
<a name="l00199"></a>00199 uint8_t _blPolarity;
<a name="l00200"></a>00200 uint8_t _blMask;
<a name="l00201"></a>00201 };
<a name="l00202"></a>00202 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,249 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR3W.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Defines</a> </div>
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR3W.cpp File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &lt;WProgram.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_liquid_crystal___s_r3_w_8h_source.html">LiquidCrystal_SR3W.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>&quot;</code><br/>
</div>
<p><a href="_liquid_crystal___s_r3_w_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r3_w_8cpp.html#a3d9bb178282c3cb69740c94ba1e48fed">D4</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r3_w_8cpp.html#a2ddd4183d444d6d128cbdbd6269e4e0c">D5</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r3_w_8cpp.html#a79a18a7f5ccf7a7ca31f302bd62527a6">D6</a>&#160;&#160;&#160;2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r3_w_8cpp.html#a2ba78f059a7ebebc95e7beef690e88d6">D7</a>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r3_w_8cpp.html#a22e6626f2c98ed902f8ded47f6438c05">EN</a>&#160;&#160;&#160;4</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r3_w_8cpp.html#ac059d24dfe9c1e1f7c07cb7869a1833b">LCD_BACKLIGHT</a>&#160;&#160;&#160;0xFF</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r3_w_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>&#160;&#160;&#160;0x00</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r3_w_8cpp.html#af8903d8eea3868940c60af887473b152">RS</a>&#160;&#160;&#160;6</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r3_w_8cpp.html#afc4ded33ac0ca43defcce639e965748a">RW</a>&#160;&#160;&#160;5</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a3d9bb178282c3cb69740c94ba1e48fed"></a><!-- doxytag: member="LiquidCrystal_SR3W.cpp::D4" ref="a3d9bb178282c3cb69740c94ba1e48fed" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define D4&#160;&#160;&#160;0</td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="class_l_c_d.html">LCD</a> dataline allocation this library only supports 4 bit <a class="el" href="class_l_c_d.html">LCD</a> control mode. D4, D5, D6, D7 <a class="el" href="class_l_c_d.html">LCD</a> data lines pin mapping of the extender module </p>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html#l00126">126</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a2ddd4183d444d6d128cbdbd6269e4e0c"></a><!-- doxytag: member="LiquidCrystal_SR3W.cpp::D5" ref="a2ddd4183d444d6d128cbdbd6269e4e0c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define D5&#160;&#160;&#160;1</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html#l00127">127</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a79a18a7f5ccf7a7ca31f302bd62527a6"></a><!-- doxytag: member="LiquidCrystal_SR3W.cpp::D6" ref="a79a18a7f5ccf7a7ca31f302bd62527a6" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define D6&#160;&#160;&#160;2</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html#l00128">128</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a2ba78f059a7ebebc95e7beef690e88d6"></a><!-- doxytag: member="LiquidCrystal_SR3W.cpp::D7" ref="a2ba78f059a7ebebc95e7beef690e88d6" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define D7&#160;&#160;&#160;3</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html#l00129">129</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a22e6626f2c98ed902f8ded47f6438c05"></a><!-- doxytag: member="LiquidCrystal_SR3W.cpp::EN" ref="a22e6626f2c98ed902f8ded47f6438c05" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define EN&#160;&#160;&#160;4</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Enable bit of the <a class="el" href="class_l_c_d.html">LCD</a> Defines the IO of the expander connected to the LCD's Enable </p>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html#l00104">104</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ac059d24dfe9c1e1f7c07cb7869a1833b"></a><!-- doxytag: member="LiquidCrystal_SR3W.cpp::LCD_BACKLIGHT" ref="ac059d24dfe9c1e1f7c07cb7869a1833b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_BACKLIGHT&#160;&#160;&#160;0xFF</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>LCD_BACKLIGHT BACKLIGHT MASK used when backlight is on </p>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html#l00093">93</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a65fa786d6e31fe8b1aa51784a9736581"></a><!-- doxytag: member="LiquidCrystal_SR3W.cpp::LCD_NOBACKLIGHT" ref="a65fa786d6e31fe8b1aa51784a9736581" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define LCD_NOBACKLIGHT&#160;&#160;&#160;0x00</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>LCD_NOBACKLIGHT No BACKLIGHT MASK </p>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html#l00086">86</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="af8903d8eea3868940c60af887473b152"></a><!-- doxytag: member="LiquidCrystal_SR3W.cpp::RS" ref="af8903d8eea3868940c60af887473b152" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define RS&#160;&#160;&#160;6</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Register bit of the <a class="el" href="class_l_c_d.html">LCD</a> Defines the IO of the expander connected to the LCD's Register select pin </p>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html#l00118">118</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="afc4ded33ac0ca43defcce639e965748a"></a><!-- doxytag: member="LiquidCrystal_SR3W.cpp::RW" ref="afc4ded33ac0ca43defcce639e965748a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define RW&#160;&#160;&#160;5</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Read/Write bit of the <a class="el" href="class_l_c_d.html">LCD</a> Defines the IO of the expander connected to the LCD's Rw pin </p>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html#l00111">111</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a>.</p>
</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,336 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR3W.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR3W.cpp</div> </div>
</div>
<div class="contents">
<a href="_liquid_crystal___s_r3_w_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created by Francisco Malpartida on 7.3.2012.</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2011 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no </span>
<a name="l00007"></a>00007 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// Thread Safe: No</span>
<a name="l00010"></a>00010 <span class="comment">// Extendable: Yes</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// @file LiquidCrystal_SRG.h</span>
<a name="l00013"></a>00013 <span class="comment">// This file implements a basic liquid crystal library that comes as standard</span>
<a name="l00014"></a>00014 <span class="comment">// in the Arduino SDK but using a generic SHIFT REGISTER extension board.</span>
<a name="l00015"></a>00015 <span class="comment">// </span>
<a name="l00016"></a>00016 <span class="comment">// @brief </span>
<a name="l00017"></a>00017 <span class="comment">// This is a basic implementation of the LiquidCrystal library of the</span>
<a name="l00018"></a>00018 <span class="comment">// Arduino SDK. The original library has been reworked in such a way that </span>
<a name="l00019"></a>00019 <span class="comment">// this class implements the all methods to command an LCD based</span>
<a name="l00020"></a>00020 <span class="comment">// on the Hitachi HD44780 and compatible chipsets using a 3 wire latching</span>
<a name="l00021"></a>00021 <span class="comment">// shift register. While it has been tested with a 74HC595N shift register</span>
<a name="l00022"></a>00022 <span class="comment">// it should also work with other latching shift registers such as the MC14094</span>
<a name="l00023"></a>00023 <span class="comment">// and the HEF4094</span>
<a name="l00024"></a>00024 <span class="comment">//</span>
<a name="l00025"></a>00025 <span class="comment">// This particular driver has been created as generic as possible to enable</span>
<a name="l00026"></a>00026 <span class="comment">// users to configure and connect their LCDs using just 3 digital IOs from the</span>
<a name="l00027"></a>00027 <span class="comment">// AVR or Arduino, and connect the LCD to the outputs of the shiftregister</span>
<a name="l00028"></a>00028 <span class="comment">// in any configuration. The library is configured by passing the IO pins</span>
<a name="l00029"></a>00029 <span class="comment">// that control the strobe, data and clock of the shift register and a map</span>
<a name="l00030"></a>00030 <span class="comment">// of how the shiftregister is connected to the LCD.</span>
<a name="l00031"></a>00031 <span class="comment">// </span>
<a name="l00032"></a>00032 <span class="comment">//</span>
<a name="l00033"></a>00033 <span class="comment">// +--------------------------------------------+</span>
<a name="l00034"></a>00034 <span class="comment">// | MCU |</span>
<a name="l00035"></a>00035 <span class="comment">// | IO1 IO2 IO3 |</span>
<a name="l00036"></a>00036 <span class="comment">// +----+-------------+-------------+-----------+</span>
<a name="l00037"></a>00037 <span class="comment">// | | |</span>
<a name="l00038"></a>00038 <span class="comment">// | | |</span>
<a name="l00039"></a>00039 <span class="comment">// +----+-------------+-------------+-----------+</span>
<a name="l00040"></a>00040 <span class="comment">// | Strobe Data Clock |</span>
<a name="l00041"></a>00041 <span class="comment">// | 8-bit shift/latch register | 74HC595N</span>
<a name="l00042"></a>00042 <span class="comment">// | Qa0 Qb1 Qc2 Qd3 Qe4 Qf5 Qg6 Qh7 |</span>
<a name="l00043"></a>00043 <span class="comment">// +----+----+----+----+----+----+----+----+----+</span>
<a name="l00044"></a>00044 <span class="comment">// | | | | | | | </span>
<a name="l00045"></a>00045 <span class="comment">// |11 |12 |13 |14 |6 |5 |4 (LCD pins)</span>
<a name="l00046"></a>00046 <span class="comment">// +----+----+----+----+----+----+----+----+----+</span>
<a name="l00047"></a>00047 <span class="comment">// | DB4 DB5 DB6 DB7 E Rw RS |</span>
<a name="l00048"></a>00048 <span class="comment">// | LCD Module |</span>
<a name="l00049"></a>00049 <span class="comment">//</span>
<a name="l00050"></a>00050 <span class="comment">// NOTE: Rw is not used by the driver so it can be connected to GND.</span>
<a name="l00051"></a>00051 <span class="comment">//</span>
<a name="l00052"></a>00052 <span class="comment">// The functionality provided by this class and its base class is identical</span>
<a name="l00053"></a>00053 <span class="comment">// to the original functionality of the Arduino LiquidCrystal library.</span>
<a name="l00054"></a>00054 <span class="comment">//</span>
<a name="l00055"></a>00055 <span class="comment">//</span>
<a name="l00056"></a>00056 <span class="comment">// History</span>
<a name="l00057"></a>00057 <span class="comment">// 2012.03.29 bperrybap - fixed constructors not properly using Rs</span>
<a name="l00058"></a>00058 <span class="comment">// Fixed incorrect use of 5x10 for default font </span>
<a name="l00059"></a>00059 <span class="comment">// - now matches original LQ library.</span>
<a name="l00060"></a>00060 <span class="comment">// moved delay to send() so it is per cmd/write vs shiftout()</span>
<a name="l00061"></a>00061 <span class="comment">// NOTE: delay is on hairy edge of working when FAST_MODE is on.</span>
<a name="l00062"></a>00062 <span class="comment">// because of waitUsec().</span>
<a name="l00063"></a>00063 <span class="comment">// There is margin at 16Mhz AVR but might fail on 20Mhz AVRs.</span>
<a name="l00064"></a>00064 <span class="comment">// </span>
<a name="l00065"></a>00065 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
<a name="l00066"></a>00066 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00067"></a>00067 <span class="comment">// flags for backlight control</span>
<a name="l00068"></a>00068 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00069"></a>00069 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00070"></a>00070 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00071"></a>00071
<a name="l00072"></a>00072 <span class="preprocessor">#if (ARDUINO &lt; 100)</span>
<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#include &lt;WProgram.h&gt;</span>
<a name="l00074"></a>00074 <span class="preprocessor">#else</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Arduino.h&gt;</span>
<a name="l00076"></a>00076 <span class="preprocessor">#endif</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="_liquid_crystal___s_r3_w_8h.html">LiquidCrystal_SR3W.h</a>&quot;</span>
<a name="l00078"></a>00078
<a name="l00079"></a>00079 <span class="preprocessor">#include &quot;<a class="code" href="_fast_i_o_8h.html">FastIO.h</a>&quot;</span>
<a name="l00080"></a>00080
<a name="l00086"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">00086</a> <span class="preprocessor">#define LCD_NOBACKLIGHT 0x00</span>
<a name="l00087"></a>00087 <span class="preprocessor"></span>
<a name="l00093"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#ac059d24dfe9c1e1f7c07cb7869a1833b">00093</a> <span class="preprocessor">#define LCD_BACKLIGHT 0xFF</span>
<a name="l00094"></a>00094 <span class="preprocessor"></span>
<a name="l00095"></a>00095
<a name="l00096"></a>00096 <span class="comment">// Default library configuration parameters used by class constructor with</span>
<a name="l00097"></a>00097 <span class="comment">// only the I2C address field.</span>
<a name="l00098"></a>00098 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00104"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a22e6626f2c98ed902f8ded47f6438c05">00104</a> <span class="comment"></span><span class="preprocessor">#define EN 4 // Enable bit</span>
<a name="l00105"></a>00105 <span class="preprocessor"></span>
<a name="l00111"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#afc4ded33ac0ca43defcce639e965748a">00111</a> <span class="preprocessor">#define RW 5 // Read/Write bit</span>
<a name="l00112"></a>00112 <span class="preprocessor"></span>
<a name="l00118"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#af8903d8eea3868940c60af887473b152">00118</a> <span class="preprocessor">#define RS 6 // Register select bit</span>
<a name="l00119"></a>00119 <span class="preprocessor"></span>
<a name="l00126"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a3d9bb178282c3cb69740c94ba1e48fed">00126</a> <span class="preprocessor">#define D4 0</span>
<a name="l00127"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a2ddd4183d444d6d128cbdbd6269e4e0c">00127</a> <span class="preprocessor"></span><span class="preprocessor">#define D5 1</span>
<a name="l00128"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a79a18a7f5ccf7a7ca31f302bd62527a6">00128</a> <span class="preprocessor"></span><span class="preprocessor">#define D6 2</span>
<a name="l00129"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a2ba78f059a7ebebc95e7beef690e88d6">00129</a> <span class="preprocessor"></span><span class="preprocessor">#define D7 3</span>
<a name="l00130"></a>00130 <span class="preprocessor"></span>
<a name="l00131"></a>00131
<a name="l00132"></a>00132
<a name="l00133"></a><a class="code" href="class_liquid_crystal___s_r3_w.html#ae1396bcd5e9c5b7ed13182c166de776b">00133</a> <a class="code" href="class_liquid_crystal___s_r3_w.html#ae1396bcd5e9c5b7ed13182c166de776b">LiquidCrystal_SR3W::LiquidCrystal_SR3W</a>(uint8_t data, uint8_t clk, uint8_t strobe)
<a name="l00134"></a>00134 {
<a name="l00135"></a>00135 init( data, clk, strobe, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#af8903d8eea3868940c60af887473b152">RS</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#afc4ded33ac0ca43defcce639e965748a">RW</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a22e6626f2c98ed902f8ded47f6438c05">EN</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a3d9bb178282c3cb69740c94ba1e48fed">D4</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a2ddd4183d444d6d128cbdbd6269e4e0c">D5</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a79a18a7f5ccf7a7ca31f302bd62527a6">D6</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a2ba78f059a7ebebc95e7beef690e88d6">D7</a> );
<a name="l00136"></a>00136 }
<a name="l00137"></a>00137
<a name="l00138"></a><a class="code" href="class_liquid_crystal___s_r3_w.html#a7b2f382b76bc9d88adb8d681e824b4de">00138</a> <a class="code" href="class_liquid_crystal___s_r3_w.html#ae1396bcd5e9c5b7ed13182c166de776b">LiquidCrystal_SR3W::LiquidCrystal_SR3W</a>(uint8_t data, uint8_t clk, uint8_t strobe,
<a name="l00139"></a>00139 uint8_t backlighPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)
<a name="l00140"></a>00140 {
<a name="l00141"></a>00141 init( data, clk, strobe, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#af8903d8eea3868940c60af887473b152">RS</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#afc4ded33ac0ca43defcce639e965748a">RW</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a22e6626f2c98ed902f8ded47f6438c05">EN</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a3d9bb178282c3cb69740c94ba1e48fed">D4</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a2ddd4183d444d6d128cbdbd6269e4e0c">D5</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a79a18a7f5ccf7a7ca31f302bd62527a6">D6</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a2ba78f059a7ebebc95e7beef690e88d6">D7</a> );
<a name="l00142"></a>00142 <a class="code" href="class_liquid_crystal___s_r3_w.html#a894d0ea8ea61c1d15acd8a26d417e477">setBacklightPin</a>(backlighPin, pol);
<a name="l00143"></a>00143 }
<a name="l00144"></a>00144
<a name="l00145"></a><a class="code" href="class_liquid_crystal___s_r3_w.html#a4fab8ff2f21bba3efd133cd8c87fffc0">00145</a> <a class="code" href="class_liquid_crystal___s_r3_w.html#ae1396bcd5e9c5b7ed13182c166de776b">LiquidCrystal_SR3W::LiquidCrystal_SR3W</a>(uint8_t data, uint8_t clk, uint8_t strobe,
<a name="l00146"></a>00146 uint8_t En, uint8_t Rw, uint8_t Rs,
<a name="l00147"></a>00147 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7 )
<a name="l00148"></a>00148 {
<a name="l00149"></a>00149 init( data, clk, strobe, Rs, Rw, En, d4, d5, d6, d7 );
<a name="l00150"></a>00150 }
<a name="l00151"></a>00151
<a name="l00152"></a><a class="code" href="class_liquid_crystal___s_r3_w.html#a24f051747dfeda48f7b207c3358c8015">00152</a> <a class="code" href="class_liquid_crystal___s_r3_w.html#ae1396bcd5e9c5b7ed13182c166de776b">LiquidCrystal_SR3W::LiquidCrystal_SR3W</a>(uint8_t data, uint8_t clk, uint8_t strobe,
<a name="l00153"></a>00153 uint8_t En, uint8_t Rw, uint8_t Rs,
<a name="l00154"></a>00154 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
<a name="l00155"></a>00155 uint8_t backlighPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)
<a name="l00156"></a>00156 {
<a name="l00157"></a>00157 init( data, clk, strobe, Rs, Rw, En, d4, d5, d6, d7 );
<a name="l00158"></a>00158 <a class="code" href="class_liquid_crystal___s_r3_w.html#a894d0ea8ea61c1d15acd8a26d417e477">setBacklightPin</a>(backlighPin, pol);
<a name="l00159"></a>00159 }
<a name="l00160"></a>00160
<a name="l00161"></a>00161
<a name="l00162"></a><a class="code" href="class_liquid_crystal___s_r3_w.html#ade34af5b7fe795482f1848c2176d6e56">00162</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r3_w.html#ade34af5b7fe795482f1848c2176d6e56">LiquidCrystal_SR3W::send</a>(uint8_t value, uint8_t mode)
<a name="l00163"></a>00163 {
<a name="l00164"></a>00164
<a name="l00165"></a>00165 <span class="keywordflow">if</span> ( mode != <a class="code" href="_l_c_d_8h.html#aa1e30e32b6c2cf8d90a9281328472dbe">FOUR_BITS</a> )
<a name="l00166"></a>00166 {
<a name="l00167"></a>00167 write4bits( (value &gt;&gt; 4), mode ); <span class="comment">// upper nibble</span>
<a name="l00168"></a>00168 }
<a name="l00169"></a>00169 write4bits( (value &amp; 0x0F), mode); <span class="comment">// lower nibble</span>
<a name="l00170"></a>00170
<a name="l00171"></a>00171
<a name="l00172"></a>00172 <span class="preprocessor">#if (F_CPU &lt;= 16000000)</span>
<a name="l00173"></a>00173 <span class="preprocessor"></span> <span class="comment">// No need to use the delay routines on AVR since the time taken to write</span>
<a name="l00174"></a>00174 <span class="comment">// on AVR with SR pin mapping even with fio is longer than LCD command execution.</span>
<a name="l00175"></a>00175 <a class="code" href="_l_c_d_8h.html#a6eac41e4be58d7736ac0c19de225c0dc">waitUsec</a>(37); <span class="comment">//goes away on AVRs</span>
<a name="l00176"></a>00176 <span class="preprocessor">#else</span>
<a name="l00177"></a>00177 <span class="preprocessor"></span> delayMicroseconds ( 37 ); <span class="comment">// commands &amp; data writes need &gt; 37us to complete</span>
<a name="l00178"></a>00178 <span class="preprocessor">#endif</span>
<a name="l00179"></a>00179 <span class="preprocessor"></span>
<a name="l00180"></a>00180 }
<a name="l00181"></a>00181
<a name="l00182"></a>00182
<a name="l00183"></a><a class="code" href="class_liquid_crystal___s_r3_w.html#a894d0ea8ea61c1d15acd8a26d417e477">00183</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r3_w.html#a894d0ea8ea61c1d15acd8a26d417e477">LiquidCrystal_SR3W::setBacklightPin</a> ( uint8_t value, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol = <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a> )
<a name="l00184"></a>00184 {
<a name="l00185"></a>00185 _backlightPinMask = ( 1 &lt;&lt; value );
<a name="l00186"></a>00186 _backlightStsMask = <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
<a name="l00187"></a>00187 <a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> = pol;
<a name="l00188"></a>00188 <a class="code" href="class_liquid_crystal___s_r3_w.html#a6d0fc7907ef9fd87c408a21b9bd49295">setBacklight</a> (<a class="code" href="_l_c_d_8h.html#a0f50ae3b4bdb42dd5ad74b2c604a7515">BACKLIGHT_OFF</a>); <span class="comment">// Set backlight to off as initial setup</span>
<a name="l00189"></a>00189 }
<a name="l00190"></a>00190
<a name="l00191"></a><a class="code" href="class_liquid_crystal___s_r3_w.html#a6d0fc7907ef9fd87c408a21b9bd49295">00191</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r3_w.html#a6d0fc7907ef9fd87c408a21b9bd49295">LiquidCrystal_SR3W::setBacklight</a> ( uint8_t value )
<a name="l00192"></a>00192 {
<a name="l00193"></a>00193 <span class="comment">// Check if backlight is available</span>
<a name="l00194"></a>00194 <span class="comment">// ----------------------------------------------------</span>
<a name="l00195"></a>00195 <span class="keywordflow">if</span> ( _backlightPinMask != 0x0 )
<a name="l00196"></a>00196 {
<a name="l00197"></a>00197 <span class="comment">// Check for polarity to configure mask accordingly</span>
<a name="l00198"></a>00198 <span class="comment">// ----------------------------------------------------------</span>
<a name="l00199"></a>00199 <span class="keywordflow">if</span> (((<a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> == <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a>) &amp;&amp; (value &gt; 0)) ||
<a name="l00200"></a>00200 ((<a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> == <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca62d66a51fa7574c652597716f7709865">NEGATIVE</a> ) &amp;&amp; ( value == 0 )))
<a name="l00201"></a>00201 {
<a name="l00202"></a>00202 _backlightStsMask = _backlightPinMask &amp; <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#ac059d24dfe9c1e1f7c07cb7869a1833b">LCD_BACKLIGHT</a>;
<a name="l00203"></a>00203 }
<a name="l00204"></a>00204 <span class="keywordflow">else</span>
<a name="l00205"></a>00205 {
<a name="l00206"></a>00206 _backlightStsMask = _backlightPinMask &amp; <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
<a name="l00207"></a>00207 }
<a name="l00208"></a>00208 loadSR( _backlightStsMask );
<a name="l00209"></a>00209 }
<a name="l00210"></a>00210 }
<a name="l00211"></a>00211
<a name="l00212"></a>00212
<a name="l00213"></a>00213 <span class="comment">// PRIVATE METHODS</span>
<a name="l00214"></a>00214 <span class="comment">// -----------------------------------------------------------------------------</span>
<a name="l00215"></a>00215
<a name="l00216"></a>00216 <span class="keywordtype">int</span> LiquidCrystal_SR3W::init(uint8_t data, uint8_t clk, uint8_t strobe,
<a name="l00217"></a>00217 uint8_t Rs, uint8_t Rw, uint8_t En,
<a name="l00218"></a>00218 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
<a name="l00219"></a>00219 {
<a name="l00220"></a>00220 _data = <a class="code" href="_fast_i_o_8cpp.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a>(data);
<a name="l00221"></a>00221 _clk = <a class="code" href="_fast_i_o_8cpp.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a>(clk);
<a name="l00222"></a>00222 _strobe = <a class="code" href="_fast_i_o_8cpp.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a>(strobe);
<a name="l00223"></a>00223 _data_reg = <a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(data);
<a name="l00224"></a>00224 _clk_reg = <a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(clk);
<a name="l00225"></a>00225 _strobe_reg = <a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(strobe);
<a name="l00226"></a>00226
<a name="l00227"></a>00227 <span class="comment">// LCD pin mapping</span>
<a name="l00228"></a>00228 _backlightPinMask = 0;
<a name="l00229"></a>00229 _backlightStsMask = <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
<a name="l00230"></a>00230 <a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> = <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a>;
<a name="l00231"></a>00231
<a name="l00232"></a>00232 _En = ( 1 &lt;&lt; En );
<a name="l00233"></a>00233 _Rw = ( 1 &lt;&lt; Rw );
<a name="l00234"></a>00234 _Rs = ( 1 &lt;&lt; Rs );
<a name="l00235"></a>00235
<a name="l00236"></a>00236 <span class="comment">// Initialise pin mapping</span>
<a name="l00237"></a>00237 _data_pins[0] = ( 1 &lt;&lt; d4 );
<a name="l00238"></a>00238 _data_pins[1] = ( 1 &lt;&lt; d5 );
<a name="l00239"></a>00239 _data_pins[2] = ( 1 &lt;&lt; d6 );
<a name="l00240"></a>00240 _data_pins[3] = ( 1 &lt;&lt; d7 );
<a name="l00241"></a>00241
<a name="l00242"></a>00242 <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> = <a class="code" href="_l_c_d_8h.html#ab8c35d355d2372090c7a347e961c9224">LCD_4BITMODE</a> | <a class="code" href="_l_c_d_8h.html#a8c85cf88d8af66a47c42249d81c94641">LCD_1LINE</a> | <a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">LCD_5x8DOTS</a>;
<a name="l00243"></a>00243
<a name="l00244"></a>00244 <span class="keywordflow">return</span> (1);
<a name="l00245"></a>00245 }
<a name="l00246"></a>00246
<a name="l00247"></a>00247 <span class="keywordtype">void</span> LiquidCrystal_SR3W::write4bits(uint8_t value, uint8_t mode)
<a name="l00248"></a>00248 {
<a name="l00249"></a>00249 uint8_t pinMapValue = 0;
<a name="l00250"></a>00250
<a name="l00251"></a>00251 <span class="comment">// Map the value to LCD pin mapping</span>
<a name="l00252"></a>00252 <span class="comment">// --------------------------------</span>
<a name="l00253"></a>00253 <span class="keywordflow">for</span> ( uint8_t i = 0; i &lt; 4; i++ )
<a name="l00254"></a>00254 {
<a name="l00255"></a>00255 <span class="keywordflow">if</span> ( ( value &amp; 0x1 ) == 1 )
<a name="l00256"></a>00256 {
<a name="l00257"></a>00257 pinMapValue |= _data_pins[i];
<a name="l00258"></a>00258 }
<a name="l00259"></a>00259 value = ( value &gt;&gt; 1 );
<a name="l00260"></a>00260 }
<a name="l00261"></a>00261
<a name="l00262"></a>00262 <span class="comment">// Is it a command or data</span>
<a name="l00263"></a>00263 <span class="comment">// -----------------------</span>
<a name="l00264"></a>00264 mode = ( mode == <a class="code" href="_l_c_d_8h.html#aad9ae913bdfab20dd94ad04ee2d5b045">DATA</a> ) ? _Rs : 0;
<a name="l00265"></a>00265
<a name="l00266"></a>00266 pinMapValue |= mode | _backlightStsMask;
<a name="l00267"></a>00267 loadSR ( pinMapValue | _En ); <span class="comment">// Send with enable high</span>
<a name="l00268"></a>00268 loadSR ( pinMapValue); <span class="comment">// Send with enable low</span>
<a name="l00269"></a>00269 }
<a name="l00270"></a>00270
<a name="l00271"></a>00271
<a name="l00272"></a>00272 <span class="keywordtype">void</span> LiquidCrystal_SR3W::loadSR(uint8_t value)
<a name="l00273"></a>00273 {
<a name="l00274"></a>00274 <span class="comment">// Load the shift register with information</span>
<a name="l00275"></a>00275 <a class="code" href="_fast_i_o_8cpp.html#a56c72b9f00680662229895ab22aaa743">fio_shiftOut</a>(_data_reg, _data, _clk_reg, _clk, value, MSBFIRST);
<a name="l00276"></a>00276
<a name="l00277"></a>00277 <span class="comment">// Strobe the data into the latch</span>
<a name="l00278"></a>00278 <a class="code" href="_fast_i_o_8h.html#a04971fe5fabe4129736708c494e08e6d">ATOMIC_BLOCK</a>(<a class="code" href="_fast_i_o_8h.html#a362c18b15a09703e42e1c246c47420ef">ATOMIC_RESTORESTATE</a>)
<a name="l00279"></a>00279 {
<a name="l00280"></a>00280 <a class="code" href="_fast_i_o_8h.html#a89e1c62276052100c62b6c82a2e95622">fio_digitalWrite_HIGH</a>(_strobe_reg, _strobe);
<a name="l00281"></a>00281 <a class="code" href="_fast_i_o_8h.html#accae9687fdfc5f3492fb6344d62eb190">fio_digitalWrite_SWITCHTO</a>(_strobe_reg, _strobe, LOW);
<a name="l00282"></a>00282 }
<a name="l00283"></a>00283 }
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,96 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR3W.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> </div>
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR3W.h File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_l_c_d_8h_source.html">LCD.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>&quot;</code><br/>
</div>
<p><a href="_liquid_crystal___s_r3_w_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r3_w.html">LiquidCrystal_SR3W</a></td></tr>
</table>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,201 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR3W.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR3W.h</div> </div>
</div>
<div class="contents">
<a href="_liquid_crystal___s_r3_w_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created by Francisco Malpartida on 7.3.2012.</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2011 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no </span>
<a name="l00007"></a>00007 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// Thread Safe: No</span>
<a name="l00010"></a>00010 <span class="comment">// Extendable: Yes</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// @file LiquidCrystal_SR3W.h</span>
<a name="l00013"></a>00013 <span class="comment">// This file implements a basic liquid crystal library that comes as standard</span>
<a name="l00014"></a>00014 <span class="comment">// in the Arduino SDK but using a generic SHIFT REGISTER extension board.</span>
<a name="l00015"></a>00015 <span class="comment">// </span>
<a name="l00016"></a>00016 <span class="comment">// @brief </span>
<a name="l00017"></a>00017 <span class="comment">// This is a basic implementation of the LiquidCrystal library of the</span>
<a name="l00018"></a>00018 <span class="comment">// Arduino SDK. The original library has been reworked in such a way that </span>
<a name="l00019"></a>00019 <span class="comment">// this class implements the all methods to command an LCD based</span>
<a name="l00020"></a>00020 <span class="comment">// on the Hitachi HD44780 and compatible chipsets using a 3 wire latching</span>
<a name="l00021"></a>00021 <span class="comment">// shift register. While it has been tested with a 74HC595N shift register</span>
<a name="l00022"></a>00022 <span class="comment">// it should also work with other latching shift registers such as the MC14094</span>
<a name="l00023"></a>00023 <span class="comment">// and the HEF4094</span>
<a name="l00024"></a>00024 <span class="comment">//</span>
<a name="l00025"></a>00025 <span class="comment">// This particular driver has been created as generic as possible to enable</span>
<a name="l00026"></a>00026 <span class="comment">// users to configure and connect their LCDs using just 3 digital IOs from the</span>
<a name="l00027"></a>00027 <span class="comment">// AVR or Arduino, and connect the LCD to the outputs of the shiftregister</span>
<a name="l00028"></a>00028 <span class="comment">// in any configuration. The library is configured by passing the IO pins</span>
<a name="l00029"></a>00029 <span class="comment">// that control the strobe, data and clock of the shift register and a map</span>
<a name="l00030"></a>00030 <span class="comment">// of how the shiftregister is connected to the LCD.</span>
<a name="l00031"></a>00031 <span class="comment">// </span>
<a name="l00032"></a>00032 <span class="comment">//</span>
<a name="l00033"></a>00033 <span class="comment">// +--------------------------------------------+</span>
<a name="l00034"></a>00034 <span class="comment">// | MCU |</span>
<a name="l00035"></a>00035 <span class="comment">// | IO1 IO2 IO3 |</span>
<a name="l00036"></a>00036 <span class="comment">// +----+-------------+-------------+-----------+</span>
<a name="l00037"></a>00037 <span class="comment">// | | |</span>
<a name="l00038"></a>00038 <span class="comment">// | | |</span>
<a name="l00039"></a>00039 <span class="comment">// +----+-------------+-------------+-----------+</span>
<a name="l00040"></a>00040 <span class="comment">// | Strobe Data Clock |</span>
<a name="l00041"></a>00041 <span class="comment">// | 8-bit shift/latch register | 74HC595N</span>
<a name="l00042"></a>00042 <span class="comment">// | Qa0 Qb1 Qc2 Qd3 Qe4 Qf5 Qg6 Qh7 |</span>
<a name="l00043"></a>00043 <span class="comment">// +----+----+----+----+----+----+----+----+----+</span>
<a name="l00044"></a>00044 <span class="comment">// | | | | | | | </span>
<a name="l00045"></a>00045 <span class="comment">// |11 |12 |13 |14 |6 |5 |4 (LCD pins)</span>
<a name="l00046"></a>00046 <span class="comment">// +----+----+----+----+----+----+----+----+----+</span>
<a name="l00047"></a>00047 <span class="comment">// | DB4 DB5 DB6 DB7 E Rw RS |</span>
<a name="l00048"></a>00048 <span class="comment">// | LCD Module |</span>
<a name="l00049"></a>00049 <span class="comment">//</span>
<a name="l00050"></a>00050 <span class="comment">// NOTE: Rw is not used by the driver so it can be connected to GND.</span>
<a name="l00051"></a>00051 <span class="comment">//</span>
<a name="l00052"></a>00052 <span class="comment">// The functionality provided by this class and its base class is identical</span>
<a name="l00053"></a>00053 <span class="comment">// to the original functionality of the Arduino LiquidCrystal library.</span>
<a name="l00054"></a>00054 <span class="comment">//</span>
<a name="l00055"></a>00055 <span class="comment">//</span>
<a name="l00056"></a>00056 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
<a name="l00057"></a>00057 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00058"></a>00058 <span class="preprocessor">#ifndef _LIQUIDCRYSTAL_SR3W_H_</span>
<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#define _LIQUIDCRYSTAL_SR3W_H_</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span>
<a name="l00061"></a>00061 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00062"></a>00062 <span class="preprocessor">#include &quot;<a class="code" href="_l_c_d_8h.html">LCD.h</a>&quot;</span>
<a name="l00063"></a>00063 <span class="preprocessor">#include &quot;<a class="code" href="_fast_i_o_8h.html">FastIO.h</a>&quot;</span>
<a name="l00064"></a>00064
<a name="l00065"></a>00065
<a name="l00066"></a><a class="code" href="class_liquid_crystal___s_r3_w.html">00066</a> <span class="keyword">class </span><a class="code" href="class_liquid_crystal___s_r3_w.html">LiquidCrystal_SR3W</a> : <span class="keyword">public</span> <a class="code" href="class_l_c_d.html">LCD</a>
<a name="l00067"></a>00067 {
<a name="l00068"></a>00068 <span class="keyword">public</span>:
<a name="l00069"></a>00069
<a name="l00090"></a>00090 <a class="code" href="class_liquid_crystal___s_r3_w.html#ae1396bcd5e9c5b7ed13182c166de776b">LiquidCrystal_SR3W</a>(uint8_t data, uint8_t clk, uint8_t strobe);
<a name="l00091"></a>00091 <span class="comment">// Constructor with backlight control</span>
<a name="l00092"></a>00092 <a class="code" href="class_liquid_crystal___s_r3_w.html#ae1396bcd5e9c5b7ed13182c166de776b">LiquidCrystal_SR3W</a>(uint8_t data, uint8_t clk, uint8_t strobe,
<a name="l00093"></a>00093 uint8_t backlighPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol);
<a name="l00094"></a>00094
<a name="l00112"></a>00112 <a class="code" href="class_liquid_crystal___s_r3_w.html#ae1396bcd5e9c5b7ed13182c166de776b">LiquidCrystal_SR3W</a>(uint8_t data, uint8_t clk, uint8_t strobe,
<a name="l00113"></a>00113 uint8_t En, uint8_t Rw, uint8_t Rs,
<a name="l00114"></a>00114 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7 );
<a name="l00115"></a>00115 <span class="comment">// Constructor with backlight control</span>
<a name="l00116"></a>00116 <a class="code" href="class_liquid_crystal___s_r3_w.html#ae1396bcd5e9c5b7ed13182c166de776b">LiquidCrystal_SR3W</a>( uint8_t data, uint8_t clk, uint8_t strobe,
<a name="l00117"></a>00117 uint8_t En, uint8_t Rw, uint8_t Rs,
<a name="l00118"></a>00118 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
<a name="l00119"></a>00119 uint8_t backlighPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol);
<a name="l00120"></a>00120
<a name="l00133"></a>00133 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r3_w.html#ade34af5b7fe795482f1848c2176d6e56">send</a>(uint8_t value, uint8_t mode);
<a name="l00134"></a>00134
<a name="l00143"></a>00143 <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r3_w.html#a894d0ea8ea61c1d15acd8a26d417e477">setBacklightPin</a> ( uint8_t value, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol );
<a name="l00144"></a>00144
<a name="l00154"></a>00154 <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r3_w.html#a6d0fc7907ef9fd87c408a21b9bd49295">setBacklight</a> ( uint8_t value );
<a name="l00155"></a>00155
<a name="l00156"></a>00156 <span class="keyword">private</span>:
<a name="l00157"></a>00157
<a name="l00163"></a>00163 <span class="keywordtype">int</span> init(uint8_t data, uint8_t clk, uint8_t strobe,
<a name="l00164"></a>00164 uint8_t Rs, uint8_t Rw, uint8_t En,
<a name="l00165"></a>00165 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7);
<a name="l00166"></a>00166
<a name="l00175"></a>00175 <span class="keywordtype">void</span> write4bits(uint8_t value, uint8_t mode);
<a name="l00176"></a>00176
<a name="l00183"></a>00183 <span class="keywordtype">void</span> loadSR(uint8_t value);
<a name="l00184"></a>00184
<a name="l00185"></a>00185
<a name="l00186"></a>00186 <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> _strobe; <span class="comment">// shift register strobe pin</span>
<a name="l00187"></a>00187 <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> _strobe_reg; <span class="comment">// SR strobe pin MCU register</span>
<a name="l00188"></a>00188 <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> _data; <span class="comment">// shift register data pin</span>
<a name="l00189"></a>00189 <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> _data_reg; <span class="comment">// SR data pin MCU register</span>
<a name="l00190"></a>00190 <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> _clk; <span class="comment">// shift register clock pin</span>
<a name="l00191"></a>00191 <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> _clk_reg; <span class="comment">// SR clock pin MCU register</span>
<a name="l00192"></a>00192 uint8_t _En; <span class="comment">// LCD expander word for enable pin</span>
<a name="l00193"></a>00193 uint8_t _Rw; <span class="comment">// LCD expander word for R/W pin</span>
<a name="l00194"></a>00194 uint8_t _Rs; <span class="comment">// LCD expander word for Register Select pin</span>
<a name="l00195"></a>00195 uint8_t _data_pins[4]; <span class="comment">// LCD data lines</span>
<a name="l00196"></a>00196 uint8_t _backlightPinMask; <span class="comment">// Backlight IO pin mask</span>
<a name="l00197"></a>00197 uint8_t _backlightStsMask; <span class="comment">// Backlight status mask</span>
<a name="l00198"></a>00198
<a name="l00199"></a>00199 };
<a name="l00200"></a>00200
<a name="l00201"></a>00201 <span class="preprocessor">#endif</span>
<a name="l00202"></a>00202 <span class="preprocessor"></span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,94 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR.cpp File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &lt;WProgram.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_liquid_crystal___s_r_8h_source.html">LiquidCrystal_SR.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>&quot;</code><br/>
</div>
<p><a href="_liquid_crystal___s_r_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
</table>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,293 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR.cpp</div> </div>
</div>
<div class="contents">
<a href="_liquid_crystal___s_r_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created by Francisco Malpartida on 20/08/11.</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2011 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no </span>
<a name="l00007"></a>00007 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// Thread Safe: No</span>
<a name="l00010"></a>00010 <span class="comment">// Extendable: Yes</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// @file LiquidCrystal_SR.h</span>
<a name="l00013"></a>00013 <span class="comment">// Connects an LCD using 2 or 3 pins from the Arduino, via an 8-bit </span>
<a name="l00014"></a>00014 <span class="comment">// ShiftRegister (SR from now on).</span>
<a name="l00015"></a>00015 <span class="comment">// </span>
<a name="l00016"></a>00016 <span class="comment">// @brief </span>
<a name="l00017"></a>00017 <span class="comment">// This is a port of the ShiftRegLCD library from raron and ported to the</span>
<a name="l00018"></a>00018 <span class="comment">// LCD library.</span>
<a name="l00019"></a>00019 <span class="comment">//</span>
<a name="l00020"></a>00020 <span class="comment">// The functionality provided by this class and its base class is identical</span>
<a name="l00021"></a>00021 <span class="comment">// to the original functionality of the Arduino LiquidCrystal library and can</span>
<a name="l00022"></a>00022 <span class="comment">// be used as such.</span>
<a name="l00023"></a>00023 <span class="comment">//</span>
<a name="l00024"></a>00024 <span class="comment">// Modified to work serially with the shiftOut() function, an 8-bit</span>
<a name="l00025"></a>00025 <span class="comment">// unlatched, no-tristate, unidirectional SIPO (Serial-In-Parallel-Out)</span>
<a name="l00026"></a>00026 <span class="comment">// shift register (IE a very simple SR), and an LCD in 4-bit mode.</span>
<a name="l00027"></a>00027 <span class="comment">// Any such shift register should do (pref. 74LS family IC&#39;s for 2-wire).</span>
<a name="l00028"></a>00028 <span class="comment">// I used 74LS164, for the reason that&#39;s what I had at hand.</span>
<a name="l00029"></a>00029 <span class="comment">//</span>
<a name="l00030"></a>00030 <span class="comment">// Connection description:</span>
<a name="l00031"></a>00031 <span class="comment">//</span>
<a name="l00032"></a>00032 <span class="comment">// SR output:</span>
<a name="l00033"></a>00033 <span class="comment">// Bit #0 - N/C - not connected, used to hold a zero</span>
<a name="l00034"></a>00034 <span class="comment">// Bit #1 - N/C</span>
<a name="l00035"></a>00035 <span class="comment">// Bit #2 - connects to RS (Register Select) on the LCD</span>
<a name="l00036"></a>00036 <span class="comment">// Bits #3-6 - connects to LCD data inputs D4 - D7.</span>
<a name="l00037"></a>00037 <span class="comment">// Bit #7 - enables the LCD enable-puls (via the diode-resistor AND &quot;gate&quot;)</span>
<a name="l00038"></a>00038 <span class="comment">//</span>
<a name="l00039"></a>00039 <span class="comment">// 2 or 3 Pins required from the Arduino for Data, Clock and (optional) Enable</span>
<a name="l00040"></a>00040 <span class="comment">// If not using Enable, the Data pin is used for the enable signal by defining</span>
<a name="l00041"></a>00041 <span class="comment">// the same pin for Enable as for Data. Data and Clock outputs/pins goes to</span>
<a name="l00042"></a>00042 <span class="comment">// the shiftregister.</span>
<a name="l00043"></a>00043 <span class="comment">// LCD RW-pin hardwired to LOW (only writing to LCD).</span>
<a name="l00044"></a>00044 <span class="comment">// Busy Flag (BF, data bit D7) is not read.</span>
<a name="l00045"></a>00045 <span class="comment">//</span>
<a name="l00046"></a>00046 <span class="comment">// Original project homepage: http://code.google.com/p/arduinoshiftreglcd/</span>
<a name="l00047"></a>00047 <span class="comment">//</span>
<a name="l00048"></a>00048 <span class="comment">//</span>
<a name="l00049"></a>00049 <span class="comment">// History</span>
<a name="l00050"></a>00050 <span class="comment">// 2012.03.29 bperrybap - Added delays for faster fio shiftout (it got too fast)</span>
<a name="l00051"></a>00051 <span class="comment">// AVR needed delay. cmd/write delays are based on CPU speed so it works on pic32.</span>
<a name="l00052"></a>00052 <span class="comment">// Added code to support indicating two wire mode by using enable=data pin</span>
<a name="l00053"></a>00053 <span class="comment">// (documentation indicated this as working)</span>
<a name="l00054"></a>00054 <span class="comment">// Fixed incorrect use of 5x10 for default font - now matches original LQ library.</span>
<a name="l00055"></a>00055 <span class="comment">// can now eliminate enable pin in constructor for two wire mode.</span>
<a name="l00056"></a>00056 <span class="comment">// 2012.01.16 Florian Fida - faster digitalWrite/shiftOut</span>
<a name="l00057"></a>00057 <span class="comment">// 2011.10.29 fmalpartida - adaption of the library to the LCD class hierarchy.</span>
<a name="l00058"></a>00058 <span class="comment">// 2011.07.02 Fixed a minor flaw in setCursor function. No functional change, </span>
<a name="l00059"></a>00059 <span class="comment">// just a bit more memory efficient.</span>
<a name="l00060"></a>00060 <span class="comment">// Thanks to CapnBry (from google code and github) who noticed it.</span>
<a name="l00061"></a>00061 <span class="comment">// URL to his version of shiftregLCD:</span>
<a name="l00062"></a>00062 <span class="comment">// https://github.com/CapnBry/HeaterMeter/commit/c6beba1b46b092ab0b33bcbd0a30a201fd1f28c1</span>
<a name="l00063"></a>00063 <span class="comment">// 2009.07.30 raron - minor corrections to the comments.</span>
<a name="l00064"></a>00064 <span class="comment">// Fixed timing to datasheet safe. Fixed keyword highlights.</span>
<a name="l00065"></a>00065 <span class="comment">// 2009.07.28 Mircho / raron - a new modification to the schematics, and a</span>
<a name="l00066"></a>00066 <span class="comment">// more streamlined interface</span>
<a name="l00067"></a>00067 <span class="comment">// 2009.07.27 Thanks to an excellent suggestion from mircho at the Arduino</span>
<a name="l00068"></a>00068 <span class="comment">// playgrond forum, the number of wires now required is only two!</span>
<a name="l00069"></a>00069 <span class="comment">// 2009.07.25 raron - Fixed comments. I really messed up the comments before </span>
<a name="l00070"></a>00070 <span class="comment">// posting this, so I had to fix it.</span>
<a name="l00071"></a>00071 <span class="comment">// Renamed a function, but no improvements or functional changes.</span>
<a name="l00072"></a>00072 <span class="comment">// 2009.07.23 Incorporated some proper initialization routines</span>
<a name="l00073"></a>00073 <span class="comment">// inspired (lets say copy-paste-tweaked) from LiquidCrystal</span>
<a name="l00074"></a>00074 <span class="comment">// library improvements from LadyAda.</span>
<a name="l00075"></a>00075 <span class="comment">// 2009.05.23 raron - first version, but based mostly (as in almost verbatim)</span>
<a name="l00076"></a>00076 <span class="comment">// on the &quot;official&quot; LiquidCrystal library.</span>
<a name="l00077"></a>00077 <span class="comment">//</span>
<a name="l00078"></a>00078 <span class="comment">//</span>
<a name="l00079"></a>00079 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
<a name="l00080"></a>00080 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00081"></a>00081 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00082"></a>00082 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00083"></a>00083 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00084"></a>00084
<a name="l00085"></a>00085 <span class="preprocessor">#if (ARDUINO &lt; 100)</span>
<a name="l00086"></a>00086 <span class="preprocessor"></span><span class="preprocessor">#include &lt;WProgram.h&gt;</span>
<a name="l00087"></a>00087 <span class="preprocessor">#else</span>
<a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Arduino.h&gt;</span>
<a name="l00089"></a>00089 <span class="preprocessor">#endif</span>
<a name="l00090"></a>00090 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="_liquid_crystal___s_r_8h.html">LiquidCrystal_SR.h</a>&quot;</span>
<a name="l00091"></a>00091
<a name="l00092"></a>00092 <span class="preprocessor">#include &quot;<a class="code" href="_fast_i_o_8h.html">FastIO.h</a>&quot;</span>
<a name="l00093"></a>00093
<a name="l00094"></a>00094
<a name="l00095"></a>00095 <span class="comment">// CONSTRUCTORS</span>
<a name="l00096"></a>00096 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00097"></a>00097 <span class="comment">// Assuming 1 line 8 pixel high font</span>
<a name="l00098"></a><a class="code" href="class_liquid_crystal___s_r.html#ac3fe0b48f8d4c1c941d82d1333495cfc">00098</a> <a class="code" href="class_liquid_crystal___s_r.html#ac3fe0b48f8d4c1c941d82d1333495cfc">LiquidCrystal_SR::LiquidCrystal_SR</a> (uint8_t srdata, uint8_t srclock,
<a name="l00099"></a>00099 uint8_t enable )
<a name="l00100"></a>00100 {
<a name="l00101"></a>00101 init ( srdata, srclock, enable, 1, 0 );
<a name="l00102"></a>00102 }
<a name="l00103"></a>00103
<a name="l00104"></a>00104
<a name="l00105"></a>00105 <span class="comment">// PRIVATE METHODS</span>
<a name="l00106"></a>00106 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00107"></a>00107
<a name="l00108"></a>00108 <span class="comment">//</span>
<a name="l00109"></a>00109 <span class="comment">// init</span>
<a name="l00110"></a>00110 <span class="keywordtype">void</span> LiquidCrystal_SR::init(uint8_t srdata, uint8_t srclock, uint8_t enable,
<a name="l00111"></a>00111 uint8_t lines, uint8_t font)
<a name="l00112"></a>00112 {
<a name="l00113"></a>00113 <span class="comment">// Initialise private variables</span>
<a name="l00114"></a>00114 _two_wire = 0;
<a name="l00115"></a>00115
<a name="l00116"></a>00116 _srDataRegister = <a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(srdata);
<a name="l00117"></a>00117 _srDataBit = <a class="code" href="_fast_i_o_8cpp.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a>(srdata);
<a name="l00118"></a>00118 _srClockRegister = <a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(srclock);
<a name="l00119"></a>00119 _srClockBit = <a class="code" href="_fast_i_o_8cpp.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a>(srclock);
<a name="l00120"></a>00120
<a name="l00121"></a>00121 <span class="keywordflow">if</span> ((enable == <a class="code" href="_liquid_crystal___s_r_8h.html#a40fb1f76bc5f8ca9e6534b47bd6da27c">TWO_WIRE</a>) || (enable == srdata))
<a name="l00122"></a>00122 {
<a name="l00123"></a>00123 _two_wire = 1;
<a name="l00124"></a>00124 _srEnableRegister = _srDataRegister;
<a name="l00125"></a>00125 _srEnableBit = _srDataBit;
<a name="l00126"></a>00126 }
<a name="l00127"></a>00127 <span class="keywordflow">else</span>
<a name="l00128"></a>00128 {
<a name="l00129"></a>00129 _srEnableRegister = <a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(enable);
<a name="l00130"></a>00130 _srEnableBit = <a class="code" href="_fast_i_o_8cpp.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a>(enable);
<a name="l00131"></a>00131 }
<a name="l00132"></a>00132
<a name="l00133"></a>00133 <span class="comment">// Configure control pins as outputs</span>
<a name="l00134"></a>00134 <span class="comment">// ------------------------------------------------------------------------</span>
<a name="l00135"></a>00135
<a name="l00136"></a>00136 <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> = <a class="code" href="_l_c_d_8h.html#ab8c35d355d2372090c7a347e961c9224">LCD_4BITMODE</a> | <a class="code" href="_l_c_d_8h.html#a8c85cf88d8af66a47c42249d81c94641">LCD_1LINE</a> | <a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">LCD_5x8DOTS</a>;
<a name="l00137"></a>00137 }
<a name="l00138"></a>00138
<a name="l00139"></a>00139 <span class="comment">//</span>
<a name="l00140"></a>00140 <span class="comment">// shiftIt</span>
<a name="l00141"></a>00141 <span class="keywordtype">void</span> LiquidCrystal_SR::shiftIt(uint8_t val)
<a name="l00142"></a>00142 {
<a name="l00143"></a>00143 <span class="keywordflow">if</span> (_two_wire)
<a name="l00144"></a>00144 {
<a name="l00145"></a>00145 <span class="comment">// Clear to get Enable LOW</span>
<a name="l00146"></a>00146 <a class="code" href="_fast_i_o_8cpp.html#a56c72b9f00680662229895ab22aaa743">fio_shiftOut</a>(_srDataRegister, _srDataBit, _srClockRegister, _srClockBit);
<a name="l00147"></a>00147 }
<a name="l00148"></a>00148 <a class="code" href="_fast_i_o_8cpp.html#a56c72b9f00680662229895ab22aaa743">fio_shiftOut</a>(_srDataRegister, _srDataBit, _srClockRegister, _srClockBit, val, MSBFIRST);
<a name="l00149"></a>00149
<a name="l00150"></a>00150 <span class="comment">// LCD ENABLE PULSE</span>
<a name="l00151"></a>00151 <span class="comment">//</span>
<a name="l00152"></a>00152 <span class="comment">// While this library is written with a shift register without an output</span>
<a name="l00153"></a>00153 <span class="comment">// latch in mind, it can work in 3-wire mode with a shiftregister with a</span>
<a name="l00154"></a>00154 <span class="comment">// latch. The shiftregister latch pin (STR, RCL or similar) is then</span>
<a name="l00155"></a>00155 <span class="comment">// connected to the LCD enable pin. The LCD is (very likely) slower</span>
<a name="l00156"></a>00156 <span class="comment">// to read the Enable pulse, and then reads the new contents of the SR.</span>
<a name="l00157"></a>00157 <a class="code" href="_fast_i_o_8h.html#a04971fe5fabe4129736708c494e08e6d">ATOMIC_BLOCK</a>(<a class="code" href="_fast_i_o_8h.html#a362c18b15a09703e42e1c246c47420ef">ATOMIC_RESTORESTATE</a>)
<a name="l00158"></a>00158 {
<a name="l00159"></a>00159 <a class="code" href="_fast_i_o_8h.html#a89e1c62276052100c62b6c82a2e95622">fio_digitalWrite_HIGH</a>(_srEnableRegister, _srEnableBit);
<a name="l00160"></a>00160 <a class="code" href="_l_c_d_8h.html#a6eac41e4be58d7736ac0c19de225c0dc">waitUsec</a> (1); <span class="comment">// enable pulse must be &gt;450ns </span>
<a name="l00161"></a>00161 <a class="code" href="_fast_i_o_8h.html#accae9687fdfc5f3492fb6344d62eb190">fio_digitalWrite_SWITCHTO</a>(_srEnableRegister, _srEnableBit, LOW);
<a name="l00162"></a>00162 } <span class="comment">// end critical section</span>
<a name="l00163"></a>00163 }
<a name="l00164"></a>00164
<a name="l00165"></a>00165 <span class="comment">// PUBLIC METHODS</span>
<a name="l00166"></a>00166 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00167"></a>00167
<a name="l00168"></a>00168
<a name="l00169"></a>00169 <span class="comment">/************ low level data pushing commands **********/</span>
<a name="l00170"></a>00170 <span class="comment">//</span>
<a name="l00171"></a>00171 <span class="comment">// send</span>
<a name="l00172"></a><a class="code" href="class_liquid_crystal___s_r.html#a03821351a32db07cb7e42c8c11ce8d47">00172</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r.html#a03821351a32db07cb7e42c8c11ce8d47">LiquidCrystal_SR::send</a>(uint8_t value, uint8_t mode)
<a name="l00173"></a>00173 {
<a name="l00174"></a>00174 <span class="comment">// Divide byte in two nibbles include the RS signal</span>
<a name="l00175"></a>00175 <span class="comment">// and format it for shiftregister output wiring to the LCD</span>
<a name="l00176"></a>00176 <span class="comment">// We are only interested in my COMMAND or DATA for myMode</span>
<a name="l00177"></a>00177 uint8_t myMode = ( mode == <a class="code" href="_l_c_d_8h.html#aad9ae913bdfab20dd94ad04ee2d5b045">DATA</a> ) ? <a class="code" href="_liquid_crystal___s_r_8h.html#afdaa2bbb2cc185700864ac8d7a570ced">SR_RS_BIT</a> : 0; <span class="comment">// RS bit; LOW: command. HIGH: character.</span>
<a name="l00178"></a>00178
<a name="l00179"></a>00179 <span class="keywordflow">if</span> ( mode != <a class="code" href="_l_c_d_8h.html#aa1e30e32b6c2cf8d90a9281328472dbe">FOUR_BITS</a> )
<a name="l00180"></a>00180 {
<a name="l00181"></a>00181 shiftIt(myMode | <a class="code" href="_liquid_crystal___s_r_8h.html#a0075b041d82abb47f279dce482e7b087">SR_EN_BIT</a> | ((value &gt;&gt; 1) &amp; 0x78)); <span class="comment">// upper nibble</span>
<a name="l00182"></a>00182 }
<a name="l00183"></a>00183
<a name="l00184"></a>00184 shiftIt(myMode | <a class="code" href="_liquid_crystal___s_r_8h.html#a0075b041d82abb47f279dce482e7b087">SR_EN_BIT</a> | ((value &lt;&lt; 3) &amp; 0x78)); <span class="comment">// lower nibble</span>
<a name="l00185"></a>00185 <span class="comment">/*</span>
<a name="l00186"></a>00186 <span class="comment"> * Add some delay since this code is so fast it needs some added delay</span>
<a name="l00187"></a>00187 <span class="comment"> * even on AVRs because the shiftout is shorter than the LCD command execution time.</span>
<a name="l00188"></a>00188 <span class="comment"> */</span>
<a name="l00189"></a>00189 <span class="preprocessor">#if (F_CPU &lt;= 16000000)</span>
<a name="l00190"></a>00190 <span class="preprocessor"></span> <span class="keywordflow">if</span>(_two_wire)
<a name="l00191"></a>00191 delayMicroseconds ( 10 );
<a name="l00192"></a>00192 <span class="keywordflow">else</span>
<a name="l00193"></a>00193 delayMicroseconds ( 17 ); <span class="comment">// 3 wire mode is faster so it must delay longer</span>
<a name="l00194"></a>00194 <span class="preprocessor">#else</span>
<a name="l00195"></a>00195 <span class="preprocessor"></span> delayMicroseconds ( 37 ); <span class="comment">// commands &amp; data writes need &gt; 37us to complete</span>
<a name="l00196"></a>00196 <span class="preprocessor">#endif</span>
<a name="l00197"></a>00197 <span class="preprocessor"></span>
<a name="l00198"></a>00198 }
<a name="l00199"></a>00199
<a name="l00200"></a>00200 <span class="comment">//</span>
<a name="l00201"></a>00201 <span class="comment">// setBacklightPin</span>
<a name="l00202"></a><a class="code" href="class_liquid_crystal___s_r.html#a5bfc0dcc1f042bcb59992493a3a7231d">00202</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r.html#a5bfc0dcc1f042bcb59992493a3a7231d">LiquidCrystal_SR::setBacklightPin</a> ( uint8_t pin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol )
<a name="l00203"></a>00203 { }
<a name="l00204"></a>00204
<a name="l00205"></a>00205 <span class="comment">//</span>
<a name="l00206"></a>00206 <span class="comment">// setBacklight</span>
<a name="l00207"></a><a class="code" href="class_liquid_crystal___s_r.html#ad9f3e3f36257984c23fb508973e14535">00207</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r.html#ad9f3e3f36257984c23fb508973e14535">LiquidCrystal_SR::setBacklight</a> ( uint8_t mode )
<a name="l00208"></a>00208 { }
<a name="l00209"></a>00209
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,148 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Defines</a> </div>
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR.h File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_l_c_d_8h_source.html">LCD.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>&quot;</code><br/>
</div>
<p><a href="_liquid_crystal___s_r_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r.html">LiquidCrystal_SR</a></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r_8h.html#a0075b041d82abb47f279dce482e7b087">SR_EN_BIT</a>&#160;&#160;&#160;0x80</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r_8h.html#afdaa2bbb2cc185700864ac8d7a570ced">SR_RS_BIT</a>&#160;&#160;&#160;0x04</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r_8h.html#a40fb1f76bc5f8ca9e6534b47bd6da27c">TWO_WIRE</a>&#160;&#160;&#160;204</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a0075b041d82abb47f279dce482e7b087"></a><!-- doxytag: member="LiquidCrystal_SR.h::SR_EN_BIT" ref="a0075b041d82abb47f279dce482e7b087" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SR_EN_BIT&#160;&#160;&#160;0x80</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r_8h_source.html#l00092">92</a> of file <a class="el" href="_liquid_crystal___s_r_8h_source.html">LiquidCrystal_SR.h</a>.</p>
</div>
</div>
<a class="anchor" id="afdaa2bbb2cc185700864ac8d7a570ced"></a><!-- doxytag: member="LiquidCrystal_SR.h::SR_RS_BIT" ref="afdaa2bbb2cc185700864ac8d7a570ced" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SR_RS_BIT&#160;&#160;&#160;0x04</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r_8h_source.html#l00091">91</a> of file <a class="el" href="_liquid_crystal___s_r_8h_source.html">LiquidCrystal_SR.h</a>.</p>
</div>
</div>
<a class="anchor" id="a40fb1f76bc5f8ca9e6534b47bd6da27c"></a><!-- doxytag: member="LiquidCrystal_SR.h::TWO_WIRE" ref="a40fb1f76bc5f8ca9e6534b47bd6da27c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define TWO_WIRE&#160;&#160;&#160;204</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r_8h_source.html#l00090">90</a> of file <a class="el" href="_liquid_crystal___s_r_8h_source.html">LiquidCrystal_SR.h</a>.</p>
</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,210 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR.h</div> </div>
</div>
<div class="contents">
<a href="_liquid_crystal___s_r_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created by Francisco Malpartida on 20/08/11.</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2011 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no </span>
<a name="l00007"></a>00007 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// Thread Safe: No</span>
<a name="l00010"></a>00010 <span class="comment">// Extendable: Yes</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// @file LiquidCrystal_SR.h</span>
<a name="l00013"></a>00013 <span class="comment">// Connects an LCD using 2 or 3 pins from the Arduino, via an 8-bit </span>
<a name="l00014"></a>00014 <span class="comment">// ShiftRegister (SR from now on).</span>
<a name="l00015"></a>00015 <span class="comment">// </span>
<a name="l00016"></a>00016 <span class="comment">// @brief </span>
<a name="l00017"></a>00017 <span class="comment">// This is a port of the ShiftRegLCD library from raron and ported to the</span>
<a name="l00018"></a>00018 <span class="comment">// LCD library.</span>
<a name="l00019"></a>00019 <span class="comment">//</span>
<a name="l00020"></a>00020 <span class="comment">// The functionality provided by this class and its base class is identical</span>
<a name="l00021"></a>00021 <span class="comment">// to the original functionality of the Arduino LiquidCrystal library and can</span>
<a name="l00022"></a>00022 <span class="comment">// be used as such.</span>
<a name="l00023"></a>00023 <span class="comment">//</span>
<a name="l00024"></a>00024 <span class="comment">// Modified to work serially with the shiftOut() function, an 8-bit</span>
<a name="l00025"></a>00025 <span class="comment">// unlatched, no-tristate, unidirectional SIPO (Serial-In-Parallel-Out)</span>
<a name="l00026"></a>00026 <span class="comment">// shift register (IE a very simple SR), and an LCD in 4-bit mode.</span>
<a name="l00027"></a>00027 <span class="comment">// Any such shift register should do (pref. 74LS family IC&#39;s for 2-wire).</span>
<a name="l00028"></a>00028 <span class="comment">// I used 74LS164, for the reason that&#39;s what I had at hand.</span>
<a name="l00029"></a>00029 <span class="comment">//</span>
<a name="l00030"></a>00030 <span class="comment">// Connection description:</span>
<a name="l00031"></a>00031 <span class="comment">//</span>
<a name="l00032"></a>00032 <span class="comment">// SR output:</span>
<a name="l00033"></a>00033 <span class="comment">// Bit #0 - N/C - not connected, used to hold a zero</span>
<a name="l00034"></a>00034 <span class="comment">// Bit #1 - N/C</span>
<a name="l00035"></a>00035 <span class="comment">// Bit #2 - connects to RS (Register Select) on the LCD</span>
<a name="l00036"></a>00036 <span class="comment">// Bits #3-6 - connects to LCD data inputs D4 - D7.</span>
<a name="l00037"></a>00037 <span class="comment">// Bit #7 - enables the LCD enable-puls (via the diode-resistor AND &quot;gate&quot;)</span>
<a name="l00038"></a>00038 <span class="comment">//</span>
<a name="l00039"></a>00039 <span class="comment">// 2 or 3 Pins required from the Arduino for Data, Clock and (optional) Enable</span>
<a name="l00040"></a>00040 <span class="comment">// If not using Enable, the Data pin will be used for the enable signal.</span>
<a name="l00041"></a>00041 <span class="comment">// 2 wire mode can be indicated by:</span>
<a name="l00042"></a>00042 <span class="comment">// - ommitting the enable pin in constructor</span>
<a name="l00043"></a>00043 <span class="comment">// - defining the same pin for Enable as for Data in constructor</span>
<a name="l00044"></a>00044 <span class="comment">// - by using the token TWO_WIRE for the enable pin.</span>
<a name="l00045"></a>00045 <span class="comment">//</span>
<a name="l00046"></a>00046 <span class="comment">// Data and Clock outputs/pins goes to the shiftregister.</span>
<a name="l00047"></a>00047 <span class="comment">// LCD RW-pin hardwired to LOW (only writing to LCD).</span>
<a name="l00048"></a>00048 <span class="comment">// Busy Flag (BF, data bit D7) is not read.</span>
<a name="l00049"></a>00049 <span class="comment">//</span>
<a name="l00050"></a>00050 <span class="comment">// Original project homepage: http://code.google.com/p/arduinoshiftreglcd/</span>
<a name="l00051"></a>00051 <span class="comment">//</span>
<a name="l00052"></a>00052 <span class="comment">//</span>
<a name="l00053"></a>00053 <span class="comment">// History</span>
<a name="l00054"></a>00054 <span class="comment">// 2012.03.29 bperrybap - can now eliminate enable pin in constructor for two wire mode.</span>
<a name="l00055"></a>00055 <span class="comment">// 2011.10.29 fmalpartida - adaption of the library to the LCD class hierarchy.</span>
<a name="l00056"></a>00056 <span class="comment">// 2011.07.02 Fixed a minor flaw in setCursor function. No functional change, </span>
<a name="l00057"></a>00057 <span class="comment">// just a bit more memory efficient.</span>
<a name="l00058"></a>00058 <span class="comment">// Thanks to CapnBry (from google code and github) who noticed it.</span>
<a name="l00059"></a>00059 <span class="comment">// URL to his version of shiftregLCD:</span>
<a name="l00060"></a>00060 <span class="comment">// https://github.com/CapnBry/HeaterMeter/commit/c6beba1b46b092ab0b33bcbd0a30a201fd1f28c1</span>
<a name="l00061"></a>00061 <span class="comment">// 2009.07.30 raron - minor corrections to the comments.</span>
<a name="l00062"></a>00062 <span class="comment">// Fixed timing to datasheet safe. Fixed keyword highlights.</span>
<a name="l00063"></a>00063 <span class="comment">// 2009.07.28 Mircho / raron - a new modification to the schematics, and a</span>
<a name="l00064"></a>00064 <span class="comment">// more streamlined interface</span>
<a name="l00065"></a>00065 <span class="comment">// 2009.07.27 Thanks to an excellent suggestion from mircho at the Arduiono </span>
<a name="l00066"></a>00066 <span class="comment">// playgrond forum, the number of wires now required is only two!</span>
<a name="l00067"></a>00067 <span class="comment">// 2009.07.25 raron - Fixed comments. I really messed up the comments before </span>
<a name="l00068"></a>00068 <span class="comment">// posting this, so I had to fix it.</span>
<a name="l00069"></a>00069 <span class="comment">// Renamed a function, but no improvements or functional changes.</span>
<a name="l00070"></a>00070 <span class="comment">// 2009.07.23 Incorporated some proper initialization routines</span>
<a name="l00071"></a>00071 <span class="comment">// inspired (lets say copy-paste-tweaked) from LiquidCrystal</span>
<a name="l00072"></a>00072 <span class="comment">// library improvements from LadyAda.</span>
<a name="l00073"></a>00073 <span class="comment">// 2009.05.23 raron - first version, but based mostly (as in almost verbatim)</span>
<a name="l00074"></a>00074 <span class="comment">// on the &quot;official&quot; LiquidCrystal library.</span>
<a name="l00075"></a>00075 <span class="comment">//</span>
<a name="l00076"></a>00076 <span class="comment">//</span>
<a name="l00077"></a>00077 <span class="comment">//</span>
<a name="l00078"></a>00078 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
<a name="l00079"></a>00079 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00080"></a>00080 <span class="preprocessor">#ifndef _LIQUIDCRYSTAL_SR_</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#define _LIQUIDCRYSTAL_SR_</span>
<a name="l00082"></a>00082 <span class="preprocessor"></span>
<a name="l00083"></a>00083 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00084"></a>00084 <span class="preprocessor">#include &quot;<a class="code" href="_l_c_d_8h.html">LCD.h</a>&quot;</span>
<a name="l00085"></a>00085 <span class="preprocessor">#include &quot;<a class="code" href="_fast_i_o_8h.html">FastIO.h</a>&quot;</span>
<a name="l00086"></a>00086
<a name="l00087"></a>00087
<a name="l00088"></a>00088 <span class="comment">// two-wire indicator constant</span>
<a name="l00089"></a>00089 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00090"></a><a class="code" href="_liquid_crystal___s_r_8h.html#a40fb1f76bc5f8ca9e6534b47bd6da27c">00090</a> <span class="preprocessor">#define TWO_WIRE 204</span>
<a name="l00091"></a><a class="code" href="_liquid_crystal___s_r_8h.html#afdaa2bbb2cc185700864ac8d7a570ced">00091</a> <span class="preprocessor"></span><span class="preprocessor">#define SR_RS_BIT 0x04</span>
<a name="l00092"></a><a class="code" href="_liquid_crystal___s_r_8h.html#a0075b041d82abb47f279dce482e7b087">00092</a> <span class="preprocessor"></span><span class="preprocessor">#define SR_EN_BIT 0x80</span>
<a name="l00093"></a>00093 <span class="preprocessor"></span>
<a name="l00094"></a><a class="code" href="class_liquid_crystal___s_r.html">00094</a> <span class="keyword">class </span><a class="code" href="class_liquid_crystal___s_r.html">LiquidCrystal_SR</a> : <span class="keyword">public</span> <a class="code" href="class_l_c_d.html">LCD</a>
<a name="l00095"></a>00095 {
<a name="l00096"></a>00096 <span class="keyword">public</span>:
<a name="l00108"></a>00108 <a class="code" href="class_liquid_crystal___s_r.html#ac3fe0b48f8d4c1c941d82d1333495cfc">LiquidCrystal_SR</a> ( uint8_t srdata, uint8_t srclock, uint8_t enable=<a class="code" href="_liquid_crystal___s_r_8h.html#a40fb1f76bc5f8ca9e6534b47bd6da27c">TWO_WIRE</a> );
<a name="l00109"></a>00109
<a name="l00122"></a>00122 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r.html#a03821351a32db07cb7e42c8c11ce8d47">send</a>(uint8_t value, uint8_t mode);
<a name="l00123"></a>00123
<a name="l00124"></a>00124
<a name="l00134"></a>00134 <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r.html#a5bfc0dcc1f042bcb59992493a3a7231d">setBacklightPin</a> ( uint8_t pin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol );
<a name="l00135"></a>00135
<a name="l00145"></a>00145 <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r.html#ad9f3e3f36257984c23fb508973e14535">setBacklight</a> ( uint8_t mode );
<a name="l00146"></a>00146
<a name="l00147"></a>00147 <span class="keyword">private</span>:
<a name="l00148"></a>00148
<a name="l00154"></a>00154 <span class="keywordtype">void</span> init ( uint8_t srdata, uint8_t srclock, uint8_t enable, uint8_t lines,
<a name="l00155"></a>00155 uint8_t font );
<a name="l00156"></a>00156
<a name="l00161"></a>00161 <span class="keywordtype">void</span> shiftIt (uint8_t val);
<a name="l00162"></a>00162
<a name="l00163"></a>00163 uint8_t _enable_pin; <span class="comment">// Enable Pin</span>
<a name="l00164"></a>00164 uint8_t _two_wire; <span class="comment">// two wire mode</span>
<a name="l00165"></a>00165
<a name="l00166"></a>00166 <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> _srDataRegister; <span class="comment">// Serial Data pin</span>
<a name="l00167"></a>00167 <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> _srDataBit;
<a name="l00168"></a>00168 <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> _srClockRegister; <span class="comment">// Clock Pin</span>
<a name="l00169"></a>00169 <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> _srClockBit;
<a name="l00170"></a>00170 <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> _srEnableRegister; <span class="comment">// Enable Pin</span>
<a name="l00171"></a>00171 <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> _srEnableBit;
<a name="l00172"></a>00172
<a name="l00173"></a>00173 };
<a name="l00174"></a>00174
<a name="l00175"></a>00175 <span class="preprocessor">#endif</span>
<a name="l00176"></a>00176 <span class="preprocessor"></span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,147 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR_LCD3.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Defines</a> </div>
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR_LCD3.cpp File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &lt;WProgram.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_fast_i_o_8h_source.html">FastIO.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_liquid_crystal___s_r___l_c_d3_8h_source.html">LiquidCrystal_SR_LCD3.h</a>&quot;</code><br/>
</div>
<p><a href="_liquid_crystal___s_r___l_c_d3_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r___l_c_d3_8cpp.html#a0075b041d82abb47f279dce482e7b087">SR_EN_BIT</a>&#160;&#160;&#160;B00010000</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r___l_c_d3_8cpp.html#afdaa2bbb2cc185700864ac8d7a570ced">SR_RS_BIT</a>&#160;&#160;&#160;B01000000</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_liquid_crystal___s_r___l_c_d3_8cpp.html#ae0e1fe92420ef667b9830efeb059c853">SR_RW_BIT</a>&#160;&#160;&#160;B00100000</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a0075b041d82abb47f279dce482e7b087"></a><!-- doxytag: member="LiquidCrystal_SR_LCD3.cpp::SR_EN_BIT" ref="a0075b041d82abb47f279dce482e7b087" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SR_EN_BIT&#160;&#160;&#160;B00010000</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r___l_c_d3_8cpp_source.html#l00167">167</a> of file <a class="el" href="_liquid_crystal___s_r___l_c_d3_8cpp_source.html">LiquidCrystal_SR_LCD3.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="afdaa2bbb2cc185700864ac8d7a570ced"></a><!-- doxytag: member="LiquidCrystal_SR_LCD3.cpp::SR_RS_BIT" ref="afdaa2bbb2cc185700864ac8d7a570ced" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SR_RS_BIT&#160;&#160;&#160;B01000000</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r___l_c_d3_8cpp_source.html#l00169">169</a> of file <a class="el" href="_liquid_crystal___s_r___l_c_d3_8cpp_source.html">LiquidCrystal_SR_LCD3.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ae0e1fe92420ef667b9830efeb059c853"></a><!-- doxytag: member="LiquidCrystal_SR_LCD3.cpp::SR_RW_BIT" ref="ae0e1fe92420ef667b9830efeb059c853" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define SR_RW_BIT&#160;&#160;&#160;B00100000</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r___l_c_d3_8cpp_source.html#l00168">168</a> of file <a class="el" href="_liquid_crystal___s_r___l_c_d3_8cpp_source.html">LiquidCrystal_SR_LCD3.cpp</a>.</p>
</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Mar 4 2012 21:17:07 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,295 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR_LCD3.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR_LCD3.cpp</div> </div>
</div>
<div class="contents">
<a href="_liquid_crystal___s_r___l_c_d3_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Originally Created by Francisco Malpartida on 2011/08/20.</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2011 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This software is furnished &quot;as is&quot;, without technical support, and with no </span>
<a name="l00007"></a>00007 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// 2012/01/21 - Marc MERLIN</span>
<a name="l00010"></a>00010 <span class="comment">// This library, LiquidCrystal_SR_LCD3, was forked off LiquidCrystal_SR which</span>
<a name="l00011"></a>00011 <span class="comment">// used a different wiring than the Pebble and Pebblev2 (just released by</span>
<a name="l00012"></a>00012 <span class="comment">// freetronics in the arduino miniconf as part of linux.conf.au 2012) and</span>
<a name="l00013"></a>00013 <span class="comment">// therefore this code organizes the output data differently.</span>
<a name="l00014"></a>00014 <span class="comment">//</span>
<a name="l00015"></a>00015 <span class="comment">// Upstream source for this module is</span>
<a name="l00016"></a>00016 <span class="comment">// https://github.com/marcmerlin/NewLiquidCrystal</span>
<a name="l00017"></a>00017 <span class="comment">//</span>
<a name="l00018"></a>00018 <span class="comment">// Thread Safe: No</span>
<a name="l00019"></a>00019 <span class="comment">// Extendable: Yes</span>
<a name="l00020"></a>00020 <span class="comment">//</span>
<a name="l00021"></a>00021 <span class="comment">// @file LiquidCrystal_SR_LCD3.h</span>
<a name="l00022"></a>00022 <span class="comment">//</span>
<a name="l00023"></a>00023 <span class="comment">// Connects an LCD using 3 pins from the Arduino, via an 8-bit </span>
<a name="l00024"></a>00024 <span class="comment">// ShiftRegister (SR from now on).</span>
<a name="l00025"></a>00025 <span class="comment">// The original port source for this module is https://github.com/marcmerlin/NewLiquidCrystal</span>
<a name="l00026"></a>00026 <span class="comment">// The &#39;FastIO&#39; merge has madethis code 4 times faster.</span>
<a name="l00027"></a>00027 <span class="comment">// </span>
<a name="l00028"></a>00028 <span class="comment">// @brief </span>
<a name="l00029"></a>00029 <span class="comment">// This is a port of the ShiftRegLCD library from raron and ported to the</span>
<a name="l00030"></a>00030 <span class="comment">// LCD library.</span>
<a name="l00031"></a>00031 <span class="comment">//</span>
<a name="l00032"></a>00032 <span class="comment">// The functionality provided by this class and its base class is identical</span>
<a name="l00033"></a>00033 <span class="comment">// to the original functionality of the Arduino LiquidCrystal library and can</span>
<a name="l00034"></a>00034 <span class="comment">// be used as such.</span>
<a name="l00035"></a>00035 <span class="comment">//</span>
<a name="l00036"></a>00036 <span class="comment">// Pinout for this code is used by derivatives of the original LCD3Wire page:</span>
<a name="l00037"></a>00037 <span class="comment">// http://www.arduino.cc/playground/Code/LCD3wires</span>
<a name="l00038"></a>00038 <span class="comment">//</span>
<a name="l00039"></a>00039 <span class="comment">// This includes the LCA (linux.conf.au) Arduino Miniconf Pebble: </span>
<a name="l00040"></a>00040 <span class="comment">// http://shieldlist.org/luke-weston/pebble</span>
<a name="l00041"></a>00041 <span class="comment">// https://github.com/lukeweston/Pebble</span>
<a name="l00042"></a>00042 <span class="comment">//</span>
<a name="l00043"></a>00043 <span class="comment">// It also includes the Pebble v2:</span>
<a name="l00044"></a>00044 <span class="comment">// http://www.arduinominiconf.org/index.php/Pebble_V2.0_Instructions</span>
<a name="l00045"></a>00045 <span class="comment">// http://www.freetronics.com/pages/pebble-v2</span>
<a name="l00046"></a>00046 <span class="comment">// https://github.com/lukeweston/pebble20/blob/master/README.md</span>
<a name="l00047"></a>00047 <span class="comment">// https://github.com/lukeweston/pebble20/blob/master/pebble-sch.pdf</span>
<a name="l00048"></a>00048 <span class="comment">//</span>
<a name="l00049"></a>00049 <span class="comment">// Shiftregister connection description:</span>
<a name="l00050"></a>00050 <span class="comment">// MC14094 input: Arduino digital pin 2=Clock, pin 3=Data, pin 4=Strobe</span>
<a name="l00051"></a>00051 <span class="comment">// MC14094 output: Q8=DB4, Q7=DB5, Q6=DB6, Q5=DB7, Q4=E, Q3=RW, Q2=RS, Q1=None</span>
<a name="l00052"></a>00052 <span class="comment">//</span>
<a name="l00053"></a>00053 <span class="comment">// +--------------------------------------------+</span>
<a name="l00054"></a>00054 <span class="comment">// | Arduino (ATMega 168 or 328) |</span>
<a name="l00055"></a>00055 <span class="comment">// | D02 D03 D04 |</span>
<a name="l00056"></a>00056 <span class="comment">// +----+-------------+-------------+-----------+</span>
<a name="l00057"></a>00057 <span class="comment">// |4 |5 |6</span>
<a name="l00058"></a>00058 <span class="comment">// |1 |2 |3</span>
<a name="l00059"></a>00059 <span class="comment">// +----+-------------+-------------+-----------+</span>
<a name="l00060"></a>00060 <span class="comment">// | Strobe Data Clock |</span>
<a name="l00061"></a>00061 <span class="comment">// | MC14094 8-bit shift/latch register |</span>
<a name="l00062"></a>00062 <span class="comment">// | Q8 Q7 Q6 Q5 Q4 Q3 Q2 Q1 |</span>
<a name="l00063"></a>00063 <span class="comment">// +----+----+----+----+----+----+----+----+----+</span>
<a name="l00064"></a>00064 <span class="comment">// |11 |12 |13 |14 |7 |6 |5 |4</span>
<a name="l00065"></a>00065 <span class="comment">// |11 |12 |13 |14 |6 |5 |4</span>
<a name="l00066"></a>00066 <span class="comment">// +----+----+----+----+----+----+----+---------+</span>
<a name="l00067"></a>00067 <span class="comment">// | DB4 DB5 DB6 DB7 E RW RS |</span>
<a name="l00068"></a>00068 <span class="comment">// | LCD KS0066 |</span>
<a name="l00069"></a>00069 <span class="comment">// +--------------------------------------------+</span>
<a name="l00070"></a>00070 <span class="comment">//</span>
<a name="l00071"></a>00071 <span class="comment">// 3 Pins required from the Arduino for Data, Clock, and Enable/Strobe.</span>
<a name="l00072"></a>00072 <span class="comment">//</span>
<a name="l00073"></a>00073 <span class="comment">// This code was inspired from LiquidCrystal_SR from</span>
<a name="l00074"></a>00074 <span class="comment">// http://code.google.com/p/arduinoshiftreglcd/</span>
<a name="l00075"></a>00075 <span class="comment">// but was written for implementing LiquidCrystal support for the Pebble</span>
<a name="l00076"></a>00076 <span class="comment">// and Pebblev2 (see below).</span>
<a name="l00077"></a>00077 <span class="comment">// The Pebbles&#39;s LCD and shift register wiring were inspired from this</span>
<a name="l00078"></a>00078 <span class="comment">// original page:</span>
<a name="l00079"></a>00079 <span class="comment">// http://www.arduino.cc/playground/Code/LCD3wires</span>
<a name="l00080"></a>00080 <span class="comment">// </span>
<a name="l00081"></a>00081 <span class="comment">// Pebbles and the LCD3Wires design are compatible hardware-wise, but</span>
<a name="l00082"></a>00082 <span class="comment">// the LCD3Wire code does not work with arduino 1.0 anymore and is generally</span>
<a name="l00083"></a>00083 <span class="comment">// quite limited in functionality compared to this framework that provides the</span>
<a name="l00084"></a>00084 <span class="comment">// entire LiquidDisplay functionality.</span>
<a name="l00085"></a>00085 <span class="comment">// Why not just use the LiquidCrystal_SR pinout?</span>
<a name="l00086"></a>00086 <span class="comment">// - LCD3Wire was first and therefore have hardware that was designed with </span>
<a name="l00087"></a>00087 <span class="comment">// incompatible (IMO better if you don&#39;t mind 3 wires) pinout.</span>
<a name="l00088"></a>00088 <span class="comment">// - The pinout used here is same saner (the 4 bits for the LCD are all in one </span>
<a name="l00089"></a>00089 <span class="comment">// nibble of the shift register, not spread across 2 like in the</span>
<a name="l00090"></a>00090 <span class="comment">// LiquidCrystal_SR pinout)</span>
<a name="l00091"></a>00091 <span class="comment">//</span>
<a name="l00092"></a>00092 <span class="comment">// Note however that LiquidCrystal_SR while a bit more complex wiring and code</span>
<a name="l00093"></a>00093 <span class="comment">// wise, supports non latching shift registers and it a few percent faster than</span>
<a name="l00094"></a>00094 <span class="comment">// this code since it can address the LCD enable pin without having to send </span>
<a name="l00095"></a>00095 <span class="comment">// a pulse through the shift register like the LCD3Wires setup requires.</span>
<a name="l00096"></a>00096 <span class="comment">// </span>
<a name="l00097"></a>00097 <span class="comment">// This code makes sure to properly follow the specifications when talking</span>
<a name="l00098"></a>00098 <span class="comment">// to the LCD while using minimal delays (it&#39;s faster than the LCD3wire and aiko</span>
<a name="l00099"></a>00099 <span class="comment">// pebble code).</span>
<a name="l00100"></a>00100 <span class="comment">//</span>
<a name="l00101"></a>00101 <span class="comment">// @author Marc MERLIN - marc_soft&lt;at&gt;merlins.org.</span>
<a name="l00102"></a>00102 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00103"></a>00103 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00104"></a>00104 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00105"></a>00105 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00106"></a>00106
<a name="l00107"></a>00107 <span class="preprocessor">#if (ARDUINO &lt; 100)</span>
<a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor">#include &lt;WProgram.h&gt;</span>
<a name="l00109"></a>00109 <span class="preprocessor">#else</span>
<a name="l00110"></a>00110 <span class="preprocessor"></span><span class="preprocessor">#include &lt;Arduino.h&gt;</span>
<a name="l00111"></a>00111 <span class="preprocessor">#endif</span>
<a name="l00112"></a>00112 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="_fast_i_o_8h.html">FastIO.h</a>&quot;</span>
<a name="l00113"></a>00113 <span class="preprocessor">#include &quot;<a class="code" href="_liquid_crystal___s_r___l_c_d3_8h.html">LiquidCrystal_SR_LCD3.h</a>&quot;</span>
<a name="l00114"></a>00114
<a name="l00115"></a>00115
<a name="l00116"></a>00116 <span class="comment">// STATIC helper functions</span>
<a name="l00117"></a>00117 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00118"></a>00118
<a name="l00119"></a>00119
<a name="l00120"></a>00120 <span class="comment">// CONSTRUCTORS</span>
<a name="l00121"></a>00121 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00122"></a>00122 <span class="comment">// Assuming 1 line 8 pixel high font</span>
<a name="l00123"></a><a class="code" href="class_liquid_crystal___s_r___l_c_d3.html#a2cd0629853dd8a5569799fa998f3d29f">00123</a> <a class="code" href="class_liquid_crystal___s_r___l_c_d3.html#a2cd0629853dd8a5569799fa998f3d29f">LiquidCrystal_SR_LCD3::LiquidCrystal_SR_LCD3</a> ( uint8_t srdata, uint8_t srclock,
<a name="l00124"></a>00124 uint8_t strobe )
<a name="l00125"></a>00125 {
<a name="l00126"></a>00126 init ( srdata, srclock, strobe, 1, 0 );
<a name="l00127"></a>00127 }
<a name="l00128"></a>00128
<a name="l00129"></a>00129
<a name="l00130"></a>00130 <span class="comment">// PRIVATE METHODS</span>
<a name="l00131"></a>00131 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00132"></a>00132
<a name="l00133"></a>00133 <span class="comment">//</span>
<a name="l00134"></a>00134 <span class="comment">// init</span>
<a name="l00135"></a>00135 <span class="keywordtype">void</span> LiquidCrystal_SR_LCD3::init( uint8_t srdata, uint8_t srclock, uint8_t strobe,
<a name="l00136"></a>00136 uint8_t lines, uint8_t font )
<a name="l00137"></a>00137 {
<a name="l00138"></a>00138 <span class="comment">// Initialise private variables</span>
<a name="l00139"></a>00139 <span class="comment">// translate all pins to bits and registers</span>
<a name="l00140"></a>00140 <span class="comment">// pinMode to OUTPUT, Output LOW</span>
<a name="l00141"></a>00141
<a name="l00142"></a>00142 _srdata_bit = <a class="code" href="_fast_i_o_8cpp.html#abe64155b836ffa8a137eb17d17995f84">fio_pinToBit</a>(srdata);
<a name="l00143"></a>00143 _srdata_register = <a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(srdata);
<a name="l00144"></a>00144 _srclock_bit = <a class="code" href="_fast_i_o_8cpp.html#abe64155b836ffa8a137eb17d17995f84">fio_pinToBit</a>(srclock);
<a name="l00145"></a>00145 _srclock_register = <a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(srclock);
<a name="l00146"></a>00146 _strobe_bit = <a class="code" href="_fast_i_o_8cpp.html#abe64155b836ffa8a137eb17d17995f84">fio_pinToBit</a>(strobe);
<a name="l00147"></a>00147 _strobe_register = <a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(strobe);
<a name="l00148"></a>00148
<a name="l00149"></a>00149 <span class="comment">// Little trick to force a pulse of the LCD enable bit and make sure it is</span>
<a name="l00150"></a>00150 <span class="comment">// low before we start further writes since this is assumed.</span>
<a name="l00151"></a>00151
<a name="l00152"></a>00152 write4bits(0);
<a name="l00153"></a>00153
<a name="l00154"></a>00154 <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> = <a class="code" href="_l_c_d_8h.html#ab8c35d355d2372090c7a347e961c9224">LCD_4BITMODE</a> | <a class="code" href="_l_c_d_8h.html#a8c85cf88d8af66a47c42249d81c94641">LCD_1LINE</a> | <a class="code" href="_l_c_d_8h.html#abb3210156d88d3fe18c9352eb161fe42">LCD_5x10DOTS</a>;
<a name="l00155"></a>00155 }
<a name="l00156"></a>00156
<a name="l00157"></a>00157 <span class="comment">// PUBLIC METHODS</span>
<a name="l00158"></a>00158 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00159"></a>00159
<a name="l00160"></a>00160
<a name="l00161"></a>00161 <span class="comment">/************ low level data pushing commands **********/</span>
<a name="l00162"></a>00162
<a name="l00163"></a>00163 <span class="comment">// Code below was borrowed from LCD3Wire from</span>
<a name="l00164"></a>00164 <span class="comment">// http://www.arduino.cc/playground/Code/LCD3wires</span>
<a name="l00165"></a>00165
<a name="l00166"></a>00166 <span class="comment">// bitmasks for control bits on shift register</span>
<a name="l00167"></a><a class="code" href="_liquid_crystal___s_r___l_c_d3_8cpp.html#a0075b041d82abb47f279dce482e7b087">00167</a> <span class="preprocessor">#define SR_EN_BIT B00010000 // LCD Data enable bit.</span>
<a name="l00168"></a><a class="code" href="_liquid_crystal___s_r___l_c_d3_8cpp.html#ae0e1fe92420ef667b9830efeb059c853">00168</a> <span class="preprocessor"></span><span class="preprocessor">#define SR_RW_BIT B00100000 // RW can be pinned low since we only send</span>
<a name="l00169"></a><a class="code" href="_liquid_crystal___s_r___l_c_d3_8cpp.html#afdaa2bbb2cc185700864ac8d7a570ced">00169</a> <span class="preprocessor"></span><span class="preprocessor">#define SR_RS_BIT B01000000 // LOW: command. HIGH: character.</span>
<a name="l00170"></a>00170 <span class="preprocessor"></span>
<a name="l00171"></a><a class="code" href="class_liquid_crystal___s_r___l_c_d3.html#a01e75d76d80e218a5bdc28f8ce22b0e4">00171</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r___l_c_d3.html#a01e75d76d80e218a5bdc28f8ce22b0e4">LiquidCrystal_SR_LCD3::send</a>(uint8_t value, uint8_t mode)
<a name="l00172"></a>00172 {
<a name="l00173"></a>00173 uint8_t nibble;
<a name="l00174"></a>00174
<a name="l00175"></a>00175 mode = mode ? <a class="code" href="_liquid_crystal___s_r___l_c_d3_8cpp.html#afdaa2bbb2cc185700864ac8d7a570ced">SR_RS_BIT</a> : 0; <span class="comment">// RS bit; LOW: command. HIGH: character.</span>
<a name="l00176"></a>00176
<a name="l00177"></a>00177 nibble = value &gt;&gt; 4; <span class="comment">// Get high nibble.</span>
<a name="l00178"></a>00178 write4bits(nibble | mode);
<a name="l00179"></a>00179
<a name="l00180"></a>00180 <span class="comment">//delay(1); // This was in the LCD3 code but does not seem needed -- merlin</span>
<a name="l00181"></a>00181
<a name="l00182"></a>00182 nibble = value &amp; 15; <span class="comment">// Get low nibble</span>
<a name="l00183"></a>00183 write4bits(nibble | mode);
<a name="l00184"></a>00184 }
<a name="l00185"></a>00185
<a name="l00186"></a>00186 <span class="keywordtype">void</span> LiquidCrystal_SR_LCD3::write4bits(uint8_t nibble)
<a name="l00187"></a>00187 {
<a name="l00188"></a>00188 nibble &amp;= ~<a class="code" href="_liquid_crystal___s_r___l_c_d3_8cpp.html#ae0e1fe92420ef667b9830efeb059c853">SR_RW_BIT</a>; <span class="comment">// set RW LOW (we do this always since we only write).</span>
<a name="l00189"></a>00189
<a name="l00190"></a>00190 <span class="comment">// Send a High transition to display the data that was pushed</span>
<a name="l00191"></a>00191 nibble |= <a class="code" href="_liquid_crystal___s_r___l_c_d3_8cpp.html#a0075b041d82abb47f279dce482e7b087">SR_EN_BIT</a>; <span class="comment">// LCD Data Enable HIGH</span>
<a name="l00192"></a>00192 _pushOut(nibble);
<a name="l00193"></a>00193 nibble &amp;= ~<a class="code" href="_liquid_crystal___s_r___l_c_d3_8cpp.html#a0075b041d82abb47f279dce482e7b087">SR_EN_BIT</a>; <span class="comment">// LCD Data Enable LOW</span>
<a name="l00194"></a>00194 _pushOut(nibble);
<a name="l00195"></a>00195 }
<a name="l00196"></a>00196
<a name="l00197"></a>00197 <span class="comment">// push byte to shift register and on to LCD</span>
<a name="l00198"></a>00198 <span class="keywordtype">void</span> LiquidCrystal_SR_LCD3::_pushOut(uint8_t nibble)
<a name="l00199"></a>00199 {
<a name="l00200"></a>00200 <span class="comment">// Make data available for pushing to the LCD.</span>
<a name="l00201"></a>00201 <a class="code" href="_fast_i_o_8cpp.html#a56c72b9f00680662229895ab22aaa743">fio_shiftOut</a>(_srdata_register, _srdata_bit, _srclock_register, _srclock_bit, nibble, LSBFIRST);
<a name="l00202"></a>00202
<a name="l00203"></a>00203 <span class="comment">// Make new data active.</span>
<a name="l00204"></a>00204 <a class="code" href="_fast_i_o_8h.html#ad2374bbbb11bdb9abeeec0db769afd30">ATOMIC_BLOCK</a>(<a class="code" href="_fast_i_o_8h.html#a362c18b15a09703e42e1c246c47420ef">ATOMIC_RESTORESTATE</a>)
<a name="l00205"></a>00205 {
<a name="l00206"></a>00206 <a class="code" href="_fast_i_o_8h.html#a89e1c62276052100c62b6c82a2e95622">fio_digitalWrite_HIGH</a>(_strobe_register, _strobe_bit);
<a name="l00207"></a>00207 <a class="code" href="_l_c_d_8h.html#a6eac41e4be58d7736ac0c19de225c0dc">waitUsec</a>( 1 ); <span class="comment">// strobe pulse must be &gt;450ns (old code had 10ms)</span>
<a name="l00208"></a>00208 <a class="code" href="_fast_i_o_8h.html#accae9687fdfc5f3492fb6344d62eb190">fio_digitalWrite_SWITCHTO</a>(_strobe_register, _strobe_bit,LOW);
<a name="l00209"></a>00209 }
<a name="l00210"></a>00210 <a class="code" href="_l_c_d_8h.html#a6eac41e4be58d7736ac0c19de225c0dc">waitUsec</a>( 40 ); <span class="comment">// commands need &gt; 37us to settle</span>
<a name="l00211"></a>00211 }
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Mar 4 2012 21:17:06 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,95 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR_LCD3.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> </div>
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR_LCD3.h File Reference</div> </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;inttypes.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_l_c_d_8h_source.html">LCD.h</a>&quot;</code><br/>
</div>
<p><a href="_liquid_crystal___s_r___l_c_d3_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r___l_c_d3.html">LiquidCrystal_SR_LCD3</a></td></tr>
</table>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Mar 4 2012 21:17:07 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,129 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR_LCD3.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR_LCD3.h</div> </div>
</div>
<div class="contents">
<a href="_liquid_crystal___s_r___l_c_d3_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created by Francisco Malpartida on 20/08/11.</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2011 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This module is a port by Marc MERLIN &lt;marc_soft&lt;at&gt;merlins.org&gt;</span>
<a name="l00007"></a>00007 <span class="comment">// See .cpp file for hardware details.</span>
<a name="l00008"></a>00008 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00009"></a>00009 <span class="preprocessor">#ifndef _LIQUIDCRYSTAL_SR_LCD3_</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define _LIQUIDCRYSTAL_SR_LCD3_</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;inttypes.h&gt;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;<a class="code" href="_l_c_d_8h.html">LCD.h</a>&quot;</span>
<a name="l00014"></a>00014
<a name="l00015"></a>00015
<a name="l00016"></a><a class="code" href="class_liquid_crystal___s_r___l_c_d3.html">00016</a> <span class="keyword">class </span><a class="code" href="class_liquid_crystal___s_r___l_c_d3.html">LiquidCrystal_SR_LCD3</a> : <span class="keyword">public</span> <a class="code" href="class_l_c_d.html">LCD</a>
<a name="l00017"></a>00017 {
<a name="l00018"></a>00018 <span class="keyword">public</span>:
<a name="l00030"></a>00030 <a class="code" href="class_liquid_crystal___s_r___l_c_d3.html#a2cd0629853dd8a5569799fa998f3d29f">LiquidCrystal_SR_LCD3</a> ( uint8_t srdata, uint8_t srclock, uint8_t enable );
<a name="l00031"></a>00031
<a name="l00044"></a>00044 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r___l_c_d3.html#a01e75d76d80e218a5bdc28f8ce22b0e4">send</a>(uint8_t value, uint8_t mode);
<a name="l00045"></a>00045
<a name="l00046"></a>00046
<a name="l00047"></a>00047 <span class="keyword">private</span>:
<a name="l00048"></a>00048
<a name="l00054"></a>00054 <span class="keywordtype">void</span> init ( uint8_t srdata, uint8_t srclock, uint8_t enable, uint8_t lines,
<a name="l00055"></a>00055 uint8_t font );
<a name="l00061"></a>00061 <span class="keywordtype">void</span> write4bits ( uint8_t );
<a name="l00062"></a>00062 <span class="keywordtype">void</span> _pushOut ( uint8_t );
<a name="l00063"></a>00063
<a name="l00064"></a>00064 <span class="comment">// Serial Data pin</span>
<a name="l00065"></a>00065 <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> _srdata_bit;
<a name="l00066"></a>00066 <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> _srdata_register;
<a name="l00067"></a>00067
<a name="l00068"></a>00068 <span class="comment">// Clock Pin</span>
<a name="l00069"></a>00069 <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> _srclock_bit;
<a name="l00070"></a>00070 <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> _srclock_register;
<a name="l00071"></a>00071
<a name="l00072"></a>00072 <span class="comment">// Enable Pin</span>
<a name="l00073"></a>00073 <a class="code" href="_fast_i_o_8h.html#a0a595a88b29bcfd1540b6fac75787937">fio_bit</a> _strobe_bit;
<a name="l00074"></a>00074 <a class="code" href="_fast_i_o_8h.html#ae44ea3af54ef26db03f1ae2ea62f9c1f">fio_register</a> _strobe_register;
<a name="l00075"></a>00075 };
<a name="l00076"></a>00076
<a name="l00077"></a>00077 <span class="preprocessor">#endif</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Mar 4 2012 21:17:07 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,95 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: Class List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li class="current"><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">Class List</div> </div>
</div>
<div class="contents">
<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><table>
<tr><td class="indexkey"><a class="el" href="class_i2_c_i_o.html">I2CIO</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="class_l_c_d.html">LCD</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="class_liquid_crystal.html">LiquidCrystal</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="class_liquid_crystal___i2_c.html">LiquidCrystal_I2C</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="class_liquid_crystal___s_r.html">LiquidCrystal_SR</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="class_liquid_crystal___s_r2_w.html">LiquidCrystal_SR2W</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="class_liquid_crystal___s_r3_w.html">LiquidCrystal_SR3W</a></td><td class="indexvalue"></td></tr>
</table>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 677 B

View File

@ -0,0 +1,95 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">I2CIO Member List</div> </div>
</div>
<div class="contents">
This is the complete list of members for <a class="el" href="class_i2_c_i_o.html">I2CIO</a>, including all inherited members.<table>
<tr class="memlist"><td><a class="el" href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">begin</a>(uint8_t i2cAddr)</td><td><a class="el" href="class_i2_c_i_o.html">I2CIO</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_i2_c_i_o.html#ac26221011a8b49bcea9ef62712ea88a7">digitalRead</a>(uint8_t pin)</td><td><a class="el" href="class_i2_c_i_o.html">I2CIO</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_i2_c_i_o.html#a473206162522b847546777d16a7c6dcd">digitalWrite</a>(uint8_t pin, uint8_t level)</td><td><a class="el" href="class_i2_c_i_o.html">I2CIO</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_i2_c_i_o.html#a32eb7832075ad6011d67874405a0d0a6">I2CIO</a>()</td><td><a class="el" href="class_i2_c_i_o.html">I2CIO</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_i2_c_i_o.html#a53b94274eb6bb68564cf5243323db887">pinMode</a>(uint8_t pin, uint8_t dir)</td><td><a class="el" href="class_i2_c_i_o.html">I2CIO</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">portMode</a>(uint8_t dir)</td><td><a class="el" href="class_i2_c_i_o.html">I2CIO</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">read</a>(void)</td><td><a class="el" href="class_i2_c_i_o.html">I2CIO</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a>(uint8_t value)</td><td><a class="el" href="class_i2_c_i_o.html">I2CIO</a></td><td></td></tr>
</table></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,339 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: I2CIO Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">I2CIO Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="I2CIO" -->
<p><code>#include &lt;<a class="el" href="_i2_c_i_o_8h_source.html">I2CIO.h</a>&gt;</code></p>
<p><a href="class_i2_c_i_o-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html#a6f814653d903dc2ff6e8420eeb7954ae">begin</a> (uint8_t i2cAddr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html#ac26221011a8b49bcea9ef62712ea88a7">digitalRead</a> (uint8_t pin)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html#a473206162522b847546777d16a7c6dcd">digitalWrite</a> (uint8_t pin, uint8_t level)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html#a32eb7832075ad6011d67874405a0d0a6">I2CIO</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html#a53b94274eb6bb68564cf5243323db887">pinMode</a> (uint8_t pin, uint8_t dir)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html#a0341888753bc54c4384f5593a870fb34">portMode</a> (uint8_t dir)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html#a7a3db7bfc15ede0ae9e8c8bd44290ef7">read</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_i2_c_i_o.html#ae2063569c927d0008e2593d14504fdcd">write</a> (uint8_t value)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="_i2_c_i_o_8h_source.html#l00041">41</a> of file <a class="el" href="_i2_c_i_o_8h_source.html">I2CIO.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a32eb7832075ad6011d67874405a0d0a6"></a><!-- doxytag: member="I2CIO::I2CIO" ref="a32eb7832075ad6011d67874405a0d0a6" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">I2CIO::I2CIO </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Constructor method Class constructor constructor. </p>
<p>Definition at line <a class="el" href="_i2_c_i_o_8cpp_source.html#l00044">44</a> of file <a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a>.</p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a6f814653d903dc2ff6e8420eeb7954ae"></a><!-- doxytag: member="I2CIO::begin" ref="a6f814653d903dc2ff6e8420eeb7954ae" args="(uint8_t i2cAddr)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int I2CIO::begin </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>i2cAddr</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Initializes the device. This method initializes the device allocating an I2C address. This method is the first method that should be call prior to calling any other method form this class. On initialization all pins are configured as INPUT on the device.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">i2cAddr,:</td><td>I2C Address where the device is located. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>1 if the device was initialized correctly, 0 otherwise </dd></dl>
<p>Definition at line <a class="el" href="_i2_c_i_o_8cpp_source.html#l00057">57</a> of file <a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ac26221011a8b49bcea9ef62712ea88a7"></a><!-- doxytag: member="I2CIO::digitalRead" ref="ac26221011a8b49bcea9ef62712ea88a7" args="(uint8_t pin)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t I2CIO::digitalRead </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>pin</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Read a pin from the device. Reads a particular pin from the device. To read a particular pin it has to be configured as INPUT. During initialization all pins are configured as INPUTs by default. Please refer to pinMode or portMode.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pin[in]</td><td>Pin from the port to read its status. Range (0..7) </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns the pin status (HIGH, LOW) if the pin is configured as an output, reading its value will always return LOW regardless of its real state. </dd></dl>
<p>Definition at line <a class="el" href="_i2_c_i_o_8cpp_source.html#l00153">153</a> of file <a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a473206162522b847546777d16a7c6dcd"></a><!-- doxytag: member="I2CIO::digitalWrite" ref="a473206162522b847546777d16a7c6dcd" args="(uint8_t pin, uint8_t level)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int I2CIO::digitalWrite </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>pin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>level</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Writes a digital level to a particular pin. Write a level to the indicated pin of the device. For this method to have effect, the pin has to be configured as OUTPUT using the pinMode or portMode methods.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pin[in]</td><td>device pin to change level. Range (0..7). level[in] logic level to set the pin at (HIGH, LOW). </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>1 on success, 0 otherwise. </dd></dl>
<p>Definition at line <a class="el" href="_i2_c_i_o_8cpp_source.html#l00170">170</a> of file <a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a53b94274eb6bb68564cf5243323db887"></a><!-- doxytag: member="I2CIO::pinMode" ref="a53b94274eb6bb68564cf5243323db887" args="(uint8_t pin, uint8_t dir)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2CIO::pinMode </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>pin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>dir</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the mode of a particular pin. Sets the mode of a particular pin to INPUT, OUTPUT. digitalWrite has no effect on pins which are not declared as output.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pin[in]</td><td>Pin from the I2C IO expander to be configured. Range 0..7 </td></tr>
<tr><td class="paramname">dir[in]</td><td>Pin direction (INPUT, OUTPUT). </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_i2_c_i_o_8cpp_source.html#l00076">76</a> of file <a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a0341888753bc54c4384f5593a870fb34"></a><!-- doxytag: member="I2CIO::portMode" ref="a0341888753bc54c4384f5593a870fb34" args="(uint8_t dir)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void I2CIO::portMode </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>dir</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets all the pins of the device in a particular direction. This method sets all the pins of the device in a particular direction. This method is useful to set all the pins of the device to be either inputs or outputs. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">dir[in]</td><td>Direction of all the pins of the device (INPUT, OUTPUT). </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_i2_c_i_o_8cpp_source.html#l00093">93</a> of file <a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a7a3db7bfc15ede0ae9e8c8bd44290ef7"></a><!-- doxytag: member="I2CIO::read" ref="a7a3db7bfc15ede0ae9e8c8bd44290ef7" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t I2CIO::read </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Reads all the pins of the device that are configured as INPUT. Reads from the device the status of the pins that are configured as INPUT. During initialization all pins are configured as INPUTs by default. Please refer to pinMode or portMode.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_i2_c_i_o_8cpp_source.html#l00111">111</a> of file <a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ae2063569c927d0008e2593d14504fdcd"></a><!-- doxytag: member="I2CIO::write" ref="ae2063569c927d0008e2593d14504fdcd" args="(uint8_t value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int I2CIO::write </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Write a value to the device. Writes to a set of pins in the device. The value is the binary representation of all the pins in device. The value written is masked with the configuration of the direction of the pins; to change the state of a particular pin with this method, such pin has to be configured as OUTPUT using the portMode or pinMode methods. If no pins have been configured as OUTPUTs this method will have no effect.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">value[in]</td><td>value to be written to the device. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>1 on success, 0 otherwise </dd></dl>
<p>Definition at line <a class="el" href="_i2_c_i_o_8cpp_source.html#l00130">130</a> of file <a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_i2_c_i_o_8h_source.html">I2CIO.h</a></li>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_i2_c_i_o_8cpp_source.html">I2CIO.cpp</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,120 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">LCD Member List</div> </div>
</div>
<div class="contents">
This is the complete list of members for <a class="el" href="class_l_c_d.html">LCD</a>, including all inherited members.<table>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a88b16ea0e5c7d1cabc5007d48bcbd2b0">_cols</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ac1374911fb145fea430c21092ada0c06">_numlines</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#abb3ed88d530f6283e6159b4973e7da9e">autoscroll</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a3f587d1cbb2d59765ef60a5216b56fea">begin</a>(uint8_t cols, uint8_t rows, uint8_t charsize=LCD_5x8DOTS)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a878b36878fa8287093964eba83aace77">blink</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#afa699e0beeeee03cce8cef87eba81c4a">clear</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a91cba8f93c692abcddf8bc3de58d2d3a">createChar</a>(uint8_t location, uint8_t charmap[])</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a194814f64dfa50a90e07e0fe0d361620">cursor</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a5b07cf05e8e5e7c53654f5ca0cf58b89">display</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aee45ad37f09312f5d9982257e2d37e68">home</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a00bb2db1390721abc7b24ac4b8c276c8">LCD</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a238e9f6476dc7df64af04eb6c87f6ac7">leftToRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aad2abc99d1aca5403873579d9d72c2d4">moveCursorLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a09eec0c712e54b066f5894635c1fe75c">moveCursorRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a96035dde40efbf73390e00b5beb00231">noAutoscroll</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a2a331b4e142734411b2f1cfaffe7a488">noBacklight</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a3b755c4b397b5985752be8c30ee1a9b5">noBlink</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aec8ffaa1e69c7a6e13ac0cfbc29151d9">noCursor</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#af3974da6d988ba2d21c25135ada12108">noDisplay</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a191639be183be1476c9bfe6d455d23b2">off</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a718da3a638deb59bd1c7a5222a52d98a">on</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ac014830eadc26bfd86308ea8734f4428">rightToLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a6f3a503055b3b8dcf0f61b2633c584f7">scrollDisplayLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#abfc44b294772f09020bfa32af8a79571">scrollDisplayRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a3305570d7b37eb93f2cf840263c15828">setBacklight</a>(uint8_t value)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [inline, virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a53f4ee9b39d9ab3d7ae4d9f8dedca3bc">setBacklightPin</a>(uint8_t value, t_backlighPol pol)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [inline, virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a48220450fd152b25994eb7d0ba340e8d">setCursor</a>(uint8_t col, uint8_t row)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">write</a>(uint8_t value)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [virtual]</code></td></tr>
</table></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,982 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: LCD Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> </div>
<div class="headertitle">
<div class="title">LCD Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="LCD" -->
<p><code>#include &lt;<a class="el" href="_l_c_d_8h_source.html">LCD.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for LCD:</div>
<div class="dyncontent">
<div class="center">
<img src="class_l_c_d.png" usemap="#LCD_map" alt=""/>
<map id="LCD_map" name="LCD_map">
<area href="class_liquid_crystal.html" alt="LiquidCrystal" shape="rect" coords="0,56,126,80"/>
<area href="class_liquid_crystal___i2_c.html" alt="LiquidCrystal_I2C" shape="rect" coords="136,56,262,80"/>
<area href="class_liquid_crystal___s_r.html" alt="LiquidCrystal_SR" shape="rect" coords="272,56,398,80"/>
<area href="class_liquid_crystal___s_r2_w.html" alt="LiquidCrystal_SR2W" shape="rect" coords="408,56,534,80"/>
<area href="class_liquid_crystal___s_r3_w.html" alt="LiquidCrystal_SR3W" shape="rect" coords="544,56,670,80"/>
</map>
</div></div>
<p><a href="class_l_c_d-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#abb3ed88d530f6283e6159b4973e7da9e">autoscroll</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a3f587d1cbb2d59765ef60a5216b56fea">begin</a> (uint8_t cols, uint8_t rows, uint8_t charsize=LCD_5x8DOTS)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a878b36878fa8287093964eba83aace77">blink</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#afa699e0beeeee03cce8cef87eba81c4a">clear</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a91cba8f93c692abcddf8bc3de58d2d3a">createChar</a> (uint8_t location, uint8_t charmap[])</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a194814f64dfa50a90e07e0fe0d361620">cursor</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a5b07cf05e8e5e7c53654f5ca0cf58b89">display</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#aee45ad37f09312f5d9982257e2d37e68">home</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a00bb2db1390721abc7b24ac4b8c276c8">LCD</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a238e9f6476dc7df64af04eb6c87f6ac7">leftToRight</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#aad2abc99d1aca5403873579d9d72c2d4">moveCursorLeft</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a09eec0c712e54b066f5894635c1fe75c">moveCursorRight</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a96035dde40efbf73390e00b5beb00231">noAutoscroll</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a2a331b4e142734411b2f1cfaffe7a488">noBacklight</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a3b755c4b397b5985752be8c30ee1a9b5">noBlink</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#aec8ffaa1e69c7a6e13ac0cfbc29151d9">noCursor</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#af3974da6d988ba2d21c25135ada12108">noDisplay</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a191639be183be1476c9bfe6d455d23b2">off</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a718da3a638deb59bd1c7a5222a52d98a">on</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#ac014830eadc26bfd86308ea8734f4428">rightToLeft</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a6f3a503055b3b8dcf0f61b2633c584f7">scrollDisplayLeft</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#abfc44b294772f09020bfa32af8a79571">scrollDisplayRight</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a3305570d7b37eb93f2cf840263c15828">setBacklight</a> (uint8_t value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a53f4ee9b39d9ab3d7ae4d9f8dedca3bc">setBacklightPin</a> (uint8_t value, <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a48220450fd152b25994eb7d0ba340e8d">setCursor</a> (uint8_t col, uint8_t row)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">write</a> (uint8_t value)</td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a88b16ea0e5c7d1cabc5007d48bcbd2b0">_cols</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#ac1374911fb145fea430c21092ada0c06">_numlines</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00169">169</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a00bb2db1390721abc7b24ac4b8c276c8"></a><!-- doxytag: member="LCD::LCD" ref="a00bb2db1390721abc7b24ac4b8c276c8" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LCD::LCD </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="class_liquid_crystal.html">LiquidCrystal</a> abstract constructor. <a class="el" href="class_liquid_crystal.html">LiquidCrystal</a> class abstract constructor needed to create the base abstract class. </p>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00049">49</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="abb3ed88d530f6283e6159b4973e7da9e"></a><!-- doxytag: member="LCD::autoscroll" ref="abb3ed88d530f6283e6159b4973e7da9e" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::autoscroll </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Turns on automatic scrolling of the <a class="el" href="class_l_c_d.html">LCD</a>. Turns on automatic scrolling of the <a class="el" href="class_l_c_d.html">LCD</a>. This causes each character output to the display to push previous characters over by one space. If the current text direction is left-to-right (the default), the display scrolls to the left; if the current direction is right-to-left, the display scrolls to the right. This has the effect of outputting each new character to the same location on the <a class="el" href="class_l_c_d.html">LCD</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00271">271</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="aba8867fe2210cbfa8db869208709be10"></a><!-- doxytag: member="LCD::backlight" ref="aba8867fe2210cbfa8db869208709be10" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::backlight </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Switch-on the <a class="el" href="class_l_c_d.html">LCD</a> backlight. Switch-on the <a class="el" href="class_l_c_d.html">LCD</a> backlight. The setBacklightPin has to be called before setting the backlight for this method to work. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_l_c_d.html#a53f4ee9b39d9ab3d7ae4d9f8dedca3bc">setBacklightPin</a>. </dd></dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00301">301</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a3f587d1cbb2d59765ef60a5216b56fea"></a><!-- doxytag: member="LCD::begin" ref="a3f587d1cbb2d59765ef60a5216b56fea" args="(uint8_t cols, uint8_t rows, uint8_t charsize=LCD_5x8DOTS)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::begin </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>cols</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>rows</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>charsize</em> = <code>LCD_5x8DOTS</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="class_l_c_d.html">LCD</a> initialization. Initializes the <a class="el" href="class_l_c_d.html">LCD</a> to a given size (col, row). This methods initializes the <a class="el" href="class_l_c_d.html">LCD</a>, therefore, it MUST be called prior to using any other method from this class.</p>
<p>This method is abstract, a base implementation is available common to all <a class="el" href="class_l_c_d.html">LCD</a> drivers. Should it not be compatible with some other <a class="el" href="class_l_c_d.html">LCD</a> driver, a derived implementation should be done on the driver specif class.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">cols[in]</td><td>the number of columns that the display has </td></tr>
<tr><td class="paramname">rows[in]</td><td>the number of rows that the display has </td></tr>
<tr><td class="paramname">charsize[in]</td><td>character size, default==LCD_5x8DOTS </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented in <a class="el" href="class_liquid_crystal___i2_c.html#aeee2ada537f0cfbfda8613324b57c4a6">LiquidCrystal_I2C</a>.</p>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00076">76</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a878b36878fa8287093964eba83aace77"></a><!-- doxytag: member="LCD::blink" ref="a878b36878fa8287093964eba83aace77" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::blink </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Display the cursor of the <a class="el" href="class_l_c_d.html">LCD</a>. Display the blinking <a class="el" href="class_l_c_d.html">LCD</a> cursor. If used in combination with the <a class="el" href="class_l_c_d.html#a194814f64dfa50a90e07e0fe0d361620">cursor()</a> function, the result will depend on the particular display.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00226">226</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="afa699e0beeeee03cce8cef87eba81c4a"></a><!-- doxytag: member="LCD::clear" ref="afa699e0beeeee03cce8cef87eba81c4a" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::clear </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Clears the <a class="el" href="class_l_c_d.html">LCD</a>. Clears the <a class="el" href="class_l_c_d.html">LCD</a> screen and positions the cursor in the upper-left corner.</p>
<p>This operation is time consuming for the <a class="el" href="class_l_c_d.html">LCD</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00159">159</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a91cba8f93c692abcddf8bc3de58d2d3a"></a><!-- doxytag: member="LCD::createChar" ref="a91cba8f93c692abcddf8bc3de58d2d3a" args="(uint8_t location, uint8_t charmap[])" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::createChar </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>location</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>charmap</em>[]&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a custom character for use on the <a class="el" href="class_l_c_d.html">LCD</a>. Create a custom character (glyph) for use on the <a class="el" href="class_l_c_d.html">LCD</a>. Most chipsets only support up to eight characters of 5x8 pixels. Therefore, this methods has been limited to locations (numbered 0 to 7).</p>
<p>The appearance of each custom character is specified by an array of eight bytes, one for each row. The five least significant bits of each byte determine the pixels in that row. To display a custom character on screen, <a class="el" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">write()</a>/print() its number, i.e. lcd.print (char(x)); // Where x is 0..7.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">location[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> memory location of the character to create (0 to 7) </td></tr>
<tr><td class="paramname">charmap[in]</td><td>the bitmap array representing each row of the character. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00285">285</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a194814f64dfa50a90e07e0fe0d361620"></a><!-- doxytag: member="LCD::cursor" ref="a194814f64dfa50a90e07e0fe0d361620" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::cursor </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Display the <a class="el" href="class_l_c_d.html">LCD</a> cursor. Display the <a class="el" href="class_l_c_d.html">LCD</a> cursor: an underscore (line) at the location where the next character will be written.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00213">213</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a5b07cf05e8e5e7c53654f5ca0cf58b89"></a><!-- doxytag: member="LCD::display" ref="a5b07cf05e8e5e7c53654f5ca0cf58b89" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::display </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Turns on the <a class="el" href="class_l_c_d.html">LCD</a> display. Turns on the <a class="el" href="class_l_c_d.html">LCD</a> display, after it's been turned off with <a class="el" href="class_l_c_d.html#af3974da6d988ba2d21c25135ada12108">noDisplay()</a>. This will restore the text (and cursor location) that was on the display prior to calling <a class="el" href="class_l_c_d.html#af3974da6d988ba2d21c25135ada12108">noDisplay()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00201">201</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="aee45ad37f09312f5d9982257e2d37e68"></a><!-- doxytag: member="LCD::home" ref="aee45ad37f09312f5d9982257e2d37e68" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::home </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the cursor to the upper-left corner. Positions the cursor in the upper-left of the <a class="el" href="class_l_c_d.html">LCD</a>. That is, use that location in outputting subsequent text to the display. To also clear the display, use the <a class="el" href="class_l_c_d.html#afa699e0beeeee03cce8cef87eba81c4a">clear()</a> function instead.</p>
<p>This operation is time consuming for the <a class="el" href="class_l_c_d.html">LCD</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00165">165</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a238e9f6476dc7df64af04eb6c87f6ac7"></a><!-- doxytag: member="LCD::leftToRight" ref="a238e9f6476dc7df64af04eb6c87f6ac7" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::leftToRight </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the direction for text written to the <a class="el" href="class_l_c_d.html">LCD</a> to left-to-right. Set the direction for text written to the <a class="el" href="class_l_c_d.html">LCD</a> to left-to-right. All subsequent characters written to the display will go from left to right, but does not affect previously-output text.</p>
<p>This is the default configuration.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00244">244</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="aad2abc99d1aca5403873579d9d72c2d4"></a><!-- doxytag: member="LCD::moveCursorLeft" ref="aad2abc99d1aca5403873579d9d72c2d4" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::moveCursorLeft </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Moves the cursor one space to the left. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00264">264</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a09eec0c712e54b066f5894635c1fe75c"></a><!-- doxytag: member="LCD::moveCursorRight" ref="a09eec0c712e54b066f5894635c1fe75c" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::moveCursorRight </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Moves the cursor one space to the right.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00258">258</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a96035dde40efbf73390e00b5beb00231"></a><!-- doxytag: member="LCD::noAutoscroll" ref="a96035dde40efbf73390e00b5beb00231" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::noAutoscroll </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Turns off automatic scrolling of the <a class="el" href="class_l_c_d.html">LCD</a>. Turns off automatic scrolling of the <a class="el" href="class_l_c_d.html">LCD</a>, this is the default configuration of the <a class="el" href="class_l_c_d.html">LCD</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00278">278</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a2a331b4e142734411b2f1cfaffe7a488"></a><!-- doxytag: member="LCD::noBacklight" ref="a2a331b4e142734411b2f1cfaffe7a488" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::noBacklight </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Switch-off the <a class="el" href="class_l_c_d.html">LCD</a> backlight. Switch-off the <a class="el" href="class_l_c_d.html">LCD</a> backlight. The setBacklightPin has to be called before setting the backlight for this method to work. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_l_c_d.html#a53f4ee9b39d9ab3d7ae4d9f8dedca3bc">setBacklightPin</a>. </dd></dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00308">308</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a3b755c4b397b5985752be8c30ee1a9b5"></a><!-- doxytag: member="LCD::noBlink" ref="a3b755c4b397b5985752be8c30ee1a9b5" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::noBlink </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Turns off the blinking of the <a class="el" href="class_l_c_d.html">LCD</a> cursor.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00220">220</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="aec8ffaa1e69c7a6e13ac0cfbc29151d9"></a><!-- doxytag: member="LCD::noCursor" ref="aec8ffaa1e69c7a6e13ac0cfbc29151d9" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::noCursor </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Hides the <a class="el" href="class_l_c_d.html">LCD</a> cursor.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00208">208</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="af3974da6d988ba2d21c25135ada12108"></a><!-- doxytag: member="LCD::noDisplay" ref="af3974da6d988ba2d21c25135ada12108" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::noDisplay </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Turns off the <a class="el" href="class_l_c_d.html">LCD</a> display. Turns off the <a class="el" href="class_l_c_d.html">LCD</a> display, without losing the text currently being displayed on it.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00195">195</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a191639be183be1476c9bfe6d455d23b2"></a><!-- doxytag: member="LCD::off" ref="a191639be183be1476c9bfe6d455d23b2" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::off </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Switch off the <a class="el" href="class_l_c_d.html">LCD</a> module. Switch off the <a class="el" href="class_l_c_d.html">LCD</a> module, it will switch off the <a class="el" href="class_l_c_d.html">LCD</a> controller and the backlight. This method has the same effect of calling noDisplay and noBacklight. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_l_c_d.html#a5b07cf05e8e5e7c53654f5ca0cf58b89">display</a>, </dd>
<dd>
<a class="el" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a> </dd></dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00323">323</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a718da3a638deb59bd1c7a5222a52d98a"></a><!-- doxytag: member="LCD::on" ref="a718da3a638deb59bd1c7a5222a52d98a" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::on </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Switch on the <a class="el" href="class_l_c_d.html">LCD</a> module. Switch on the <a class="el" href="class_l_c_d.html">LCD</a> module, it will switch on the <a class="el" href="class_l_c_d.html">LCD</a> controller and the backlight. This method has the same effect of calling display and backlight. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_l_c_d.html#a5b07cf05e8e5e7c53654f5ca0cf58b89">display</a>, </dd>
<dd>
<a class="el" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a> </dd></dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00315">315</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ac014830eadc26bfd86308ea8734f4428"></a><!-- doxytag: member="LCD::rightToLeft" ref="ac014830eadc26bfd86308ea8734f4428" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::rightToLeft </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Set the direction for text written to the <a class="el" href="class_l_c_d.html">LCD</a> to right-to-left. Set the direction for text written to the <a class="el" href="class_l_c_d.html">LCD</a> to right-to-left. All subsequent characters written to the display will go from right to left, but does not affect previously-output text.</p>
<p>left-to-right is the default configuration.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00251">251</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a6f3a503055b3b8dcf0f61b2633c584f7"></a><!-- doxytag: member="LCD::scrollDisplayLeft" ref="a6f3a503055b3b8dcf0f61b2633c584f7" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::scrollDisplayLeft </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Scrolls the contents of the display (text and cursor) one space to the left.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00233">233</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="abfc44b294772f09020bfa32af8a79571"></a><!-- doxytag: member="LCD::scrollDisplayRight" ref="abfc44b294772f09020bfa32af8a79571" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::scrollDisplayRight </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Scrolls the contents of the display (text and cursor) one space to the right.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">none</td><td></td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00238">238</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a3305570d7b37eb93f2cf840263c15828"></a><!-- doxytag: member="LCD::setBacklight" ref="a3305570d7b37eb93f2cf840263c15828" args="(uint8_t value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void LCD::setBacklight </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the pin to control the backlight. Sets the pin in the device to control the backlight. The behaviour of this method is very dependent on the device. Some controllers support dimming some don't. Please read the actual header file for each individual device. The setBacklightPin method has to be called before setting the backlight or the adequate backlight control constructor. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_l_c_d.html#a53f4ee9b39d9ab3d7ae4d9f8dedca3bc">setBacklightPin</a>.</dd></dl>
<p>NOTE: The prefered methods to control the backlight are "backlight" and "noBacklight".</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">0..255</td><td>- the value is very dependent on the <a class="el" href="class_l_c_d.html">LCD</a>. However, BACKLIGHT_OFF will be interpreted as off and BACKLIGHT_ON will drive the backlight on. </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented in <a class="el" href="class_liquid_crystal.html#aa2b898366e1c656ac313b9007c98cebd">LiquidCrystal</a>, <a class="el" href="class_liquid_crystal___i2_c.html#af11b8fa0082616e2b6e6e4238589d8a8">LiquidCrystal_I2C</a>, <a class="el" href="class_liquid_crystal___s_r.html#ad9f3e3f36257984c23fb508973e14535">LiquidCrystal_SR</a>, <a class="el" href="class_liquid_crystal___s_r2_w.html#a2158db27287c1564a03e7a1472beb3b6">LiquidCrystal_SR2W</a>, and <a class="el" href="class_liquid_crystal___s_r3_w.html#a6d0fc7907ef9fd87c408a21b9bd49295">LiquidCrystal_SR3W</a>.</p>
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00463">463</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a53f4ee9b39d9ab3d7ae4d9f8dedca3bc"></a><!-- doxytag: member="LCD::setBacklightPin" ref="a53f4ee9b39d9ab3d7ae4d9f8dedca3bc" args="(uint8_t value, t_backlighPol pol)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual void LCD::setBacklightPin </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>&#160;</td>
<td class="paramname"><em>pol</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the pin to control the backlight. Sets the pin in the device to control the backlight. This method is device dependent and can be programmed on each subclass. An empty function call is provided that does nothing.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">value,:</td><td>pin associated to backlight control. </td></tr>
<tr><td class="paramname">pol,:</td><td>backlight polarity control (POSITIVE, NEGATIVE) </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented in <a class="el" href="class_liquid_crystal.html#a63740dc1198d8169a39d9c6daff0efc9">LiquidCrystal</a>, <a class="el" href="class_liquid_crystal___i2_c.html#a2eaf86f62d1f169b3763b03fbf88f70b">LiquidCrystal_I2C</a>, <a class="el" href="class_liquid_crystal___s_r.html#a5bfc0dcc1f042bcb59992493a3a7231d">LiquidCrystal_SR</a>, and <a class="el" href="class_liquid_crystal___s_r3_w.html#a894d0ea8ea61c1d15acd8a26d417e477">LiquidCrystal_SR3W</a>.</p>
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00444">444</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a48220450fd152b25994eb7d0ba340e8d"></a><!-- doxytag: member="LCD::setCursor" ref="a48220450fd152b25994eb7d0ba340e8d" args="(uint8_t col, uint8_t row)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::setCursor </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>col</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>row</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Position the <a class="el" href="class_l_c_d.html">LCD</a> cursor. Sets the position of the <a class="el" href="class_l_c_d.html">LCD</a> cursor. Set the location at which subsequent text written to the <a class="el" href="class_l_c_d.html">LCD</a> will be displayed.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">col[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> column </td></tr>
<tr><td class="paramname">row[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> row - line. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00171">171</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a2d89cc2e62f72afb5f15a7fd812900e3"></a><!-- doxytag: member="LCD::write" ref="a2d89cc2e62f72afb5f15a7fd812900e3" args="(uint8_t value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LCD::write </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Writes to the <a class="el" href="class_l_c_d.html">LCD</a>. This method writes character to the <a class="el" href="class_l_c_d.html">LCD</a> in the current cursor position.</p>
<p>This is the virtual write method, implemented in the Print class, therefore all Print class methods will end up calling this method.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">value[in]</td><td>Value to write to the <a class="el" href="class_l_c_d.html">LCD</a>. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_l_c_d_8cpp_source.html#l00337">337</a> of file <a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a>.</p>
</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a88b16ea0e5c7d1cabc5007d48bcbd2b0"></a><!-- doxytag: member="LCD::_cols" ref="a88b16ea0e5c7d1cabc5007d48bcbd2b0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="class_l_c_d.html#a88b16ea0e5c7d1cabc5007d48bcbd2b0">LCD::_cols</a><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00497">497</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="ae47a0e2eff74431a39774b788d5761f4"></a><!-- doxytag: member="LCD::_displaycontrol" ref="ae47a0e2eff74431a39774b788d5761f4" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">LCD::_displaycontrol</a><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00493">493</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="aef093ba3f8e1016267b40ac235a0fa0f"></a><!-- doxytag: member="LCD::_displayfunction" ref="aef093ba3f8e1016267b40ac235a0fa0f" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">LCD::_displayfunction</a><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00491">491</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a726b9a68d091dd8683a18e83f3a8fd3c"></a><!-- doxytag: member="LCD::_displaymode" ref="a726b9a68d091dd8683a18e83f3a8fd3c" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">LCD::_displaymode</a><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00495">495</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="ac1374911fb145fea430c21092ada0c06"></a><!-- doxytag: member="LCD::_numlines" ref="ac1374911fb145fea430c21092ada0c06" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t <a class="el" href="class_l_c_d.html#ac1374911fb145fea430c21092ada0c06">LCD::_numlines</a><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00496">496</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<a class="anchor" id="a990338759d2abe10b0fb1743b7789566"></a><!-- doxytag: member="LCD::_polarity" ref="a990338759d2abe10b0fb1743b7789566" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> <a class="el" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">LCD::_polarity</a><code> [protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_l_c_d_8h_source.html#l00498">498</a> of file <a class="el" href="_l_c_d_8h_source.html">LCD.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_l_c_d_8h_source.html">LCD.h</a></li>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_l_c_d_8cpp_source.html">LCD.cpp</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

View File

@ -0,0 +1,129 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">LiquidCrystal Member List</div> </div>
</div>
<div class="contents">
This is the complete list of members for <a class="el" href="class_liquid_crystal.html">LiquidCrystal</a>, including all inherited members.<table>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a88b16ea0e5c7d1cabc5007d48bcbd2b0">_cols</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ac1374911fb145fea430c21092ada0c06">_numlines</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#abb3ed88d530f6283e6159b4973e7da9e">autoscroll</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a3f587d1cbb2d59765ef60a5216b56fea">begin</a>(uint8_t cols, uint8_t rows, uint8_t charsize=LCD_5x8DOTS)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a878b36878fa8287093964eba83aace77">blink</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#afa699e0beeeee03cce8cef87eba81c4a">clear</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a91cba8f93c692abcddf8bc3de58d2d3a">createChar</a>(uint8_t location, uint8_t charmap[])</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a194814f64dfa50a90e07e0fe0d361620">cursor</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a5b07cf05e8e5e7c53654f5ca0cf58b89">display</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aee45ad37f09312f5d9982257e2d37e68">home</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a00bb2db1390721abc7b24ac4b8c276c8">LCD</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a238e9f6476dc7df64af04eb6c87f6ac7">leftToRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a>(uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)</td><td><a class="el" href="class_liquid_crystal.html">LiquidCrystal</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal.html#a30e3d865c4b4a003a36cb45903f93644">LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)</td><td><a class="el" href="class_liquid_crystal.html">LiquidCrystal</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal.html#aff2330186495fde93370d46c0ca2cbf0">LiquidCrystal</a>(uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t backlightPin, t_backlighPol pol)</td><td><a class="el" href="class_liquid_crystal.html">LiquidCrystal</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal.html#ae0c3c8f7661634b1400f00a1c9c02c26">LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t backlightPin, t_backlighPol pol)</td><td><a class="el" href="class_liquid_crystal.html">LiquidCrystal</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal.html#a0a0a8dfa7a2e775a031fd65f5c6366ec">LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)</td><td><a class="el" href="class_liquid_crystal.html">LiquidCrystal</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal.html#a23124e6dd5ac4a9b6147629b96e91953">LiquidCrystal</a>(uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)</td><td><a class="el" href="class_liquid_crystal.html">LiquidCrystal</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal.html#a8b90122c67a6d14b967c8a11ba490670">LiquidCrystal</a>(uint8_t rs, uint8_t rw, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t backlightPin, t_backlighPol pol)</td><td><a class="el" href="class_liquid_crystal.html">LiquidCrystal</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal.html#a52a4de3d866e347208a32dfc9d797729">LiquidCrystal</a>(uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t backlightPin, t_backlighPol pol)</td><td><a class="el" href="class_liquid_crystal.html">LiquidCrystal</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aad2abc99d1aca5403873579d9d72c2d4">moveCursorLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a09eec0c712e54b066f5894635c1fe75c">moveCursorRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a96035dde40efbf73390e00b5beb00231">noAutoscroll</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a2a331b4e142734411b2f1cfaffe7a488">noBacklight</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a3b755c4b397b5985752be8c30ee1a9b5">noBlink</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aec8ffaa1e69c7a6e13ac0cfbc29151d9">noCursor</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#af3974da6d988ba2d21c25135ada12108">noDisplay</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a191639be183be1476c9bfe6d455d23b2">off</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a718da3a638deb59bd1c7a5222a52d98a">on</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ac014830eadc26bfd86308ea8734f4428">rightToLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a6f3a503055b3b8dcf0f61b2633c584f7">scrollDisplayLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#abfc44b294772f09020bfa32af8a79571">scrollDisplayRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal.html#a56142f8b3753bedd133e4139e5eb5089">send</a>(uint8_t value, uint8_t mode)</td><td><a class="el" href="class_liquid_crystal.html">LiquidCrystal</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal.html#aa2b898366e1c656ac313b9007c98cebd">setBacklight</a>(uint8_t value)</td><td><a class="el" href="class_liquid_crystal.html">LiquidCrystal</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal.html#a63740dc1198d8169a39d9c6daff0efc9">setBacklightPin</a>(uint8_t pin, t_backlighPol pol)</td><td><a class="el" href="class_liquid_crystal.html">LiquidCrystal</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a48220450fd152b25994eb7d0ba340e8d">setCursor</a>(uint8_t col, uint8_t row)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">write</a>(uint8_t value)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [virtual]</code></td></tr>
</table></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,827 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: LiquidCrystal Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">LiquidCrystal Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="LiquidCrystal" --><!-- doxytag: inherits="LCD" -->
<p><code>#include &lt;<a class="el" href="_liquid_crystal_8h_source.html">LiquidCrystal.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for LiquidCrystal:</div>
<div class="dyncontent">
<div class="center">
<img src="class_liquid_crystal.png" usemap="#LiquidCrystal_map" alt=""/>
<map id="LiquidCrystal_map" name="LiquidCrystal_map">
<area href="class_l_c_d.html" alt="LCD" shape="rect" coords="0,0,85,24"/>
</map>
</div></div>
<p><a href="class_liquid_crystal-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal.html#a49d2bd8d26031a1c83bcbd73978a1686">LiquidCrystal</a> (uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal.html#a30e3d865c4b4a003a36cb45903f93644">LiquidCrystal</a> (uint8_t rs, uint8_t rw, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal.html#ae0c3c8f7661634b1400f00a1c9c02c26">LiquidCrystal</a> (uint8_t rs, uint8_t rw, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t backlightPin, <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal.html#a52a4de3d866e347208a32dfc9d797729">LiquidCrystal</a> (uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t backlightPin, <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal.html#a0a0a8dfa7a2e775a031fd65f5c6366ec">LiquidCrystal</a> (uint8_t rs, uint8_t rw, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal.html#a8b90122c67a6d14b967c8a11ba490670">LiquidCrystal</a> (uint8_t rs, uint8_t rw, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t backlightPin, <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal.html#a23124e6dd5ac4a9b6147629b96e91953">LiquidCrystal</a> (uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal.html#aff2330186495fde93370d46c0ca2cbf0">LiquidCrystal</a> (uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t backlightPin, <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal.html#a56142f8b3753bedd133e4139e5eb5089">send</a> (uint8_t value, uint8_t mode)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal.html#aa2b898366e1c656ac313b9007c98cebd">setBacklight</a> (uint8_t value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal.html#a63740dc1198d8169a39d9c6daff0efc9">setBacklightPin</a> (uint8_t pin, <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="_liquid_crystal_8h_source.html#l00044">44</a> of file <a class="el" href="_liquid_crystal_8h_source.html">LiquidCrystal.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a49d2bd8d26031a1c83bcbd73978a1686"></a><!-- doxytag: member="LiquidCrystal::LiquidCrystal" ref="a49d2bd8d26031a1c83bcbd73978a1686" args="(uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal::LiquidCrystal </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>rs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>enable</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d3</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d4</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d5</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d6</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d7</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>8 bit <a class="el" href="class_l_c_d.html">LCD</a> constructors. Defines the pin assignment that the <a class="el" href="class_l_c_d.html">LCD</a> will have. The constructor does not initialize the <a class="el" href="class_l_c_d.html">LCD</a>. </p>
<p>Definition at line <a class="el" href="_liquid_crystal_8cpp_source.html#l00055">55</a> of file <a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a30e3d865c4b4a003a36cb45903f93644"></a><!-- doxytag: member="LiquidCrystal::LiquidCrystal" ref="a30e3d865c4b4a003a36cb45903f93644" args="(uint8_t rs, uint8_t rw, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal::LiquidCrystal </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>rs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>rw</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>enable</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d3</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d4</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d5</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d6</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d7</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal_8cpp_source.html#l00062">62</a> of file <a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="aff2330186495fde93370d46c0ca2cbf0"></a><!-- doxytag: member="LiquidCrystal::LiquidCrystal" ref="aff2330186495fde93370d46c0ca2cbf0" args="(uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t backlightPin, t_backlighPol pol)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal::LiquidCrystal </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>rs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>enable</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d3</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d4</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d5</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d6</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d7</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>backlightPin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>&#160;</td>
<td class="paramname"><em>pol</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal_8cpp_source.html#l00082">82</a> of file <a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ae0c3c8f7661634b1400f00a1c9c02c26"></a><!-- doxytag: member="LiquidCrystal::LiquidCrystal" ref="ae0c3c8f7661634b1400f00a1c9c02c26" args="(uint8_t rs, uint8_t rw, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t backlightPin, t_backlighPol pol)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal::LiquidCrystal </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>rs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>rw</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>enable</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d3</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d4</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d5</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d6</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d7</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>backlightPin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>&#160;</td>
<td class="paramname"><em>pol</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal_8cpp_source.html#l00091">91</a> of file <a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a0a0a8dfa7a2e775a031fd65f5c6366ec"></a><!-- doxytag: member="LiquidCrystal::LiquidCrystal" ref="a0a0a8dfa7a2e775a031fd65f5c6366ec" args="(uint8_t rs, uint8_t rw, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal::LiquidCrystal </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>rs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>rw</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>enable</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d3</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>4 bit <a class="el" href="class_l_c_d.html">LCD</a> constructors. Defines the pin assignment that the <a class="el" href="class_l_c_d.html">LCD</a> will have. The constructor does not initialize the <a class="el" href="class_l_c_d.html">LCD</a>. </p>
<p>Definition at line <a class="el" href="_liquid_crystal_8cpp_source.html#l00069">69</a> of file <a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a23124e6dd5ac4a9b6147629b96e91953"></a><!-- doxytag: member="LiquidCrystal::LiquidCrystal" ref="a23124e6dd5ac4a9b6147629b96e91953" args="(uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal::LiquidCrystal </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>rs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>enable</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d3</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal_8cpp_source.html#l00075">75</a> of file <a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a8b90122c67a6d14b967c8a11ba490670"></a><!-- doxytag: member="LiquidCrystal::LiquidCrystal" ref="a8b90122c67a6d14b967c8a11ba490670" args="(uint8_t rs, uint8_t rw, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t backlightPin, t_backlighPol pol)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal::LiquidCrystal </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>rs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>rw</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>enable</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d3</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>backlightPin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>&#160;</td>
<td class="paramname"><em>pol</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal_8cpp_source.html#l00100">100</a> of file <a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a52a4de3d866e347208a32dfc9d797729"></a><!-- doxytag: member="LiquidCrystal::LiquidCrystal" ref="a52a4de3d866e347208a32dfc9d797729" args="(uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t backlightPin, t_backlighPol pol)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal::LiquidCrystal </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>rs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>enable</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d3</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>backlightPin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>&#160;</td>
<td class="paramname"><em>pol</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal_8cpp_source.html#l00108">108</a> of file <a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a>.</p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a56142f8b3753bedd133e4139e5eb5089"></a><!-- doxytag: member="LiquidCrystal::send" ref="a56142f8b3753bedd133e4139e5eb5089" args="(uint8_t value, uint8_t mode)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LiquidCrystal::send </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>mode</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Send a particular value to the <a class="el" href="class_l_c_d.html">LCD</a>. Sends a particular value to the <a class="el" href="class_l_c_d.html">LCD</a> for writing to the <a class="el" href="class_l_c_d.html">LCD</a> or as an <a class="el" href="class_l_c_d.html">LCD</a> command.</p>
<p>Users should never call this method.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">value</td><td>Value to send to the <a class="el" href="class_l_c_d.html">LCD</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>mode LOW - write to the <a class="el" href="class_l_c_d.html">LCD</a> CGRAM, HIGH - write a command to the <a class="el" href="class_l_c_d.html">LCD</a>. </dd></dl>
<p>Reimplemented from <a class="el" href="class_l_c_d.html">LCD</a>.</p>
<p>Definition at line <a class="el" href="_liquid_crystal_8cpp_source.html#l00122">122</a> of file <a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="aa2b898366e1c656ac313b9007c98cebd"></a><!-- doxytag: member="LiquidCrystal::setBacklight" ref="aa2b898366e1c656ac313b9007c98cebd" args="(uint8_t value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LiquidCrystal::setBacklight </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Switch-on/off the <a class="el" href="class_l_c_d.html">LCD</a> backlight. Switch-on/off the <a class="el" href="class_l_c_d.html">LCD</a> backlight. The setBacklightPin has to be called before setting the backlight for this method to work. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_liquid_crystal.html#a63740dc1198d8169a39d9c6daff0efc9">setBacklightPin</a>. For dimming control of the <a class="el" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a>, the configuration pin must be a PWM output pin. Dim control is achieved by passing a value from 1 to 255 as a parameter. If the pin configured when calling the <a class="el" href="class_liquid_crystal.html#a63740dc1198d8169a39d9c6daff0efc9">setBacklightPin</a> does not support PWM, then: (0) <a class="el" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a> <a class="el" href="class_l_c_d.html#a191639be183be1476c9bfe6d455d23b2">off</a>, (1..255) <a class="el" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a> <a class="el" href="class_l_c_d.html#a718da3a638deb59bd1c7a5222a52d98a">on</a>.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">value,:</td><td>backlight value. 0: off, 1..255: dim control of the backlight. For negative logic 255: off, 254..0: dim control. </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_l_c_d.html#a3305570d7b37eb93f2cf840263c15828">LCD</a>.</p>
<p>Definition at line <a class="el" href="_liquid_crystal_8cpp_source.html#l00165">165</a> of file <a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a63740dc1198d8169a39d9c6daff0efc9"></a><!-- doxytag: member="LiquidCrystal::setBacklightPin" ref="a63740dc1198d8169a39d9c6daff0efc9" args="(uint8_t pin, t_backlighPol pol)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LiquidCrystal::setBacklightPin </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>pin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>&#160;</td>
<td class="paramname"><em>pol</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the pin to control the backlight. Sets the pin in the device to control the backlight.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pin,:</td><td>pin assigned to the backlight </td></tr>
<tr><td class="paramname">pol,:</td><td>backlight pin control polarity (POSITIVE, NEGATIVE). </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_l_c_d.html#a53f4ee9b39d9ab3d7ae4d9f8dedca3bc">LCD</a>.</p>
<p>Definition at line <a class="el" href="_liquid_crystal_8cpp_source.html#l00155">155</a> of file <a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_liquid_crystal_8h_source.html">LiquidCrystal.h</a></li>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_liquid_crystal_8cpp_source.html">LiquidCrystal.cpp</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

View File

@ -0,0 +1,127 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">LiquidCrystal_I2C Member List</div> </div>
</div>
<div class="contents">
This is the complete list of members for <a class="el" href="class_liquid_crystal___i2_c.html">LiquidCrystal_I2C</a>, including all inherited members.<table>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a88b16ea0e5c7d1cabc5007d48bcbd2b0">_cols</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ac1374911fb145fea430c21092ada0c06">_numlines</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#abb3ed88d530f6283e6159b4973e7da9e">autoscroll</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___i2_c.html#aeee2ada537f0cfbfda8613324b57c4a6">begin</a>(uint8_t cols, uint8_t rows, uint8_t charsize=LCD_5x8DOTS)</td><td><a class="el" href="class_liquid_crystal___i2_c.html">LiquidCrystal_I2C</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a878b36878fa8287093964eba83aace77">blink</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#afa699e0beeeee03cce8cef87eba81c4a">clear</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a91cba8f93c692abcddf8bc3de58d2d3a">createChar</a>(uint8_t location, uint8_t charmap[])</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a194814f64dfa50a90e07e0fe0d361620">cursor</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a5b07cf05e8e5e7c53654f5ca0cf58b89">display</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aee45ad37f09312f5d9982257e2d37e68">home</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a00bb2db1390721abc7b24ac4b8c276c8">LCD</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a238e9f6476dc7df64af04eb6c87f6ac7">leftToRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C</a>(uint8_t lcd_Addr)</td><td><a class="el" href="class_liquid_crystal___i2_c.html">LiquidCrystal_I2C</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___i2_c.html#a9fc9bc519ebbf7503dadc11622e02ed6">LiquidCrystal_I2C</a>(uint8_t lcd_Addr, uint8_t backlighPin, t_backlighPol pol)</td><td><a class="el" href="class_liquid_crystal___i2_c.html">LiquidCrystal_I2C</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___i2_c.html#a517f8847ebf09f0eacfb9c7232975fce">LiquidCrystal_I2C</a>(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs)</td><td><a class="el" href="class_liquid_crystal___i2_c.html">LiquidCrystal_I2C</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___i2_c.html#add1f2da7de4ec9b9cd5c9b5fab712464">LiquidCrystal_I2C</a>(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs, uint8_t backlighPin, t_backlighPol pol)</td><td><a class="el" href="class_liquid_crystal___i2_c.html">LiquidCrystal_I2C</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___i2_c.html#a7d9b54d3a91fa0e0e50db27cda6b4654">LiquidCrystal_I2C</a>(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)</td><td><a class="el" href="class_liquid_crystal___i2_c.html">LiquidCrystal_I2C</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___i2_c.html#ab15622287533de7a47f3e2012ebf18be">LiquidCrystal_I2C</a>(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t backlighPin, t_backlighPol pol)</td><td><a class="el" href="class_liquid_crystal___i2_c.html">LiquidCrystal_I2C</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aad2abc99d1aca5403873579d9d72c2d4">moveCursorLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a09eec0c712e54b066f5894635c1fe75c">moveCursorRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a96035dde40efbf73390e00b5beb00231">noAutoscroll</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a2a331b4e142734411b2f1cfaffe7a488">noBacklight</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a3b755c4b397b5985752be8c30ee1a9b5">noBlink</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aec8ffaa1e69c7a6e13ac0cfbc29151d9">noCursor</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#af3974da6d988ba2d21c25135ada12108">noDisplay</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a191639be183be1476c9bfe6d455d23b2">off</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a718da3a638deb59bd1c7a5222a52d98a">on</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ac014830eadc26bfd86308ea8734f4428">rightToLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a6f3a503055b3b8dcf0f61b2633c584f7">scrollDisplayLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#abfc44b294772f09020bfa32af8a79571">scrollDisplayRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___i2_c.html#a8bf1fab7efe13e8b17b96c42d1f810b4">send</a>(uint8_t value, uint8_t mode)</td><td><a class="el" href="class_liquid_crystal___i2_c.html">LiquidCrystal_I2C</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___i2_c.html#af11b8fa0082616e2b6e6e4238589d8a8">setBacklight</a>(uint8_t value)</td><td><a class="el" href="class_liquid_crystal___i2_c.html">LiquidCrystal_I2C</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___i2_c.html#a2eaf86f62d1f169b3763b03fbf88f70b">setBacklightPin</a>(uint8_t value, t_backlighPol pol)</td><td><a class="el" href="class_liquid_crystal___i2_c.html">LiquidCrystal_I2C</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a48220450fd152b25994eb7d0ba340e8d">setCursor</a>(uint8_t col, uint8_t row)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">write</a>(uint8_t value)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [virtual]</code></td></tr>
</table></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,599 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: LiquidCrystal_I2C Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">LiquidCrystal_I2C Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="LiquidCrystal_I2C" --><!-- doxytag: inherits="LCD" -->
<p><code>#include &lt;<a class="el" href="_liquid_crystal___i2_c_8h_source.html">LiquidCrystal_I2C.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for LiquidCrystal_I2C:</div>
<div class="dyncontent">
<div class="center">
<img src="class_liquid_crystal___i2_c.png" usemap="#LiquidCrystal_I2C_map" alt=""/>
<map id="LiquidCrystal_I2C_map" name="LiquidCrystal_I2C_map">
<area href="class_l_c_d.html" alt="LCD" shape="rect" coords="0,0,111,24"/>
</map>
</div></div>
<p><a href="class_liquid_crystal___i2_c-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___i2_c.html#aeee2ada537f0cfbfda8613324b57c4a6">begin</a> (uint8_t cols, uint8_t rows, uint8_t charsize=LCD_5x8DOTS)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___i2_c.html#a9fc9bc519ebbf7503dadc11622e02ed6">LiquidCrystal_I2C</a> (uint8_t lcd_Addr, uint8_t backlighPin, <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___i2_c.html#add1f2da7de4ec9b9cd5c9b5fab712464">LiquidCrystal_I2C</a> (uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs, uint8_t backlighPin, <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___i2_c.html#a7d9b54d3a91fa0e0e50db27cda6b4654">LiquidCrystal_I2C</a> (uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___i2_c.html#a517f8847ebf09f0eacfb9c7232975fce">LiquidCrystal_I2C</a> (uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___i2_c.html#ab15622287533de7a47f3e2012ebf18be">LiquidCrystal_I2C</a> (uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t backlighPin, <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___i2_c.html#aac537d195557e0b8afac1a71441a484c">LiquidCrystal_I2C</a> (uint8_t lcd_Addr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___i2_c.html#a8bf1fab7efe13e8b17b96c42d1f810b4">send</a> (uint8_t value, uint8_t mode)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___i2_c.html#af11b8fa0082616e2b6e6e4238589d8a8">setBacklight</a> (uint8_t value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___i2_c.html#a2eaf86f62d1f169b3763b03fbf88f70b">setBacklightPin</a> (uint8_t value, <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8h_source.html#l00038">38</a> of file <a class="el" href="_liquid_crystal___i2_c_8h_source.html">LiquidCrystal_I2C.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aac537d195557e0b8afac1a71441a484c"></a><!-- doxytag: member="LiquidCrystal_I2C::LiquidCrystal_I2C" ref="aac537d195557e0b8afac1a71441a484c" args="(uint8_t lcd_Addr)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal_I2C::LiquidCrystal_I2C </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>lcd_Addr</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Class constructor. Initializes class variables and defines the I2C address of the <a class="el" href="class_l_c_d.html">LCD</a>. The constructor does not initialize the <a class="el" href="class_l_c_d.html">LCD</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">lcd_Addr[in]</td><td>I2C address of the IO expansion module. For I2CLCDextraIO, the address can be configured using the on board jumpers. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00096">96</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a9fc9bc519ebbf7503dadc11622e02ed6"></a><!-- doxytag: member="LiquidCrystal_I2C::LiquidCrystal_I2C" ref="a9fc9bc519ebbf7503dadc11622e02ed6" args="(uint8_t lcd_Addr, uint8_t backlighPin, t_backlighPol pol)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal_I2C::LiquidCrystal_I2C </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>lcd_Addr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>backlighPin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>&#160;</td>
<td class="paramname"><em>pol</em> = <code>POSITIVE</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00102">102</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a517f8847ebf09f0eacfb9c7232975fce"></a><!-- doxytag: member="LiquidCrystal_I2C::LiquidCrystal_I2C" ref="a517f8847ebf09f0eacfb9c7232975fce" args="(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal_I2C::LiquidCrystal_I2C </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>lcd_Addr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>En</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>Rw</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>Rs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Class constructor. Initializes class variables and defines the I2C address of the <a class="el" href="class_l_c_d.html">LCD</a>. The constructor does not initialize the <a class="el" href="class_l_c_d.html">LCD</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">lcd_Addr[in]</td><td>I2C address of the IO expansion module. For I2CLCDextraIO, the address can be configured using the on board jumpers. </td></tr>
<tr><td class="paramname">En[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> En (Enable) pin connected to the IO extender module </td></tr>
<tr><td class="paramname">Rw[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> Rw (Read/write) pin connected to the IO extender module </td></tr>
<tr><td class="paramname">Rs[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> Rs (Reset) pin connected to the IO extender module </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00109">109</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="add1f2da7de4ec9b9cd5c9b5fab712464"></a><!-- doxytag: member="LiquidCrystal_I2C::LiquidCrystal_I2C" ref="add1f2da7de4ec9b9cd5c9b5fab712464" args="(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs, uint8_t backlighPin, t_backlighPol pol)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal_I2C::LiquidCrystal_I2C </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>lcd_Addr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>En</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>Rw</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>Rs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>backlighPin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>&#160;</td>
<td class="paramname"><em>pol</em> = <code>POSITIVE</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00115">115</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a7d9b54d3a91fa0e0e50db27cda6b4654"></a><!-- doxytag: member="LiquidCrystal_I2C::LiquidCrystal_I2C" ref="a7d9b54d3a91fa0e0e50db27cda6b4654" args="(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal_I2C::LiquidCrystal_I2C </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>lcd_Addr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>En</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>Rw</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>Rs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d4</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d5</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d6</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d7</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Class constructor. Initializes class variables and defines the I2C address of the <a class="el" href="class_l_c_d.html">LCD</a>. The constructor does not initialize the <a class="el" href="class_l_c_d.html">LCD</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">lcd_Addr[in]</td><td>I2C address of the IO expansion module. For I2CLCDextraIO, the address can be configured using the on board jumpers. </td></tr>
<tr><td class="paramname">En[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> En (Enable) pin connected to the IO extender module </td></tr>
<tr><td class="paramname">Rw[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> Rw (Read/write) pin connected to the IO extender module </td></tr>
<tr><td class="paramname">Rs[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> Rs (Reset) pin connected to the IO extender module </td></tr>
<tr><td class="paramname">d4[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> data 0 pin map on IO extender module </td></tr>
<tr><td class="paramname">d5[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> data 1 pin map on IO extender module </td></tr>
<tr><td class="paramname">d6[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> data 2 pin map on IO extender module </td></tr>
<tr><td class="paramname">d7[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> data 3 pin map on IO extender module </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00123">123</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ab15622287533de7a47f3e2012ebf18be"></a><!-- doxytag: member="LiquidCrystal_I2C::LiquidCrystal_I2C" ref="ab15622287533de7a47f3e2012ebf18be" args="(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t backlighPin, t_backlighPol pol)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal_I2C::LiquidCrystal_I2C </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>lcd_Addr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>En</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>Rw</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>Rs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d4</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d5</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d6</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d7</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>backlighPin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>&#160;</td>
<td class="paramname"><em>pol</em> = <code>POSITIVE</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00130">130</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aeee2ada537f0cfbfda8613324b57c4a6"></a><!-- doxytag: member="LiquidCrystal_I2C::begin" ref="aeee2ada537f0cfbfda8613324b57c4a6" args="(uint8_t cols, uint8_t rows, uint8_t charsize=LCD_5x8DOTS)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LiquidCrystal_I2C::begin </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>cols</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>rows</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>charsize</em> = <code>LCD_5x8DOTS</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="class_l_c_d.html">LCD</a> initialization and associated HW. Initializes the <a class="el" href="class_l_c_d.html">LCD</a> to a given size (col, row). This methods initializes the <a class="el" href="class_l_c_d.html">LCD</a>, therefore, it MUST be called prior to using any other method from this class or parent class.</p>
<p>The begin method can be overloaded if necessary to initialize any HW that is implemented by a library and can't be done during construction, here we use the Wire class.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">cols[in]</td><td>the number of columns that the display has </td></tr>
<tr><td class="paramname">rows[in]</td><td>the number of rows that the display has </td></tr>
<tr><td class="paramname">charsize[in]</td><td>size of the characters of the <a class="el" href="class_l_c_d.html">LCD</a>: LCD_5x8DOTS or LCD_5x10DOTS. </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_l_c_d.html#a3f587d1cbb2d59765ef60a5216b56fea">LCD</a>.</p>
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00144">144</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a8bf1fab7efe13e8b17b96c42d1f810b4"></a><!-- doxytag: member="LiquidCrystal_I2C::send" ref="a8bf1fab7efe13e8b17b96c42d1f810b4" args="(uint8_t value, uint8_t mode)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LiquidCrystal_I2C::send </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>mode</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Send a particular value to the <a class="el" href="class_l_c_d.html">LCD</a>. Sends a particular value to the <a class="el" href="class_l_c_d.html">LCD</a> for writing to the <a class="el" href="class_l_c_d.html">LCD</a> or as an <a class="el" href="class_l_c_d.html">LCD</a> command.</p>
<p>Users should never call this method.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">value[in]</td><td>Value to send to the <a class="el" href="class_l_c_d.html">LCD</a>. </td></tr>
<tr><td class="paramname">mode[in]</td><td>DATA - write to the <a class="el" href="class_l_c_d.html">LCD</a> CGRAM, COMMAND - write a command to the <a class="el" href="class_l_c_d.html">LCD</a>. </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_l_c_d.html">LCD</a>.</p>
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00240">240</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="af11b8fa0082616e2b6e6e4238589d8a8"></a><!-- doxytag: member="LiquidCrystal_I2C::setBacklight" ref="af11b8fa0082616e2b6e6e4238589d8a8" args="(uint8_t value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LiquidCrystal_I2C::setBacklight </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Switch-on/off the <a class="el" href="class_l_c_d.html">LCD</a> backlight. Switch-on/off the <a class="el" href="class_l_c_d.html">LCD</a> backlight. The setBacklightPin has to be called before setting the backlight for this method to work. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_liquid_crystal___i2_c.html#a2eaf86f62d1f169b3763b03fbf88f70b">setBacklightPin</a>.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">value,:</td><td>backlight mode (HIGH|LOW) </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_l_c_d.html#a3305570d7b37eb93f2cf840263c15828">LCD</a>.</p>
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00167">167</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a2eaf86f62d1f169b3763b03fbf88f70b"></a><!-- doxytag: member="LiquidCrystal_I2C::setBacklightPin" ref="a2eaf86f62d1f169b3763b03fbf88f70b" args="(uint8_t value, t_backlighPol pol)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LiquidCrystal_I2C::setBacklightPin </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>&#160;</td>
<td class="paramname"><em>pol</em> = <code>POSITIVE</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the pin to control the backlight. Sets the pin in the device to control the backlight. This device doesn't support dimming backlight capability.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">0,:</td><td>backlight off, 1..255: backlight on. </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_l_c_d.html#a53f4ee9b39d9ab3d7ae4d9f8dedca3bc">LCD</a>.</p>
<p>Definition at line <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html#l00158">158</a> of file <a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_liquid_crystal___i2_c_8h_source.html">LiquidCrystal_I2C.h</a></li>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_liquid_crystal___i2_c_8cpp_source.html">LiquidCrystal_I2C.cpp</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

View File

@ -0,0 +1,122 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">LiquidCrystal_SR Member List</div> </div>
</div>
<div class="contents">
This is the complete list of members for <a class="el" href="class_liquid_crystal___s_r.html">LiquidCrystal_SR</a>, including all inherited members.<table>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a88b16ea0e5c7d1cabc5007d48bcbd2b0">_cols</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ac1374911fb145fea430c21092ada0c06">_numlines</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#abb3ed88d530f6283e6159b4973e7da9e">autoscroll</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a3f587d1cbb2d59765ef60a5216b56fea">begin</a>(uint8_t cols, uint8_t rows, uint8_t charsize=LCD_5x8DOTS)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a878b36878fa8287093964eba83aace77">blink</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#afa699e0beeeee03cce8cef87eba81c4a">clear</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a91cba8f93c692abcddf8bc3de58d2d3a">createChar</a>(uint8_t location, uint8_t charmap[])</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a194814f64dfa50a90e07e0fe0d361620">cursor</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a5b07cf05e8e5e7c53654f5ca0cf58b89">display</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aee45ad37f09312f5d9982257e2d37e68">home</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a00bb2db1390721abc7b24ac4b8c276c8">LCD</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a238e9f6476dc7df64af04eb6c87f6ac7">leftToRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___s_r.html#ac3fe0b48f8d4c1c941d82d1333495cfc">LiquidCrystal_SR</a>(uint8_t srdata, uint8_t srclock, uint8_t enable=TWO_WIRE)</td><td><a class="el" href="class_liquid_crystal___s_r.html">LiquidCrystal_SR</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aad2abc99d1aca5403873579d9d72c2d4">moveCursorLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a09eec0c712e54b066f5894635c1fe75c">moveCursorRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a96035dde40efbf73390e00b5beb00231">noAutoscroll</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a2a331b4e142734411b2f1cfaffe7a488">noBacklight</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a3b755c4b397b5985752be8c30ee1a9b5">noBlink</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aec8ffaa1e69c7a6e13ac0cfbc29151d9">noCursor</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#af3974da6d988ba2d21c25135ada12108">noDisplay</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a191639be183be1476c9bfe6d455d23b2">off</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a718da3a638deb59bd1c7a5222a52d98a">on</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ac014830eadc26bfd86308ea8734f4428">rightToLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a6f3a503055b3b8dcf0f61b2633c584f7">scrollDisplayLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#abfc44b294772f09020bfa32af8a79571">scrollDisplayRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___s_r.html#a03821351a32db07cb7e42c8c11ce8d47">send</a>(uint8_t value, uint8_t mode)</td><td><a class="el" href="class_liquid_crystal___s_r.html">LiquidCrystal_SR</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___s_r.html#ad9f3e3f36257984c23fb508973e14535">setBacklight</a>(uint8_t mode)</td><td><a class="el" href="class_liquid_crystal___s_r.html">LiquidCrystal_SR</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___s_r.html#a5bfc0dcc1f042bcb59992493a3a7231d">setBacklightPin</a>(uint8_t pin, t_backlighPol pol)</td><td><a class="el" href="class_liquid_crystal___s_r.html">LiquidCrystal_SR</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a48220450fd152b25994eb7d0ba340e8d">setCursor</a>(uint8_t col, uint8_t row)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">write</a>(uint8_t value)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [virtual]</code></td></tr>
</table></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,271 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: LiquidCrystal_SR Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">LiquidCrystal_SR Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="LiquidCrystal_SR" --><!-- doxytag: inherits="LCD" -->
<p><code>#include &lt;<a class="el" href="_liquid_crystal___s_r_8h_source.html">LiquidCrystal_SR.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for LiquidCrystal_SR:</div>
<div class="dyncontent">
<div class="center">
<img src="class_liquid_crystal___s_r.png" usemap="#LiquidCrystal_SR_map" alt=""/>
<map id="LiquidCrystal_SR_map" name="LiquidCrystal_SR_map">
<area href="class_l_c_d.html" alt="LCD" shape="rect" coords="0,0,108,24"/>
</map>
</div></div>
<p><a href="class_liquid_crystal___s_r-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r.html#ac3fe0b48f8d4c1c941d82d1333495cfc">LiquidCrystal_SR</a> (uint8_t srdata, uint8_t srclock, uint8_t enable=TWO_WIRE)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r.html#a03821351a32db07cb7e42c8c11ce8d47">send</a> (uint8_t value, uint8_t mode)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r.html#ad9f3e3f36257984c23fb508973e14535">setBacklight</a> (uint8_t mode)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r.html#a5bfc0dcc1f042bcb59992493a3a7231d">setBacklightPin</a> (uint8_t pin, <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r_8h_source.html#l00094">94</a> of file <a class="el" href="_liquid_crystal___s_r_8h_source.html">LiquidCrystal_SR.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ac3fe0b48f8d4c1c941d82d1333495cfc"></a><!-- doxytag: member="LiquidCrystal_SR::LiquidCrystal_SR" ref="ac3fe0b48f8d4c1c941d82d1333495cfc" args="(uint8_t srdata, uint8_t srclock, uint8_t enable=TWO_WIRE)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal_SR::LiquidCrystal_SR </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>srdata</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>srclock</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>enable</em> = <code>TWO_WIRE</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="class_l_c_d.html">LCD</a> SHIFT REGISTER constructors. Defines the pin assignment that the <a class="el" href="class_l_c_d.html">LCD</a> will have. The constructor does not initialize the <a class="el" href="class_l_c_d.html">LCD</a>. Assuming 1 line 8 pixel high font.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">srdata[in]</td><td>pin for shiftregister data line. </td></tr>
<tr><td class="paramname">srclock[in]</td><td>pin for shiftregister clock line. </td></tr>
<tr><td class="paramname">enable[in]</td><td>optional direct enable pin for the <a class="el" href="class_l_c_d.html">LCD</a> </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r_8cpp_source.html#l00098">98</a> of file <a class="el" href="_liquid_crystal___s_r_8cpp_source.html">LiquidCrystal_SR.cpp</a>.</p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a03821351a32db07cb7e42c8c11ce8d47"></a><!-- doxytag: member="LiquidCrystal_SR::send" ref="a03821351a32db07cb7e42c8c11ce8d47" args="(uint8_t value, uint8_t mode)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LiquidCrystal_SR::send </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>mode</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Send a particular value to the <a class="el" href="class_l_c_d.html">LCD</a>. Sends a particular value to the <a class="el" href="class_l_c_d.html">LCD</a> for writing to the <a class="el" href="class_l_c_d.html">LCD</a> or as an <a class="el" href="class_l_c_d.html">LCD</a> command using the shift register.</p>
<p>Users should never call this method.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">value[in]</td><td>Value to send to the <a class="el" href="class_l_c_d.html">LCD</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>mode LOW - write to the <a class="el" href="class_l_c_d.html">LCD</a> CGRAM, HIGH - write a command to the <a class="el" href="class_l_c_d.html">LCD</a>. </dd></dl>
<p>Reimplemented from <a class="el" href="class_l_c_d.html">LCD</a>.</p>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r_8cpp_source.html#l00172">172</a> of file <a class="el" href="_liquid_crystal___s_r_8cpp_source.html">LiquidCrystal_SR.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="ad9f3e3f36257984c23fb508973e14535"></a><!-- doxytag: member="LiquidCrystal_SR::setBacklight" ref="ad9f3e3f36257984c23fb508973e14535" args="(uint8_t mode)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LiquidCrystal_SR::setBacklight </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>mode</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Switch-on/off the <a class="el" href="class_l_c_d.html">LCD</a> backlight. Switch-on/off the <a class="el" href="class_l_c_d.html">LCD</a> backlight. The setBacklightPin has to be called before setting the backlight for this method to work. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_liquid_crystal___s_r.html#a5bfc0dcc1f042bcb59992493a3a7231d">setBacklightPin</a>.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">mode,:</td><td>backlight mode (HIGH|LOW) </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_l_c_d.html#a3305570d7b37eb93f2cf840263c15828">LCD</a>.</p>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r_8cpp_source.html#l00207">207</a> of file <a class="el" href="_liquid_crystal___s_r_8cpp_source.html">LiquidCrystal_SR.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a5bfc0dcc1f042bcb59992493a3a7231d"></a><!-- doxytag: member="LiquidCrystal_SR::setBacklightPin" ref="a5bfc0dcc1f042bcb59992493a3a7231d" args="(uint8_t pin, t_backlighPol pol)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LiquidCrystal_SR::setBacklightPin </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>pin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>&#160;</td>
<td class="paramname"><em>pol</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the pin to control the backlight. Sets the pin in the device to control the backlight. </p>
<dl class="warning"><dt><b>Warning:</b></dt><dd>Currently not supported</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">mode,:</td><td>backlight mode (HIGH|LOW) </td></tr>
<tr><td class="paramname">pol,:</td><td>backlight polarity </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_l_c_d.html#a53f4ee9b39d9ab3d7ae4d9f8dedca3bc">LCD</a>.</p>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r_8cpp_source.html#l00202">202</a> of file <a class="el" href="_liquid_crystal___s_r_8cpp_source.html">LiquidCrystal_SR.cpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_liquid_crystal___s_r_8h_source.html">LiquidCrystal_SR.h</a></li>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_liquid_crystal___s_r_8cpp_source.html">LiquidCrystal_SR.cpp</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

View File

@ -0,0 +1,122 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">LiquidCrystal_SR2W Member List</div> </div>
</div>
<div class="contents">
This is the complete list of members for <a class="el" href="class_liquid_crystal___s_r2_w.html">LiquidCrystal_SR2W</a>, including all inherited members.<table>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a88b16ea0e5c7d1cabc5007d48bcbd2b0">_cols</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ac1374911fb145fea430c21092ada0c06">_numlines</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#abb3ed88d530f6283e6159b4973e7da9e">autoscroll</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a3f587d1cbb2d59765ef60a5216b56fea">begin</a>(uint8_t cols, uint8_t rows, uint8_t charsize=LCD_5x8DOTS)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a878b36878fa8287093964eba83aace77">blink</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#afa699e0beeeee03cce8cef87eba81c4a">clear</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a91cba8f93c692abcddf8bc3de58d2d3a">createChar</a>(uint8_t location, uint8_t charmap[])</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a194814f64dfa50a90e07e0fe0d361620">cursor</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a5b07cf05e8e5e7c53654f5ca0cf58b89">display</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aee45ad37f09312f5d9982257e2d37e68">home</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a00bb2db1390721abc7b24ac4b8c276c8">LCD</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a238e9f6476dc7df64af04eb6c87f6ac7">leftToRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___s_r2_w.html#af307fdf5c8feb757e965074dcdeb1dd3">LiquidCrystal_SR2W</a>(uint8_t srdata, uint8_t srclock, t_backlighPol blpol=POSITIVE)</td><td><a class="el" href="class_liquid_crystal___s_r2_w.html">LiquidCrystal_SR2W</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aad2abc99d1aca5403873579d9d72c2d4">moveCursorLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a09eec0c712e54b066f5894635c1fe75c">moveCursorRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a96035dde40efbf73390e00b5beb00231">noAutoscroll</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a2a331b4e142734411b2f1cfaffe7a488">noBacklight</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a3b755c4b397b5985752be8c30ee1a9b5">noBlink</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aec8ffaa1e69c7a6e13ac0cfbc29151d9">noCursor</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#af3974da6d988ba2d21c25135ada12108">noDisplay</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a191639be183be1476c9bfe6d455d23b2">off</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a718da3a638deb59bd1c7a5222a52d98a">on</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ac014830eadc26bfd86308ea8734f4428">rightToLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a6f3a503055b3b8dcf0f61b2633c584f7">scrollDisplayLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#abfc44b294772f09020bfa32af8a79571">scrollDisplayRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___s_r2_w.html#a65dc6f261c319be8e56f3c1f6a5c877d">send</a>(uint8_t value, uint8_t mode)</td><td><a class="el" href="class_liquid_crystal___s_r2_w.html">LiquidCrystal_SR2W</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___s_r2_w.html#a2158db27287c1564a03e7a1472beb3b6">setBacklight</a>(uint8_t mode)</td><td><a class="el" href="class_liquid_crystal___s_r2_w.html">LiquidCrystal_SR2W</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a53f4ee9b39d9ab3d7ae4d9f8dedca3bc">setBacklightPin</a>(uint8_t value, t_backlighPol pol)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [inline, virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a48220450fd152b25994eb7d0ba340e8d">setCursor</a>(uint8_t col, uint8_t row)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">write</a>(uint8_t value)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [virtual]</code></td></tr>
</table></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,230 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: LiquidCrystal_SR2W Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">LiquidCrystal_SR2W Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="LiquidCrystal_SR2W" --><!-- doxytag: inherits="LCD" -->
<p><code>#include &lt;<a class="el" href="_liquid_crystal___s_r2_w_8h_source.html">LiquidCrystal_SR2W.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for LiquidCrystal_SR2W:</div>
<div class="dyncontent">
<div class="center">
<img src="class_liquid_crystal___s_r2_w.png" usemap="#LiquidCrystal_SR2W_map" alt=""/>
<map id="LiquidCrystal_SR2W_map" name="LiquidCrystal_SR2W_map">
<area href="class_l_c_d.html" alt="LCD" shape="rect" coords="0,0,126,24"/>
</map>
</div></div>
<p><a href="class_liquid_crystal___s_r2_w-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r2_w.html#af307fdf5c8feb757e965074dcdeb1dd3">LiquidCrystal_SR2W</a> (uint8_t srdata, uint8_t srclock, <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> blpol=POSITIVE)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r2_w.html#a65dc6f261c319be8e56f3c1f6a5c877d">send</a> (uint8_t value, uint8_t mode)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r2_w.html#a2158db27287c1564a03e7a1472beb3b6">setBacklight</a> (uint8_t mode)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r2_w_8h_source.html#l00137">137</a> of file <a class="el" href="_liquid_crystal___s_r2_w_8h_source.html">LiquidCrystal_SR2W.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="af307fdf5c8feb757e965074dcdeb1dd3"></a><!-- doxytag: member="LiquidCrystal_SR2W::LiquidCrystal_SR2W" ref="af307fdf5c8feb757e965074dcdeb1dd3" args="(uint8_t srdata, uint8_t srclock, t_backlighPol blpol=POSITIVE)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal_SR2W::LiquidCrystal_SR2W </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>srdata</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>srclock</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>&#160;</td>
<td class="paramname"><em>blpol</em> = <code>POSITIVE</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="class_l_c_d.html">LCD</a> 2 wire SHIFT REGISTER constructor. Defines the pin assignments that connect to the shift register. The constructor does not initialize the <a class="el" href="class_l_c_d.html">LCD</a>. Assuming 1 line 8 pixel high font.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">srdata[in]</td><td>Arduino pin for shift register data line. </td></tr>
<tr><td class="paramname">srclock[in]</td><td>Arduino pin for shift register clock line. </td></tr>
<tr><td class="paramname">blpol[in]</td><td>optional backlight polarity (default = POSITIVE) </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r2_w_8cpp_source.html#l00037">37</a> of file <a class="el" href="_liquid_crystal___s_r2_w_8cpp_source.html">LiquidCrystal_SR2W.cpp</a>.</p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a65dc6f261c319be8e56f3c1f6a5c877d"></a><!-- doxytag: member="LiquidCrystal_SR2W::send" ref="a65dc6f261c319be8e56f3c1f6a5c877d" args="(uint8_t value, uint8_t mode)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LiquidCrystal_SR2W::send </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>mode</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Send a particular value to the <a class="el" href="class_l_c_d.html">LCD</a>. Sends a particular value to the <a class="el" href="class_l_c_d.html">LCD</a> for writing to the <a class="el" href="class_l_c_d.html">LCD</a> or as an <a class="el" href="class_l_c_d.html">LCD</a> command using the shift register.</p>
<p>Users should never call this method.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">value[in]</td><td>Value to send to the <a class="el" href="class_l_c_d.html">LCD</a>. </td></tr>
<tr><td class="paramname">mode[in]</td><td>DATA=8bit data, COMMAND=8bit cmd, FOUR_BITS=4bit cmd the <a class="el" href="class_l_c_d.html">LCD</a>. </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_l_c_d.html">LCD</a>.</p>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r2_w_8cpp_source.html#l00090">90</a> of file <a class="el" href="_liquid_crystal___s_r2_w_8cpp_source.html">LiquidCrystal_SR2W.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a2158db27287c1564a03e7a1472beb3b6"></a><!-- doxytag: member="LiquidCrystal_SR2W::setBacklight" ref="a2158db27287c1564a03e7a1472beb3b6" args="(uint8_t mode)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LiquidCrystal_SR2W::setBacklight </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>mode</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Switch-on/off the <a class="el" href="class_l_c_d.html">LCD</a> backlight. Switch-on/off the <a class="el" href="class_l_c_d.html">LCD</a> backlight. The setBacklightPin has to be called before setting the backlight for this method to work. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_l_c_d.html#a53f4ee9b39d9ab3d7ae4d9f8dedca3bc">setBacklightPin</a>.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">mode[in]</td><td>backlight mode (0 off, non-zero on) </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_l_c_d.html#a3305570d7b37eb93f2cf840263c15828">LCD</a>.</p>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r2_w_8cpp_source.html#l00117">117</a> of file <a class="el" href="_liquid_crystal___s_r2_w_8cpp_source.html">LiquidCrystal_SR2W.cpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_liquid_crystal___s_r2_w_8h_source.html">LiquidCrystal_SR2W.h</a></li>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_liquid_crystal___s_r2_w_8cpp_source.html">LiquidCrystal_SR2W.cpp</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

View File

@ -0,0 +1,125 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">LiquidCrystal_SR3W Member List</div> </div>
</div>
<div class="contents">
This is the complete list of members for <a class="el" href="class_liquid_crystal___s_r3_w.html">LiquidCrystal_SR3W</a>, including all inherited members.<table>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a88b16ea0e5c7d1cabc5007d48bcbd2b0">_cols</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ac1374911fb145fea430c21092ada0c06">_numlines</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#abb3ed88d530f6283e6159b4973e7da9e">autoscroll</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a3f587d1cbb2d59765ef60a5216b56fea">begin</a>(uint8_t cols, uint8_t rows, uint8_t charsize=LCD_5x8DOTS)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a878b36878fa8287093964eba83aace77">blink</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#afa699e0beeeee03cce8cef87eba81c4a">clear</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a91cba8f93c692abcddf8bc3de58d2d3a">createChar</a>(uint8_t location, uint8_t charmap[])</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a194814f64dfa50a90e07e0fe0d361620">cursor</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a5b07cf05e8e5e7c53654f5ca0cf58b89">display</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aee45ad37f09312f5d9982257e2d37e68">home</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a00bb2db1390721abc7b24ac4b8c276c8">LCD</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a238e9f6476dc7df64af04eb6c87f6ac7">leftToRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___s_r3_w.html#ae1396bcd5e9c5b7ed13182c166de776b">LiquidCrystal_SR3W</a>(uint8_t data, uint8_t clk, uint8_t strobe)</td><td><a class="el" href="class_liquid_crystal___s_r3_w.html">LiquidCrystal_SR3W</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___s_r3_w.html#a7b2f382b76bc9d88adb8d681e824b4de">LiquidCrystal_SR3W</a>(uint8_t data, uint8_t clk, uint8_t strobe, uint8_t backlighPin, t_backlighPol pol)</td><td><a class="el" href="class_liquid_crystal___s_r3_w.html">LiquidCrystal_SR3W</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___s_r3_w.html#a4fab8ff2f21bba3efd133cd8c87fffc0">LiquidCrystal_SR3W</a>(uint8_t data, uint8_t clk, uint8_t strobe, uint8_t En, uint8_t Rw, uint8_t Rs, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)</td><td><a class="el" href="class_liquid_crystal___s_r3_w.html">LiquidCrystal_SR3W</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___s_r3_w.html#a24f051747dfeda48f7b207c3358c8015">LiquidCrystal_SR3W</a>(uint8_t data, uint8_t clk, uint8_t strobe, uint8_t En, uint8_t Rw, uint8_t Rs, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t backlighPin, t_backlighPol pol)</td><td><a class="el" href="class_liquid_crystal___s_r3_w.html">LiquidCrystal_SR3W</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aad2abc99d1aca5403873579d9d72c2d4">moveCursorLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a09eec0c712e54b066f5894635c1fe75c">moveCursorRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a96035dde40efbf73390e00b5beb00231">noAutoscroll</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a2a331b4e142734411b2f1cfaffe7a488">noBacklight</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a3b755c4b397b5985752be8c30ee1a9b5">noBlink</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aec8ffaa1e69c7a6e13ac0cfbc29151d9">noCursor</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#af3974da6d988ba2d21c25135ada12108">noDisplay</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a191639be183be1476c9bfe6d455d23b2">off</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a718da3a638deb59bd1c7a5222a52d98a">on</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ac014830eadc26bfd86308ea8734f4428">rightToLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a6f3a503055b3b8dcf0f61b2633c584f7">scrollDisplayLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#abfc44b294772f09020bfa32af8a79571">scrollDisplayRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___s_r3_w.html#ade34af5b7fe795482f1848c2176d6e56">send</a>(uint8_t value, uint8_t mode)</td><td><a class="el" href="class_liquid_crystal___s_r3_w.html">LiquidCrystal_SR3W</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___s_r3_w.html#a6d0fc7907ef9fd87c408a21b9bd49295">setBacklight</a>(uint8_t value)</td><td><a class="el" href="class_liquid_crystal___s_r3_w.html">LiquidCrystal_SR3W</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___s_r3_w.html#a894d0ea8ea61c1d15acd8a26d417e477">setBacklightPin</a>(uint8_t value, t_backlighPol pol)</td><td><a class="el" href="class_liquid_crystal___s_r3_w.html">LiquidCrystal_SR3W</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a48220450fd152b25994eb7d0ba340e8d">setCursor</a>(uint8_t col, uint8_t row)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">write</a>(uint8_t value)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [virtual]</code></td></tr>
</table></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,501 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: LiquidCrystal_SR3W Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">LiquidCrystal_SR3W Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="LiquidCrystal_SR3W" --><!-- doxytag: inherits="LCD" -->
<p><code>#include &lt;<a class="el" href="_liquid_crystal___s_r3_w_8h_source.html">LiquidCrystal_SR3W.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for LiquidCrystal_SR3W:</div>
<div class="dyncontent">
<div class="center">
<img src="class_liquid_crystal___s_r3_w.png" usemap="#LiquidCrystal_SR3W_map" alt=""/>
<map id="LiquidCrystal_SR3W_map" name="LiquidCrystal_SR3W_map">
<area href="class_l_c_d.html" alt="LCD" shape="rect" coords="0,0,126,24"/>
</map>
</div></div>
<p><a href="class_liquid_crystal___s_r3_w-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r3_w.html#ae1396bcd5e9c5b7ed13182c166de776b">LiquidCrystal_SR3W</a> (uint8_t data, uint8_t clk, uint8_t strobe)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r3_w.html#a7b2f382b76bc9d88adb8d681e824b4de">LiquidCrystal_SR3W</a> (uint8_t data, uint8_t clk, uint8_t strobe, uint8_t backlighPin, <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r3_w.html#a24f051747dfeda48f7b207c3358c8015">LiquidCrystal_SR3W</a> (uint8_t data, uint8_t clk, uint8_t strobe, uint8_t En, uint8_t Rw, uint8_t Rs, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t backlighPin, <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r3_w.html#a4fab8ff2f21bba3efd133cd8c87fffc0">LiquidCrystal_SR3W</a> (uint8_t data, uint8_t clk, uint8_t strobe, uint8_t En, uint8_t Rw, uint8_t Rs, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r3_w.html#ade34af5b7fe795482f1848c2176d6e56">send</a> (uint8_t value, uint8_t mode)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r3_w.html#a6d0fc7907ef9fd87c408a21b9bd49295">setBacklight</a> (uint8_t value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r3_w.html#a894d0ea8ea61c1d15acd8a26d417e477">setBacklightPin</a> (uint8_t value, <a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8h_source.html#l00066">66</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8h_source.html">LiquidCrystal_SR3W.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ae1396bcd5e9c5b7ed13182c166de776b"></a><!-- doxytag: member="LiquidCrystal_SR3W::LiquidCrystal_SR3W" ref="ae1396bcd5e9c5b7ed13182c166de776b" args="(uint8_t data, uint8_t clk, uint8_t strobe)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal_SR3W::LiquidCrystal_SR3W </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>clk</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>strobe</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Class constructor. Initializes class variables and defines the IO driving the shift register. The constructor does not initialize the <a class="el" href="class_l_c_d.html">LCD</a>. Default configuration: Shift register <a class="el" href="class_l_c_d.html">LCD</a> QA - 0 DB4 QB - 1 DB5 QC - 2 DB6 QD - 3 DB7 QE - 4 E QF - 5 QG - 6 Rs GND Rw</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">strobe[in]</td><td>digital IO connected to shiftregister strobe pin. </td></tr>
<tr><td class="paramname">data[in]</td><td>digital IO connected to the shiftregister data pin. </td></tr>
<tr><td class="paramname">clk[in]</td><td>digital IO connected to the shiftregister clock pin. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html#l00133">133</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a7b2f382b76bc9d88adb8d681e824b4de"></a><!-- doxytag: member="LiquidCrystal_SR3W::LiquidCrystal_SR3W" ref="a7b2f382b76bc9d88adb8d681e824b4de" args="(uint8_t data, uint8_t clk, uint8_t strobe, uint8_t backlighPin, t_backlighPol pol)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal_SR3W::LiquidCrystal_SR3W </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>clk</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>strobe</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>backlighPin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>&#160;</td>
<td class="paramname"><em>pol</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html#l00138">138</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a4fab8ff2f21bba3efd133cd8c87fffc0"></a><!-- doxytag: member="LiquidCrystal_SR3W::LiquidCrystal_SR3W" ref="a4fab8ff2f21bba3efd133cd8c87fffc0" args="(uint8_t data, uint8_t clk, uint8_t strobe, uint8_t En, uint8_t Rw, uint8_t Rs, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal_SR3W::LiquidCrystal_SR3W </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>clk</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>strobe</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>En</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>Rw</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>Rs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d4</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d5</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d6</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d7</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Class constructor. Initializes class variables and defines the control lines of the <a class="el" href="class_l_c_d.html">LCD</a> and the shiftregister. The constructor does not initialize the <a class="el" href="class_l_c_d.html">LCD</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">strobe[in]</td><td>digital IO connected to shiftregister strobe pin. </td></tr>
<tr><td class="paramname">data[in]</td><td>digital IO connected to shiftregister data pin. </td></tr>
<tr><td class="paramname">clk[in]</td><td>digital IO connected to shiftregister clock pin. </td></tr>
<tr><td class="paramname">En[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> En (Enable) pin connected to SR output pin. </td></tr>
<tr><td class="paramname">Rw[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> Rw (Read/write) pin connected to SR output pin. </td></tr>
<tr><td class="paramname">Rs[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> Rs (Reg Select) pin connected to SR output pin. </td></tr>
<tr><td class="paramname">d4[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> data 4 pin map to the SR output pin. </td></tr>
<tr><td class="paramname">d5[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> data 5 pin map to the SR output pin. </td></tr>
<tr><td class="paramname">d6[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> data 6 pin map to the SR output pin. </td></tr>
<tr><td class="paramname">d7[in]</td><td><a class="el" href="class_l_c_d.html">LCD</a> data 7 pin map to the SR output pin. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html#l00145">145</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a24f051747dfeda48f7b207c3358c8015"></a><!-- doxytag: member="LiquidCrystal_SR3W::LiquidCrystal_SR3W" ref="a24f051747dfeda48f7b207c3358c8015" args="(uint8_t data, uint8_t clk, uint8_t strobe, uint8_t En, uint8_t Rw, uint8_t Rs, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t backlighPin, t_backlighPol pol)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal_SR3W::LiquidCrystal_SR3W </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>clk</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>strobe</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>En</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>Rw</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>Rs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d4</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d5</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d6</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>d7</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>backlighPin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>&#160;</td>
<td class="paramname"><em>pol</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html#l00152">152</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a>.</p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ade34af5b7fe795482f1848c2176d6e56"></a><!-- doxytag: member="LiquidCrystal_SR3W::send" ref="ade34af5b7fe795482f1848c2176d6e56" args="(uint8_t value, uint8_t mode)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LiquidCrystal_SR3W::send </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>mode</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Send a particular value to the <a class="el" href="class_l_c_d.html">LCD</a>. Sends a particular value to the <a class="el" href="class_l_c_d.html">LCD</a> for writing to the <a class="el" href="class_l_c_d.html">LCD</a> or as an <a class="el" href="class_l_c_d.html">LCD</a> command.</p>
<p>Users should never call this method.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">value[in]</td><td>Value to send to the <a class="el" href="class_l_c_d.html">LCD</a>. </td></tr>
<tr><td class="paramname">mode[in]</td><td>DATA - write to the <a class="el" href="class_l_c_d.html">LCD</a> CGRAM, COMMAND - write a command to the <a class="el" href="class_l_c_d.html">LCD</a>. </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_l_c_d.html">LCD</a>.</p>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html#l00162">162</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a6d0fc7907ef9fd87c408a21b9bd49295"></a><!-- doxytag: member="LiquidCrystal_SR3W::setBacklight" ref="a6d0fc7907ef9fd87c408a21b9bd49295" args="(uint8_t value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LiquidCrystal_SR3W::setBacklight </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Switch-on/off the <a class="el" href="class_l_c_d.html">LCD</a> backlight. Switch-on/off the <a class="el" href="class_l_c_d.html">LCD</a> backlight. The setBacklightPin has to be called before setting the backlight for this method to work. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_liquid_crystal___s_r3_w.html#a894d0ea8ea61c1d15acd8a26d417e477">setBacklightPin</a>.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">value,:</td><td>backlight mode (HIGH|LOW) </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_l_c_d.html#a3305570d7b37eb93f2cf840263c15828">LCD</a>.</p>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html#l00191">191</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a>.</p>
</div>
</div>
<a class="anchor" id="a894d0ea8ea61c1d15acd8a26d417e477"></a><!-- doxytag: member="LiquidCrystal_SR3W::setBacklightPin" ref="a894d0ea8ea61c1d15acd8a26d417e477" args="(uint8_t value, t_backlighPol pol)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LiquidCrystal_SR3W::setBacklightPin </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a>&#160;</td>
<td class="paramname"><em>pol</em> = <code>POSITIVE</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the pin to control the backlight. Sets the pin in the device to control the backlight. This device doesn't support dimming backlight capability.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">0,:</td><td>backlight off, 1..255: backlight on. </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="class_l_c_d.html#a53f4ee9b39d9ab3d7ae4d9f8dedca3bc">LCD</a>.</p>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html#l00183">183</a> of file <a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_liquid_crystal___s_r3_w_8h_source.html">LiquidCrystal_SR3W.h</a></li>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_liquid_crystal___s_r3_w_8cpp_source.html">LiquidCrystal_SR3W.cpp</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 B

View File

@ -0,0 +1,120 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">LiquidCrystal_SR_LCD3 Member List</div> </div>
</div>
<div class="contents">
This is the complete list of members for <a class="el" href="class_liquid_crystal___s_r___l_c_d3.html">LiquidCrystal_SR_LCD3</a>, including all inherited members.<table>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a88b16ea0e5c7d1cabc5007d48bcbd2b0">_cols</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ae47a0e2eff74431a39774b788d5761f4">_displaycontrol</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a726b9a68d091dd8683a18e83f3a8fd3c">_displaymode</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ac1374911fb145fea430c21092ada0c06">_numlines</a></td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [protected]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#abb3ed88d530f6283e6159b4973e7da9e">autoscroll</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aba8867fe2210cbfa8db869208709be10">backlight</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a3f587d1cbb2d59765ef60a5216b56fea">begin</a>(uint8_t cols, uint8_t rows, uint8_t charsize=LCD_5x8DOTS)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a878b36878fa8287093964eba83aace77">blink</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#afa699e0beeeee03cce8cef87eba81c4a">clear</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a31a0cb42497d83cdc9cb8000828f7190">command</a>(uint8_t value)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a91cba8f93c692abcddf8bc3de58d2d3a">createChar</a>(uint8_t location, uint8_t charmap[])</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a194814f64dfa50a90e07e0fe0d361620">cursor</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a5b07cf05e8e5e7c53654f5ca0cf58b89">display</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aee45ad37f09312f5d9982257e2d37e68">home</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a00bb2db1390721abc7b24ac4b8c276c8">LCD</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a238e9f6476dc7df64af04eb6c87f6ac7">leftToRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___s_r___l_c_d3.html#a2cd0629853dd8a5569799fa998f3d29f">LiquidCrystal_SR_LCD3</a>(uint8_t srdata, uint8_t srclock, uint8_t enable)</td><td><a class="el" href="class_liquid_crystal___s_r___l_c_d3.html">LiquidCrystal_SR_LCD3</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aad2abc99d1aca5403873579d9d72c2d4">moveCursorLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a09eec0c712e54b066f5894635c1fe75c">moveCursorRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a96035dde40efbf73390e00b5beb00231">noAutoscroll</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a2a331b4e142734411b2f1cfaffe7a488">noBacklight</a>(void)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a3b755c4b397b5985752be8c30ee1a9b5">noBlink</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#aec8ffaa1e69c7a6e13ac0cfbc29151d9">noCursor</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#af3974da6d988ba2d21c25135ada12108">noDisplay</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#ac014830eadc26bfd86308ea8734f4428">rightToLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a6f3a503055b3b8dcf0f61b2633c584f7">scrollDisplayLeft</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#abfc44b294772f09020bfa32af8a79571">scrollDisplayRight</a>()</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_liquid_crystal___s_r___l_c_d3.html#a01e75d76d80e218a5bdc28f8ce22b0e4">send</a>(uint8_t value, uint8_t mode)</td><td><a class="el" href="class_liquid_crystal___s_r___l_c_d3.html">LiquidCrystal_SR_LCD3</a></td><td><code> [virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a3305570d7b37eb93f2cf840263c15828">setBacklight</a>(uint8_t value)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [inline, virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a11654e9302627743730fc4e1ea157e86">setBacklightPin</a>(uint8_t value)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [inline, virtual]</code></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a48220450fd152b25994eb7d0ba340e8d">setCursor</a>(uint8_t col, uint8_t row)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td></td></tr>
<tr class="memlist"><td><a class="el" href="class_l_c_d.html#a2d89cc2e62f72afb5f15a7fd812900e3">write</a>(uint8_t value)</td><td><a class="el" href="class_l_c_d.html">LCD</a></td><td><code> [virtual]</code></td></tr>
</table></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Mar 4 2012 21:17:07 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

View File

@ -0,0 +1,200 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: LiquidCrystal_SR_LCD3 Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">LiquidCrystal_SR_LCD3 Class Reference</div> </div>
</div>
<div class="contents">
<!-- doxytag: class="LiquidCrystal_SR_LCD3" --><!-- doxytag: inherits="LCD" -->
<p><code>#include &lt;<a class="el" href="_liquid_crystal___s_r___l_c_d3_8h_source.html">LiquidCrystal_SR_LCD3.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for LiquidCrystal_SR_LCD3:</div>
<div class="dyncontent">
<div class="center">
<img src="class_liquid_crystal___s_r___l_c_d3.png" usemap="#LiquidCrystal_SR_LCD3_map" alt=""/>
<map id="LiquidCrystal_SR_LCD3_map" name="LiquidCrystal_SR_LCD3_map">
<area href="class_l_c_d.html" alt="LCD" shape="rect" coords="0,0,147,24"/>
</map>
</div></div>
<p><a href="class_liquid_crystal___s_r___l_c_d3-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r___l_c_d3.html#a2cd0629853dd8a5569799fa998f3d29f">LiquidCrystal_SR_LCD3</a> (uint8_t srdata, uint8_t srclock, uint8_t enable)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_liquid_crystal___s_r___l_c_d3.html#a01e75d76d80e218a5bdc28f8ce22b0e4">send</a> (uint8_t value, uint8_t mode)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="_liquid_crystal___s_r___l_c_d3_8h_source.html#l00016">16</a> of file <a class="el" href="_liquid_crystal___s_r___l_c_d3_8h_source.html">LiquidCrystal_SR_LCD3.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a2cd0629853dd8a5569799fa998f3d29f"></a><!-- doxytag: member="LiquidCrystal_SR_LCD3::LiquidCrystal_SR_LCD3" ref="a2cd0629853dd8a5569799fa998f3d29f" args="(uint8_t srdata, uint8_t srclock, uint8_t enable)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">LiquidCrystal_SR_LCD3::LiquidCrystal_SR_LCD3 </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>srdata</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>srclock</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>enable</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p><a class="el" href="class_l_c_d.html">LCD</a> SHIFT REGISTER constructors. Defines the pin assignment that the <a class="el" href="class_l_c_d.html">LCD</a> will have. The constructor does not initialize the <a class="el" href="class_l_c_d.html">LCD</a>. Assuming 1 line 8 pixel high font.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">srdata[in]</td><td>pin for shiftregister data line. </td></tr>
<tr><td class="paramname">srclock[in]</td><td>pin for shiftregister clock line. </td></tr>
<tr><td class="paramname">enable[in]</td><td>enable pin for the shiftregister (also called strobe). </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r___l_c_d3_8cpp_source.html#l00123">123</a> of file <a class="el" href="_liquid_crystal___s_r___l_c_d3_8cpp_source.html">LiquidCrystal_SR_LCD3.cpp</a>.</p>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a01e75d76d80e218a5bdc28f8ce22b0e4"></a><!-- doxytag: member="LiquidCrystal_SR_LCD3::send" ref="a01e75d76d80e218a5bdc28f8ce22b0e4" args="(uint8_t value, uint8_t mode)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void LiquidCrystal_SR_LCD3::send </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>mode</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Send a particular value to the <a class="el" href="class_l_c_d.html">LCD</a>. Sends a particular value to the <a class="el" href="class_l_c_d.html">LCD</a> for writing to the <a class="el" href="class_l_c_d.html">LCD</a> or as an <a class="el" href="class_l_c_d.html">LCD</a> command using the shift register.</p>
<p>Users should never call this method.</p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">value[in]</td><td>Value to send to the <a class="el" href="class_l_c_d.html">LCD</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>mode LOW - write to the <a class="el" href="class_l_c_d.html">LCD</a> CGRAM, HIGH - write a command to the <a class="el" href="class_l_c_d.html">LCD</a>. </dd></dl>
<p>Reimplemented from <a class="el" href="class_l_c_d.html#a8a5b6f6f448a6ca6eeb3466c370d47ab">LCD</a>.</p>
<p>Definition at line <a class="el" href="_liquid_crystal___s_r___l_c_d3_8cpp_source.html#l00171">171</a> of file <a class="el" href="_liquid_crystal___s_r___l_c_d3_8cpp_source.html">LiquidCrystal_SR_LCD3.cpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_liquid_crystal___s_r___l_c_d3_8h_source.html">LiquidCrystal_SR_LCD3.h</a></li>
<li>/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/<a class="el" href="_liquid_crystal___s_r___l_c_d3_8cpp_source.html">LiquidCrystal_SR_LCD3.cpp</a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sun Mar 4 2012 21:17:07 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

View File

@ -0,0 +1,91 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>LCD Library: Class Index</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library&#160;<span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li class="current"><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">Class Index</div> </div>
</div>
<div class="contents">
<div class="qindex"><a class="qindex" href="#letter_I">I</a>&#160;|&#160;<a class="qindex" href="#letter_L">L</a></div>
<table align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
<tr><td><a name="letter_I"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;I&#160;&#160;</div></td></tr></table>
</td><td><a name="letter_L"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">&#160;&#160;L&#160;&#160;</div></td></tr></table>
</td><td><a class="el" href="class_liquid_crystal.html">LiquidCrystal</a>&#160;&#160;&#160;</td><td><a class="el" href="class_liquid_crystal___s_r.html">LiquidCrystal_SR</a>&#160;&#160;&#160;</td><td><a class="el" href="class_liquid_crystal___s_r3_w.html">LiquidCrystal_SR3W</a>&#160;&#160;&#160;</td></tr><tr><td><a class="el" href="class_i2_c_i_o.html">I2CIO</a>&#160;&#160;&#160;</td><td><a class="el" href="class_l_c_d.html">LCD</a>&#160;&#160;&#160;</td><td><a class="el" href="class_liquid_crystal___i2_c.html">LiquidCrystal_I2C</a>&#160;&#160;&#160;</td><td><a class="el" href="class_liquid_crystal___s_r2_w.html">LiquidCrystal_SR2W</a>&#160;&#160;&#160;</td></tr></table><div class="qindex"><a class="qindex" href="#letter_I">I</a>&#160;|&#160;<a class="qindex" href="#letter_L">L</a></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

View File

@ -0,0 +1,835 @@
/* The standard CSS for doxygen */
body, table, div, p, dl {
font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
font-size: 12px;
}
/* @group Heading Levels */
h1 {
font-size: 150%;
}
.title {
font-size: 150%;
font-weight: bold;
margin: 10px 2px;
}
h2 {
font-size: 120%;
}
h3 {
font-size: 100%;
}
dt {
font-weight: bold;
}
div.multicol {
-moz-column-gap: 1em;
-webkit-column-gap: 1em;
-moz-column-count: 3;
-webkit-column-count: 3;
}
p.startli, p.startdd, p.starttd {
margin-top: 2px;
}
p.endli {
margin-bottom: 0px;
}
p.enddd {
margin-bottom: 4px;
}
p.endtd {
margin-bottom: 2px;
}
/* @end */
caption {
font-weight: bold;
}
span.legend {
font-size: 70%;
text-align: center;
}
h3.version {
font-size: 90%;
text-align: center;
}
div.qindex, div.navtab{
background-color: #EBEFF6;
border: 1px solid #A3B4D7;
text-align: center;
margin: 2px;
padding: 2px;
}
div.qindex, div.navpath {
width: 100%;
line-height: 140%;
}
div.navtab {
margin-right: 15px;
}
/* @group Link Styling */
a {
color: #3D578C;
font-weight: normal;
text-decoration: none;
}
.contents a:visited {
color: #4665A2;
}
a:hover {
text-decoration: underline;
}
a.qindex {
font-weight: bold;
}
a.qindexHL {
font-weight: bold;
background-color: #9CAFD4;
color: #ffffff;
border: 1px double #869DCA;
}
.contents a.qindexHL:visited {
color: #ffffff;
}
a.el {
font-weight: bold;
}
a.elRef {
}
a.code {
color: #4665A2;
}
a.codeRef {
color: #4665A2;
}
/* @end */
dl.el {
margin-left: -1cm;
}
.fragment {
font-family: monospace, fixed;
font-size: 105%;
}
pre.fragment {
border: 1px solid #C4CFE5;
background-color: #FBFCFD;
padding: 4px 6px;
margin: 4px 8px 4px 2px;
overflow: auto;
word-wrap: break-word;
font-size: 9pt;
line-height: 125%;
}
div.ah {
background-color: black;
font-weight: bold;
color: #ffffff;
margin-bottom: 3px;
margin-top: 3px;
padding: 0.2em;
border: solid thin #333;
border-radius: 0.5em;
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
box-shadow: 2px 2px 3px #999;
-webkit-box-shadow: 2px 2px 3px #999;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
}
div.groupHeader {
margin-left: 16px;
margin-top: 12px;
font-weight: bold;
}
div.groupText {
margin-left: 16px;
font-style: italic;
}
body {
background: white;
color: black;
margin: 0;
}
div.contents {
margin-top: 10px;
margin-left: 10px;
margin-right: 5px;
}
td.indexkey {
background-color: #EBEFF6;
font-weight: bold;
border: 1px solid #C4CFE5;
margin: 2px 0px 2px 0;
padding: 2px 10px;
}
td.indexvalue {
background-color: #EBEFF6;
border: 1px solid #C4CFE5;
padding: 2px 10px;
margin: 2px 0px;
}
tr.memlist {
background-color: #EEF1F7;
}
p.formulaDsp {
text-align: center;
}
img.formulaDsp {
}
img.formulaInl {
vertical-align: middle;
}
div.center {
text-align: center;
margin-top: 0px;
margin-bottom: 0px;
padding: 0px;
}
div.center img {
border: 0px;
}
address.footer {
text-align: right;
padding-right: 12px;
}
img.footer {
border: 0px;
vertical-align: middle;
}
/* @group Code Colorization */
span.keyword {
color: #008000
}
span.keywordtype {
color: #604020
}
span.keywordflow {
color: #e08000
}
span.comment {
color: #800000
}
span.preprocessor {
color: #806020
}
span.stringliteral {
color: #002080
}
span.charliteral {
color: #008080
}
span.vhdldigit {
color: #ff00ff
}
span.vhdlchar {
color: #000000
}
span.vhdlkeyword {
color: #700070
}
span.vhdllogic {
color: #ff0000
}
/* @end */
/*
.search {
color: #003399;
font-weight: bold;
}
form.search {
margin-bottom: 0px;
margin-top: 0px;
}
input.search {
font-size: 75%;
color: #000080;
font-weight: normal;
background-color: #e8eef2;
}
*/
td.tiny {
font-size: 75%;
}
.dirtab {
padding: 4px;
border-collapse: collapse;
border: 1px solid #A3B4D7;
}
th.dirtab {
background: #EBEFF6;
font-weight: bold;
}
hr {
height: 0px;
border: none;
border-top: 1px solid #4A6AAA;
}
hr.footer {
height: 1px;
}
/* @group Member Descriptions */
table.memberdecls {
border-spacing: 0px;
padding: 0px;
}
.mdescLeft, .mdescRight,
.memItemLeft, .memItemRight,
.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
background-color: #F9FAFC;
border: none;
margin: 4px;
padding: 1px 0 0 8px;
}
.mdescLeft, .mdescRight {
padding: 0px 8px 4px 8px;
color: #555;
}
.memItemLeft, .memItemRight, .memTemplParams {
border-top: 1px solid #C4CFE5;
}
.memItemLeft, .memTemplItemLeft {
white-space: nowrap;
}
.memItemRight {
width: 100%;
}
.memTemplParams {
color: #4665A2;
white-space: nowrap;
}
/* @end */
/* @group Member Details */
/* Styles for detailed member documentation */
.memtemplate {
font-size: 80%;
color: #4665A2;
font-weight: normal;
margin-left: 9px;
}
.memnav {
background-color: #EBEFF6;
border: 1px solid #A3B4D7;
text-align: center;
margin: 2px;
margin-right: 15px;
padding: 2px;
}
.mempage {
width: 100%;
}
.memitem {
padding: 0;
margin-bottom: 10px;
margin-right: 5px;
}
.memname {
white-space: nowrap;
font-weight: bold;
margin-left: 6px;
}
.memproto {
border-top: 1px solid #A8B8D9;
border-left: 1px solid #A8B8D9;
border-right: 1px solid #A8B8D9;
padding: 6px 0px 6px 0px;
color: #253555;
font-weight: bold;
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
/* opera specific markup */
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
border-top-right-radius: 8px;
border-top-left-radius: 8px;
/* firefox specific markup */
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
-moz-border-radius-topright: 8px;
-moz-border-radius-topleft: 8px;
/* webkit specific markup */
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-webkit-border-top-right-radius: 8px;
-webkit-border-top-left-radius: 8px;
background-image:url('nav_f.png');
background-repeat:repeat-x;
background-color: #E2E8F2;
}
.memdoc {
border-bottom: 1px solid #A8B8D9;
border-left: 1px solid #A8B8D9;
border-right: 1px solid #A8B8D9;
padding: 2px 5px;
background-color: #FBFCFD;
border-top-width: 0;
/* opera specific markup */
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
/* firefox specific markup */
-moz-border-radius-bottomleft: 8px;
-moz-border-radius-bottomright: 8px;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7);
/* webkit specific markup */
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7));
}
.paramkey {
text-align: right;
}
.paramtype {
white-space: nowrap;
}
.paramname {
color: #602020;
white-space: nowrap;
}
.paramname em {
font-style: normal;
}
.params, .retval, .exception, .tparams {
border-spacing: 6px 2px;
}
.params .paramname, .retval .paramname {
font-weight: bold;
vertical-align: top;
}
.params .paramtype {
font-style: italic;
vertical-align: top;
}
.params .paramdir {
font-family: "courier new",courier,monospace;
vertical-align: top;
}
/* @end */
/* @group Directory (tree) */
/* for the tree view */
.ftvtree {
font-family: sans-serif;
margin: 0px;
}
/* these are for tree view when used as main index */
.directory {
font-size: 9pt;
font-weight: bold;
margin: 5px;
}
.directory h3 {
margin: 0px;
margin-top: 1em;
font-size: 11pt;
}
/*
The following two styles can be used to replace the root node title
with an image of your choice. Simply uncomment the next two styles,
specify the name of your image and be sure to set 'height' to the
proper pixel height of your image.
*/
/*
.directory h3.swap {
height: 61px;
background-repeat: no-repeat;
background-image: url("yourimage.gif");
}
.directory h3.swap span {
display: none;
}
*/
.directory > h3 {
margin-top: 0;
}
.directory p {
margin: 0px;
white-space: nowrap;
}
.directory div {
display: none;
margin: 0px;
}
.directory img {
vertical-align: -30%;
}
/* these are for tree view when not used as main index */
.directory-alt {
font-size: 100%;
font-weight: bold;
}
.directory-alt h3 {
margin: 0px;
margin-top: 1em;
font-size: 11pt;
}
.directory-alt > h3 {
margin-top: 0;
}
.directory-alt p {
margin: 0px;
white-space: nowrap;
}
.directory-alt div {
display: none;
margin: 0px;
}
.directory-alt img {
vertical-align: -30%;
}
/* @end */
div.dynheader {
margin-top: 8px;
}
address {
font-style: normal;
color: #2A3D61;
}
table.doxtable {
border-collapse:collapse;
}
table.doxtable td, table.doxtable th {
border: 1px solid #2D4068;
padding: 3px 7px 2px;
}
table.doxtable th {
background-color: #374F7F;
color: #FFFFFF;
font-size: 110%;
padding-bottom: 4px;
padding-top: 5px;
text-align:left;
}
.tabsearch {
top: 0px;
left: 10px;
height: 36px;
background-image: url('tab_b.png');
z-index: 101;
overflow: hidden;
font-size: 13px;
}
.navpath ul
{
font-size: 11px;
background-image:url('tab_b.png');
background-repeat:repeat-x;
height:30px;
line-height:30px;
color:#8AA0CC;
border:solid 1px #C2CDE4;
overflow:hidden;
margin:0px;
padding:0px;
}
.navpath li
{
list-style-type:none;
float:left;
padding-left:10px;
padding-right:15px;
background-image:url('bc_s.png');
background-repeat:no-repeat;
background-position:right;
color:#364D7C;
}
.navpath li.navelem a
{
height:32px;
display:block;
text-decoration: none;
outline: none;
}
.navpath li.navelem a:hover
{
color:#6884BD;
}
.navpath li.footer
{
list-style-type:none;
float:right;
padding-left:10px;
padding-right:15px;
background-image:none;
background-repeat:no-repeat;
background-position:right;
color:#364D7C;
font-size: 8pt;
}
div.summary
{
float: right;
font-size: 8pt;
padding-right: 5px;
width: 50%;
text-align: right;
}
div.summary a
{
white-space: nowrap;
}
div.ingroups
{
font-size: 8pt;
padding-left: 5px;
width: 50%;
text-align: left;
}
div.ingroups a
{
white-space: nowrap;
}
div.header
{
background-image:url('nav_h.png');
background-repeat:repeat-x;
background-color: #F9FAFC;
margin: 0px;
border-bottom: 1px solid #C4CFE5;
}
div.headertitle
{
padding: 5px 5px 5px 10px;
}
dl
{
padding: 0 0 0 10px;
}
dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug
{
border-left:4px solid;
padding: 0 0 0 6px;
}
dl.note
{
border-color: #D0C000;
}
dl.warning, dl.attention
{
border-color: #FF0000;
}
dl.pre, dl.post, dl.invariant
{
border-color: #00D000;
}
dl.deprecated
{
border-color: #505050;
}
dl.todo
{
border-color: #00C0E0;
}
dl.test
{
border-color: #3030E0;
}
dl.bug
{
border-color: #C08050;
}
#projectlogo
{
text-align: center;
vertical-align: bottom;
border-collapse: separate;
}
#projectlogo img
{
border: 0px none;
}
#projectname
{
font: 300% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 2px 0px;
}
#projectbrief
{
font: 120% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 0px;
}
#projectnumber
{
font: 50% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 0px;
}
#titlearea
{
padding: 0px;
margin: 0px;
width: 100%;
border-bottom: 1px solid #5373B4;
}
.image
{
text-align: center;
}
.dotgraph
{
text-align: center;
}
.mscgraph
{
text-align: center;
}
.caption
{
font-weight: bold;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Some files were not shown because too many files have changed in this diff Show More