/* * Authors : Kerem Yollu, Edwin Koch * Date : 08.08.21 * Version : 0.1 * License : MIT-0 * * Description : Entry to project * * TODO : ALL * */ #include "main.hpp" CommandManager commander; Pin_Raspberry rpin; Pin_PC pcpin; SPI_dummy spi; Pin_PC chipSelectPin; SPICH spiCH(chipSelectPin, spi); template void baa(Pin& p) { p.write(true); } void dummy() { rpin.write(1); std::cout << "Dummy" << std::endl; } void foo() { std::cout << "foo" << std::endl; baa(rpin); baa(pcpin); std::cout << "SPI test:" << std::endl; spiCH.read_write_u8(10); } int main(int argc, char *argv[]) { std::cout << "Main Begin" << std::endl; commander.addNewCommand("dummy", "The test command for testing the test", dummy); commander.addNewCommand("foo", "The test command for foo was called", foo); commander(argv[1]); std::cout << "Main End" << std::endl; return 1; }