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.
OneWire_Masters/OneWireMastersShared.h@5:ce108eeb878d, 2016-02-09 (annotated)
- Committer:
- j3
- Date:
- Tue Feb 09 03:30:22 2016 +0000
- Revision:
- 5:ce108eeb878d
added additional rom command functions to interface and moved initialization of members to init list vs constructor body. Made other modifications suggested by Ian
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
j3 | 5:ce108eeb878d | 1 | /******************************************************************//** |
j3 | 5:ce108eeb878d | 2 | * @file OneWireMastersShared.h |
j3 | 5:ce108eeb878d | 3 | * |
j3 | 5:ce108eeb878d | 4 | * @author Justin Jordan |
j3 | 5:ce108eeb878d | 5 | * |
j3 | 5:ce108eeb878d | 6 | * @version 0.0.0 |
j3 | 5:ce108eeb878d | 7 | * |
j3 | 5:ce108eeb878d | 8 | * Started: 08FEB16 |
j3 | 5:ce108eeb878d | 9 | * |
j3 | 5:ce108eeb878d | 10 | * Updated: |
j3 | 5:ce108eeb878d | 11 | * |
j3 | 5:ce108eeb878d | 12 | * @brief Header file for functions shared between masters, that should |
j3 | 5:ce108eeb878d | 13 | * be implemented by each master, only one implementation |
j3 | 5:ce108eeb878d | 14 | *********************************************************************** |
j3 | 5:ce108eeb878d | 15 | * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved. |
j3 | 5:ce108eeb878d | 16 | * |
j3 | 5:ce108eeb878d | 17 | * Permission is hereby granted, free of charge, to any person obtaining a |
j3 | 5:ce108eeb878d | 18 | * copy of this software and associated documentation files (the "Software"), |
j3 | 5:ce108eeb878d | 19 | * to deal in the Software without restriction, including without limitation |
j3 | 5:ce108eeb878d | 20 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
j3 | 5:ce108eeb878d | 21 | * and/or sell copies of the Software, and to permit persons to whom the |
j3 | 5:ce108eeb878d | 22 | * Software is furnished to do so, subject to the following conditions: |
j3 | 5:ce108eeb878d | 23 | * |
j3 | 5:ce108eeb878d | 24 | * The above copyright notice and this permission notice shall be included |
j3 | 5:ce108eeb878d | 25 | * in all copies or substantial portions of the Software. |
j3 | 5:ce108eeb878d | 26 | * |
j3 | 5:ce108eeb878d | 27 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
j3 | 5:ce108eeb878d | 28 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
j3 | 5:ce108eeb878d | 29 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
j3 | 5:ce108eeb878d | 30 | * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES |
j3 | 5:ce108eeb878d | 31 | * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
j3 | 5:ce108eeb878d | 32 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
j3 | 5:ce108eeb878d | 33 | * OTHER DEALINGS IN THE SOFTWARE. |
j3 | 5:ce108eeb878d | 34 | * |
j3 | 5:ce108eeb878d | 35 | * Except as contained in this notice, the name of Maxim Integrated |
j3 | 5:ce108eeb878d | 36 | * Products, Inc. shall not be used except as stated in the Maxim Integrated |
j3 | 5:ce108eeb878d | 37 | * Products, Inc. Branding Policy. |
j3 | 5:ce108eeb878d | 38 | * |
j3 | 5:ce108eeb878d | 39 | * The mere transfer of this software does not imply any licenses |
j3 | 5:ce108eeb878d | 40 | * of trade secrets, proprietary technology, copyrights, patents, |
j3 | 5:ce108eeb878d | 41 | * trademarks, maskwork rights, or any other form of intellectual |
j3 | 5:ce108eeb878d | 42 | * property whatsoever. Maxim Integrated Products, Inc. retains all |
j3 | 5:ce108eeb878d | 43 | * ownership rights. |
j3 | 5:ce108eeb878d | 44 | **********************************************************************/ |
j3 | 5:ce108eeb878d | 45 | |
j3 | 5:ce108eeb878d | 46 | |
j3 | 5:ce108eeb878d | 47 | #ifndef ONEWIREMASTERSSHARED_H |
j3 | 5:ce108eeb878d | 48 | #define ONEWIREMASTERSSHARED_H |
j3 | 5:ce108eeb878d | 49 | |
j3 | 5:ce108eeb878d | 50 | |
j3 | 5:ce108eeb878d | 51 | #include "mbed.h" |
j3 | 5:ce108eeb878d | 52 | |
j3 | 5:ce108eeb878d | 53 | |
j3 | 5:ce108eeb878d | 54 | /**********************************************************//** |
j3 | 5:ce108eeb878d | 55 | * @brief calc_crc8() |
j3 | 5:ce108eeb878d | 56 | * |
j3 | 5:ce108eeb878d | 57 | * @details Calculate the CRC8 of the byte value provided with the |
j3 | 5:ce108eeb878d | 58 | * current global 'crc8' value. |
j3 | 5:ce108eeb878d | 59 | * |
j3 | 5:ce108eeb878d | 60 | * On Entry: |
j3 | 5:ce108eeb878d | 61 | * @param[in] data |
j3 | 5:ce108eeb878d | 62 | * @param[in] crc8 |
j3 | 5:ce108eeb878d | 63 | * |
j3 | 5:ce108eeb878d | 64 | * On Exit: |
j3 | 5:ce108eeb878d | 65 | * @return current global crc8 value |
j3 | 5:ce108eeb878d | 66 | **************************************************************/ |
j3 | 5:ce108eeb878d | 67 | uint8_t OWCalc_crc8(uint8_t data, uint8_t crc8); |
j3 | 5:ce108eeb878d | 68 | |
j3 | 5:ce108eeb878d | 69 | |
j3 | 5:ce108eeb878d | 70 | #endif /*ONEWIREMASTERSSHARED_H*/ |