IO is an event based input manager which permit to select which composents are manged on your system

Dependencies:   C12832 FXOS8700Q LM75B MMA7660

Committer:
co838_app56
Date:
Thu Feb 25 15:12:32 2016 +0000
Revision:
4:50e2aefe516b
Parent:
3:1ab88130bb9d
Fixing precision issue;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
co838_app56 0:2ac59c564ab0 1 #pragma once
co838_app56 0:2ac59c564ab0 2
co838_app56 0:2ac59c564ab0 3 // Including sensors and outputs
co838_app56 0:2ac59c564ab0 4 #include "Input.h"
co838_app56 0:2ac59c564ab0 5 #include "FrdmK64f_AppShield_Input.hpp"
co838_app56 0:2ac59c564ab0 6 #include "FrdmK64f_AppShield_Output.h"
co838_app56 0:2ac59c564ab0 7 #include "FrdmK64f_Input.hpp"
co838_app56 0:2ac59c564ab0 8 #include "FrdmK64f_Output.h"
co838_app56 0:2ac59c564ab0 9
co838_app56 0:2ac59c564ab0 10 // Defining some types used to create an IO object
co838_app56 0:2ac59c564ab0 11 struct FrdmK64f
co838_app56 0:2ac59c564ab0 12 {
co838_app56 0:2ac59c564ab0 13 typedef FrdmK64f_Input< ::Input> Input; // If we want to use k64f only
co838_app56 3:1ab88130bb9d 14 struct Output { FrdmK64f_Output frdmK64f; }; //
co838_app56 0:2ac59c564ab0 15
co838_app56 0:2ac59c564ab0 16 struct AppShield
co838_app56 0:2ac59c564ab0 17 {
co838_app56 0:2ac59c564ab0 18 typedef FrdmK64f_AppShield_Input<FrdmK64f::Input> Input; // If we want to use k64f
co838_app56 3:1ab88130bb9d 19 struct Output { FrdmK64f_Output frdmK64f; FrdmK64f_AppShield_Output appShield; }; // with application shield
co838_app56 0:2ac59c564ab0 20 };
co838_app56 0:2ac59c564ab0 21 };
co838_app56 0:2ac59c564ab0 22
co838_app56 0:2ac59c564ab0 23 struct AppShield
co838_app56 0:2ac59c564ab0 24 {
co838_app56 0:2ac59c564ab0 25 typedef FrdmK64f_AppShield_Input< ::Input> Input; // If we want to use
co838_app56 3:1ab88130bb9d 26 struct Output { FrdmK64f_AppShield_Output appShield; }; // application shield only
co838_app56 0:2ac59c564ab0 27 };
co838_app56 0:2ac59c564ab0 28
co838_app56 0:2ac59c564ab0 29 /*
co838_app56 0:2ac59c564ab0 30 ** IO Object
co838_app56 0:2ac59c564ab0 31 **
co838_app56 0:2ac59c564ab0 32 ** Used to interact with the device
co838_app56 0:2ac59c564ab0 33 ** input is an event manager
co838_app56 0:2ac59c564ab0 34 ** output list les ouputs
co838_app56 0:2ac59c564ab0 35 */
co838_app56 0:2ac59c564ab0 36 template <typename Platform> struct IO
co838_app56 0:2ac59c564ab0 37 {
co838_app56 0:2ac59c564ab0 38 static typename Platform::Input input;
co838_app56 0:2ac59c564ab0 39 static typename Platform::Output output;
co838_app56 0:2ac59c564ab0 40 };
co838_app56 0:2ac59c564ab0 41
co838_app56 0:2ac59c564ab0 42 template <typename Platform>
co838_app56 0:2ac59c564ab0 43 typename Platform::Input IO<Platform>::input;
co838_app56 0:2ac59c564ab0 44
co838_app56 0:2ac59c564ab0 45 template <typename Platform>
co838_app56 0:2ac59c564ab0 46 typename Platform::Output IO<Platform>::output;