MAX32620HSP ECG with lead off detection
Dependencies: mbed HSP_ECG MAX14720 USBDevice
System/System.cpp@1:8b09f627a713, 2019-03-29 (annotated)
- Committer:
- douqan93
- Date:
- Fri Mar 29 09:20:05 2019 +0000
- Revision:
- 1:8b09f627a713
- Parent:
- 0:9ead5978d784
MAX32620HSP ECG with Lead off detection
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
douqan93 | 0:9ead5978d784 | 1 | /******************************************************************************* |
douqan93 | 0:9ead5978d784 | 2 | * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved. |
douqan93 | 0:9ead5978d784 | 3 | * |
douqan93 | 0:9ead5978d784 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
douqan93 | 0:9ead5978d784 | 5 | * copy of this software and associated documentation files (the "Software"), |
douqan93 | 0:9ead5978d784 | 6 | * to deal in the Software without restriction, including without limitation |
douqan93 | 0:9ead5978d784 | 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
douqan93 | 0:9ead5978d784 | 8 | * and/or sell copies of the Software, and to permit persons to whom the |
douqan93 | 0:9ead5978d784 | 9 | * Software is furnished to do so, subject to the following conditions: |
douqan93 | 0:9ead5978d784 | 10 | * |
douqan93 | 0:9ead5978d784 | 11 | * The above copyright notice and this permission notice shall be included |
douqan93 | 0:9ead5978d784 | 12 | * in all copies or substantial portions of the Software. |
douqan93 | 0:9ead5978d784 | 13 | * |
douqan93 | 0:9ead5978d784 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
douqan93 | 0:9ead5978d784 | 15 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
douqan93 | 0:9ead5978d784 | 16 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
douqan93 | 0:9ead5978d784 | 17 | * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES |
douqan93 | 0:9ead5978d784 | 18 | * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
douqan93 | 0:9ead5978d784 | 19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
douqan93 | 0:9ead5978d784 | 20 | * OTHER DEALINGS IN THE SOFTWARE. |
douqan93 | 0:9ead5978d784 | 21 | * |
douqan93 | 0:9ead5978d784 | 22 | * Except as contained in this notice, the name of Maxim Integrated |
douqan93 | 0:9ead5978d784 | 23 | * Products, Inc. shall not be used except as stated in the Maxim Integrated |
douqan93 | 0:9ead5978d784 | 24 | * Products, Inc. Branding Policy. |
douqan93 | 0:9ead5978d784 | 25 | * |
douqan93 | 0:9ead5978d784 | 26 | * The mere transfer of this software does not imply any licenses |
douqan93 | 0:9ead5978d784 | 27 | * of trade secrets, proprietary technology, copyrights, patents, |
douqan93 | 0:9ead5978d784 | 28 | * trademarks, maskwork rights, or any other form of intellectual |
douqan93 | 0:9ead5978d784 | 29 | * property whatsoever. Maxim Integrated Products, Inc. retains all |
douqan93 | 0:9ead5978d784 | 30 | * ownership rights. |
douqan93 | 0:9ead5978d784 | 31 | ******************************************************************************* |
douqan93 | 0:9ead5978d784 | 32 | */ |
douqan93 | 0:9ead5978d784 | 33 | #include "mbed.h" |
douqan93 | 0:9ead5978d784 | 34 | |
douqan93 | 0:9ead5978d784 | 35 | //****************************************************************************** |
douqan93 | 0:9ead5978d784 | 36 | void I2CM_Init_Reset(uint8_t index, int speed) { |
douqan93 | 0:9ead5978d784 | 37 | mxc_i2cm_regs_t *regs = MXC_I2CM_GET_I2CM(index); |
douqan93 | 0:9ead5978d784 | 38 | /* reset module */ |
douqan93 | 0:9ead5978d784 | 39 | regs->ctrl = MXC_F_I2CM_CTRL_MSTR_RESET_EN; |
douqan93 | 0:9ead5978d784 | 40 | regs->ctrl = 0; |
douqan93 | 0:9ead5978d784 | 41 | /* enable tx_fifo and rx_fifo */ |
douqan93 | 0:9ead5978d784 | 42 | regs->ctrl |= (MXC_F_I2CM_CTRL_TX_FIFO_EN | MXC_F_I2CM_CTRL_RX_FIFO_EN); |
douqan93 | 0:9ead5978d784 | 43 | } |