reef monitor
Dependencies: mbed-rtos EthernetInterface FatFileSystemCpp MCP23S17 SDFileSystem mbed
Fork of HTTPServerHelloWorld by
Diff: Model/Application.cpp
- Revision:
- 10:372c882b5533
- Parent:
- 8:3655e9a98f28
- Child:
- 11:9366140ebe5f
--- a/Model/Application.cpp Sun Mar 02 12:44:28 2014 +0000 +++ b/Model/Application.cpp Sun Mar 02 18:15:47 2014 +0000 @@ -22,9 +22,18 @@ // set the system time from NTP ethernetService->setRtcTime(); - // starting the file system + // start spi + spiHandler = new SPI(p5, p6, p7); + spiHandler->frequency(100000); // 100 khz for slow periperals intialization + + // starting the file systems localFileSystem = new LocalFileSystem("local"); - sdFileSystem = new SDFileSystem(p5, p6, p7, p8, "sd"); + sdFileSystem = new SDFileSystem(spiHandler, p8, "sd"); + + // starting the external actuators control group + actuatorsController = new ActuatorsController(spiHandler); + + spiHandler->frequency(4000000); // 4 Mhz spi normal operation frequency // start the rest api server restServer = new RestServer(localFileSystem, sdFileSystem);