PageRenderTime 20ms CodeModel.GetById 18ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/arduinoSerialTest/SensorInput.h

https://bitbucket.org/jat45/ami
C Header | 14 lines | 9 code | 3 blank | 2 comment | 0 complexity | ab94e078e4571079074484fb09e2abc6 MD5 | raw file
 1#ifndef SENSOR_INPUT_H
 2#define SENSOR_INPUT_H
 3
 4// character used to seperate fields in formatted sensor reading strings
 5#define STRING_SEP_CHAR ':'
 6// struct for handling strings from sensor readings in a sensible manner
 7struct SensorInput {
 8  char busType[1]; // (A)nalog, (D)igital, (I)2C 
 9  int deviceNumber; // A/D: pin number, I: I2C device address
10  int registerNumber; // A/D: which device on the pin (only relevant if we've shift registers/mux/etc, 0 if just one device), I: register
11};
12
13
14#endif