mbed code for MAXREFDES131 Qt GUI demo
Dependencies: OWGridEye OneWire mbed
maxrefdes131_demo.h@0:bd523ea97465, 2016-07-21 (annotated)
- Committer:
- j3
- Date:
- Thu Jul 21 23:12:13 2016 +0000
- Revision:
- 0:bd523ea97465
- Child:
- 1:2ad0ae1416d2
init commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
j3 | 0:bd523ea97465 | 1 | /********************************************************************** |
j3 | 0:bd523ea97465 | 2 | * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved. |
j3 | 0:bd523ea97465 | 3 | * |
j3 | 0:bd523ea97465 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
j3 | 0:bd523ea97465 | 5 | * copy of this software and associated documentation files (the "Software"), |
j3 | 0:bd523ea97465 | 6 | * to deal in the Software without restriction, including without limitation |
j3 | 0:bd523ea97465 | 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
j3 | 0:bd523ea97465 | 8 | * and/or sell copies of the Software, and to permit persons to whom the |
j3 | 0:bd523ea97465 | 9 | * Software is furnished to do so, subject to the following conditions: |
j3 | 0:bd523ea97465 | 10 | * |
j3 | 0:bd523ea97465 | 11 | * The above copyright notice and this permission notice shall be included |
j3 | 0:bd523ea97465 | 12 | * in all copies or substantial portions of the Software. |
j3 | 0:bd523ea97465 | 13 | * |
j3 | 0:bd523ea97465 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
j3 | 0:bd523ea97465 | 15 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
j3 | 0:bd523ea97465 | 16 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
j3 | 0:bd523ea97465 | 17 | * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES |
j3 | 0:bd523ea97465 | 18 | * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
j3 | 0:bd523ea97465 | 19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
j3 | 0:bd523ea97465 | 20 | * OTHER DEALINGS IN THE SOFTWARE. |
j3 | 0:bd523ea97465 | 21 | * |
j3 | 0:bd523ea97465 | 22 | * Except as contained in this notice, the name of Maxim Integrated |
j3 | 0:bd523ea97465 | 23 | * Products, Inc. shall not be used except as stated in the Maxim Integrated |
j3 | 0:bd523ea97465 | 24 | * Products, Inc. Branding Policy. |
j3 | 0:bd523ea97465 | 25 | * |
j3 | 0:bd523ea97465 | 26 | * The mere transfer of this software does not imply any licenses |
j3 | 0:bd523ea97465 | 27 | * of trade secrets, proprietary technology, copyrights, patents, |
j3 | 0:bd523ea97465 | 28 | * trademarks, maskwork rights, or any other form of intellectual |
j3 | 0:bd523ea97465 | 29 | * property whatsoever. Maxim Integrated Products, Inc. retains all |
j3 | 0:bd523ea97465 | 30 | * ownership rights. |
j3 | 0:bd523ea97465 | 31 | **********************************************************************/ |
j3 | 0:bd523ea97465 | 32 | |
j3 | 0:bd523ea97465 | 33 | |
j3 | 0:bd523ea97465 | 34 | #ifndef MAXREFDES131_DEMO_H |
j3 | 0:bd523ea97465 | 35 | #define MAXREFDES131_DEMO_H |
j3 | 0:bd523ea97465 | 36 | |
j3 | 0:bd523ea97465 | 37 | #include "mbed.h" |
j3 | 0:bd523ea97465 | 38 | #include "OneWire/OneWire.h" |
j3 | 0:bd523ea97465 | 39 | #include "OWGridEye/OWGridEye.h" |
j3 | 0:bd523ea97465 | 40 | |
j3 | 0:bd523ea97465 | 41 | using namespace OneWire; |
j3 | 0:bd523ea97465 | 42 | using namespace RomCommands; |
j3 | 0:bd523ea97465 | 43 | |
j3 | 0:bd523ea97465 | 44 | //#define I2C_TO_OW_MASTER |
j3 | 0:bd523ea97465 | 45 | //#define SERIAL_TO_OW_MASTER |
j3 | 0:bd523ea97465 | 46 | #define BIT_BANG_MASTER |
j3 | 0:bd523ea97465 | 47 | |
j3 | 0:bd523ea97465 | 48 | void print_rom_id(Serial & comms, RomId & romId); |
j3 | 0:bd523ea97465 | 49 | |
j3 | 0:bd523ea97465 | 50 | uint8_t init_sensor_state(OneWireMaster & owm, Serial & comms); |
j3 | 0:bd523ea97465 | 51 | |
j3 | 0:bd523ea97465 | 52 | uint8_t enumerate_sensors(Serial & comms, OneWireMaster & owm, RandomAccessRomIterator & selector, OWGridEye * array[]); |
j3 | 0:bd523ea97465 | 53 | |
j3 | 0:bd523ea97465 | 54 | void send_data(Serial & comms, float * data_buffer, float therm_temp); |
j3 | 0:bd523ea97465 | 55 | |
j3 | 0:bd523ea97465 | 56 | #endif /*MAXREFDES131_DEMO_H*/ |