PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
FileReader_Demo.cpp
Echo a text file to the terminal
cmake_minimum_required(VERSION 3.3)
find_package(
PropWare
REQUIRED)
set(BOARD dna)
project(FileReader_Demo)
create_simple_executable(${PROJECT_NAME} FileReader_Demo.cpp)
#include <
PropWare/PropWare.h
>
#include <
PropWare/printer/printer.h
>
#include <
PropWare/filesystem/sd.h
>
#include <
PropWare/filesystem/fat/fatfs.h
>
#include <
PropWare/filesystem/fat/fatfilereader.h
>
using namespace
PropWare
;
int
main
() {
const
SD
driver;
FatFS
filesystem(&driver);
filesystem.
mount
();
FatFileReader
reader(filesystem,
"fat_test.txt"
);
reader.
open
();
while
(!reader.
eof
())
pwOut
<< reader.
get_char
();
return
0;
}
Generated on Sat Aug 27 2016 00:58:03 for PropWare by
1.8.12