Bible eBook Prototype More details at: http://mbed.org/users/davervw/notebook/ebible-abstract/
Dependencies: SDHCFileSystem TextLCD mbed BibleIO
main.cpp
00001 /* KJV Bible eBook Browser 00002 * 00003 * Copyright (c) 2011 David R. Van Wagner davervw@yahoo.com 00004 * 00005 * Permission is hereby granted, free of charge, to any person obtaining a copy 00006 * of this software and associated documentation files (the "Software"), to deal 00007 * in the Software without restriction, including without limitation the rights 00008 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00009 * copies of the Software, and to permit persons to whom the Software is 00010 * furnished to do so, subject to the following conditions: 00011 * 00012 * The above copyright notice and this permission notice shall be included in 00013 * all copies or substantial portions of the Software. 00014 * 00015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00016 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00017 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00018 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00019 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00020 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 00021 * THE SOFTWARE. 00022 */ 00023 00024 #include <mbed.h> 00025 #include "SDHCFileSystem.h" 00026 #include "TextLCD.h" 00027 #include "BibleIO.h" 00028 #include "BibleUI.h" 00029 00030 //Serial console(USBTX, USBRX); 00031 00032 int main() 00033 { 00034 //console.baud(921600); // mbed to pc usb serial supports: 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200, 230400, 460800, 921600 00035 //console.printf("Bible\n"); 00036 00037 TextLCD lcd(p15, p16, p17, p18, p19, p20, TextLCD::LCD8x2); // rs, e, d4, d5, d6, d7, LCD type 00038 //lcd.printf("Bible\n"); 00039 00040 SDFileSystem sd(p5, p6, p7, p8, "sd"); // mosi, miso, sclk, cs, mount point 00041 BibleIO HolyBible("/sd/bible.txt", BibleUI::indexing, &lcd); 00042 00043 DigitalIn left(p21); 00044 DigitalIn right(p22); 00045 left.mode(PullDown); 00046 right.mode(PullDown); 00047 00048 // go UI 00049 BibleUI ui(HolyBible, lcd, left, right); // Bible, TextLCD, left button, right button 00050 ui.start(); 00051 }
Generated on Sat Jul 16 2022 05:22:41 by 1.7.2