PropWare  3.0.0.229
C++ objects and CMake build system for Parallax Propeller
FileReader_Demo.cpp

Echo a text file to the terminal

cmake_minimum_required(VERSION 3.12)
find_package(PropWare REQUIRED)
project(FileReader_Demo)
create_simple_executable(${PROJECT_NAME} FileReader_Demo.cpp)
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;
}
printer.h
sd.h
fatfilereader.h
PropWare::FatFileReader
Read a file on a FAT 16 or FAT 32 storage device.
Definition: fatfilereader.h:79
PropWare::FatFS
Definition: fatfs.h:43
PropWare::BlockStorage
Any device that uses blocks as hardware level abstraction.
Definition: blockstorage.h:40
main
int main(void)
Definition: GraphicsTest.c:20
PropWare.h
PropWare::SD
A simple SD driver communicating over the SPI protocol.
Definition: sd.h:56
pwOut
PropWare::Printer pwOut
Most common use of printing in PropWare applications (not thread safe; see PropWare::pwSyncOut for mu...
fatfs.h
PropWare
Generic definitions and functions for the Parallax Propeller.
Definition: runnable.h:33