1-Wire® library for mbed. Complete 1-Wire library that supports our silicon masters along with a bit-bang master on the MAX32600MBED platform with one common interface for mbed. Slave support has also been included and more slaves will be added as time permits.

Dependents:   MAXREFDES131_Qt_Demo MAX32630FTHR_iButton_uSD_Logger MAX32630FTHR_DS18B20_uSD_Logger MAXREFDES130_131_Demo ... more

Superseded by MaximInterface.

Committer:
mfruge
Date:
Tue Aug 13 14:42:37 2019 +0000
Revision:
142:85b71cfd617e
Parent:
139:f0e0a7976846
Added functions to ROMCommands to add Alarm Search functionality

Who changed what in which revision?

UserRevisionLine numberNew contents of line
j3 139:f0e0a7976846 1 /******************************************************************//**
j3 139:f0e0a7976846 2 * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
j3 139:f0e0a7976846 3 *
j3 139:f0e0a7976846 4 * Permission is hereby granted, free of charge, to any person obtaining a
j3 139:f0e0a7976846 5 * copy of this software and associated documentation files (the "Software"),
j3 139:f0e0a7976846 6 * to deal in the Software without restriction, including without limitation
j3 139:f0e0a7976846 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
j3 139:f0e0a7976846 8 * and/or sell copies of the Software, and to permit persons to whom the
j3 139:f0e0a7976846 9 * Software is furnished to do so, subject to the following conditions:
j3 139:f0e0a7976846 10 *
j3 139:f0e0a7976846 11 * The above copyright notice and this permission notice shall be included
j3 139:f0e0a7976846 12 * in all copies or substantial portions of the Software.
j3 139:f0e0a7976846 13 *
j3 139:f0e0a7976846 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
j3 139:f0e0a7976846 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
j3 139:f0e0a7976846 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
j3 139:f0e0a7976846 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
j3 139:f0e0a7976846 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
j3 139:f0e0a7976846 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
j3 139:f0e0a7976846 20 * OTHER DEALINGS IN THE SOFTWARE.
j3 139:f0e0a7976846 21 *
j3 139:f0e0a7976846 22 * Except as contained in this notice, the name of Maxim Integrated
j3 139:f0e0a7976846 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
j3 139:f0e0a7976846 24 * Products, Inc. Branding Policy.
j3 139:f0e0a7976846 25 *
j3 139:f0e0a7976846 26 * The mere transfer of this software does not imply any licenses
j3 139:f0e0a7976846 27 * of trade secrets, proprietary technology, copyrights, patents,
j3 139:f0e0a7976846 28 * trademarks, maskwork rights, or any other form of intellectual
j3 139:f0e0a7976846 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
j3 139:f0e0a7976846 30 * ownership rights.
j3 139:f0e0a7976846 31 **********************************************************************/
j3 139:f0e0a7976846 32
j3 139:f0e0a7976846 33 #ifndef OneWire_type_traits
j3 139:f0e0a7976846 34 #define OneWire_type_traits
j3 139:f0e0a7976846 35
j3 139:f0e0a7976846 36 namespace OneWire
j3 139:f0e0a7976846 37 {
j3 139:f0e0a7976846 38 template <typename T, T v>
j3 139:f0e0a7976846 39 struct integral_constant
j3 139:f0e0a7976846 40 {
j3 139:f0e0a7976846 41 static const T value = v;
j3 139:f0e0a7976846 42 typedef T value_type;
j3 139:f0e0a7976846 43 typedef integral_constant<T, v> type;
j3 139:f0e0a7976846 44 operator T() { return v; }
j3 139:f0e0a7976846 45 };
j3 139:f0e0a7976846 46
j3 139:f0e0a7976846 47 typedef integral_constant<bool, true> true_type;
j3 139:f0e0a7976846 48 typedef integral_constant<bool, false> false_type;
j3 139:f0e0a7976846 49
j3 139:f0e0a7976846 50 template<class T, class U> struct is_same : false_type { };
j3 139:f0e0a7976846 51 template<class T> struct is_same<T, T> : true_type { };
j3 139:f0e0a7976846 52 }
j3 139:f0e0a7976846 53
j3 139:f0e0a7976846 54 #endif