OWGridEye Library for Arduino  version: 1.0.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
OWGridEye.h
Go to the documentation of this file.
1 /**********************************************************************
2 * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included
12 * in all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 * Except as contained in this notice, the name of Maxim Integrated
23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
24 * Products, Inc. Branding Policy.
25 *
26 * The mere transfer of this software does not imply any licenses
27 * of trade secrets, proprietary technology, copyrights, patents,
28 * trademarks, maskwork rights, or any other form of intellectual
29 * property whatsoever. Maxim Integrated Products, Inc. retains all
30 * ownership rights.
31 **********************************************************************/
32 
33 
34 #ifndef OWGRIDEYE_H
35 #define OWGRIDEYE_H
36 
37 
38 #include "Slaves/Bridges/Bridges.h"
39 #include "Slaves/Switches/Switches.h"
40 
41 using namespace OneWire;
42 
46 
47 
60 class OWGridEye
61 {
62  private:
63  DS2413 m_switch;
64  DS28E17 m_i2c_bridge;
65 
66  static const uint8_t I2C_ADRS = 0x68;
67 
68  public:
69 
73  enum CmdResult
74  {
76  OpFailure
77  };
78 
83  {
90  AVERAGE = 7,
107  PIXEL_BASE_ADRS = 0x80
108  };
109 
110  static const uint8_t DS2413_FAMILY_CODE = 0x3A;
111 
112  static const uint8_t DS28E17_FAMILY_CODE = 0x19;
113 
123  OWGridEye(RandomAccessRomIterator & selector);
124 
125 
136  void setOWSwitchRomId(const RomId & romId)
137  {
138  m_switch.setRomId(romId);
139  };
140 
141 
150  RomId getOWSwitchRomId(void)
151  {
152  return m_switch.romId();
153  };
154 
155 
166  void setI2CBridgeRomId(const RomId & romId)
167  {
168  m_i2c_bridge.setRomId(romId);
169  };
170 
171 
180  RomId getI2CBridgeRomId(void)
181  {
182  return m_i2c_bridge.romId();
183  };
184 
185 
194  CmdResult disconnectGridEye(void);
195 
196 
204  CmdResult connectGridEye(void);
205 
206 
214  CmdResult connectOWbus(void);
215 
216 
224  CmdResult disconnectOWbus(void);
225 
226 
245  CmdResult gridEyeAccess(bool readWrite, GridEyeRegister regAdrs, uint8_t numBytes, uint8_t * dataBuf);
246 
247 
262  CmdResult gridEyeGetThermistor(int16_t & thermTemp);
263 
264 
280  CmdResult gridEyeGetPixelTemperature(uint8_t pixelAdrs, int16_t & pixelTemp);
281 
282 
296  CmdResult gridEyeGetFrameTemperature(int16_t * frameTemp);
297 };
298 
299 
300 #endif /*OWGridEye_H*/
Definition: OWGridEye.h:95
Definition: OWGridEye.h:99
Definition: OWGridEye.h:87
Definition: OWGridEye.h:93
Definition: OWGridEye.h:92
Definition: OWGridEye.h:101
Definition: OWGridEye.h:104
Object for interfacing to MAXREFDES131#.
Definition: OWGridEye.h:60
Definition: OWGridEye.h:102
Definition: OWGridEye.h:75
Definition: OWGridEye.h:103
void setOWSwitchRomId(const RomId &romId)
setOWSwitchRomId
Definition: OWGridEye.h:136
CmdResult
OWGridEye command results.
Definition: OWGridEye.h:73
Definition: OWGridEye.h:98
Definition: OWGridEye.h:91
Definition: OWGridEye.h:94
Definition: OWGridEye.h:88
void setI2CBridgeRomId(const RomId &romId)
setI2CBridgeRomId
Definition: OWGridEye.h:166
Definition: OWGridEye.h:89
Definition: OWGridEye.h:100
GridEyeRegister
AMG8833 register map.
Definition: OWGridEye.h:82
Definition: OWGridEye.h:96
Definition: OWGridEye.h:97
Definition: OWGridEye.h:105
Definition: OWGridEye.h:86
RomId getOWSwitchRomId(void)
getOWSwitchRomId
Definition: OWGridEye.h:150
Definition: OWGridEye.h:106
RomId getI2CBridgeRomId(void)
getI2CBridgeRomId
Definition: OWGridEye.h:180
Definition: OWGridEye.h:85
Definition: OWGridEye.h:84