Host software for the MAX30001 ECG, PACE, biopotential, bioimpedance, R-to-R peak sensor. Hosted on the MAX32630FTHR.

Dependencies:   SDFileSystem USBDevice max32630fthr

Fork of MAX30001-MAX32630FTHR-ECG-EVKIT by Maxim Integrated

Committer:
Emre.Eken
Date:
Tue Jul 24 15:22:35 2018 +0300
Revision:
13:6031b0bd9773
Parent:
11:1dde68750ed1
.hgtags is added.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Emre.Eken 11:1dde68750ed1 1 /*******************************************************************************
Emre.Eken 11:1dde68750ed1 2 * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
Emre.Eken 11:1dde68750ed1 3 *
Emre.Eken 11:1dde68750ed1 4 * Permission is hereby granted, free of charge, to any person obtaining a
Emre.Eken 11:1dde68750ed1 5 * copy of this software and associated documentation files (the "Software"),
Emre.Eken 11:1dde68750ed1 6 * to deal in the Software without restriction, including without limitation
Emre.Eken 11:1dde68750ed1 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
Emre.Eken 11:1dde68750ed1 8 * and/or sell copies of the Software, and to permit persons to whom the
Emre.Eken 11:1dde68750ed1 9 * Software is furnished to do so, subject to the following conditions:
Emre.Eken 11:1dde68750ed1 10 *
Emre.Eken 11:1dde68750ed1 11 * The above copyright notice and this permission notice shall be included
Emre.Eken 11:1dde68750ed1 12 * in all copies or substantial portions of the Software.
Emre.Eken 11:1dde68750ed1 13 *
Emre.Eken 11:1dde68750ed1 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
Emre.Eken 11:1dde68750ed1 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Emre.Eken 11:1dde68750ed1 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Emre.Eken 11:1dde68750ed1 17 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
Emre.Eken 11:1dde68750ed1 18 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
Emre.Eken 11:1dde68750ed1 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
Emre.Eken 11:1dde68750ed1 20 * OTHER DEALINGS IN THE SOFTWARE.
Emre.Eken 11:1dde68750ed1 21 *
Emre.Eken 11:1dde68750ed1 22 * Except as contained in this notice, the name of Maxim Integrated
Emre.Eken 11:1dde68750ed1 23 * Products, Inc. shall not be used except as stated in the Maxim Integrated
Emre.Eken 11:1dde68750ed1 24 * Products, Inc. Branding Policy.
Emre.Eken 11:1dde68750ed1 25 *
Emre.Eken 11:1dde68750ed1 26 * The mere transfer of this software does not imply any licenses
Emre.Eken 11:1dde68750ed1 27 * of trade secrets, proprietary technology, copyrights, patents,
Emre.Eken 11:1dde68750ed1 28 * trademarks, maskwork rights, or any other form of intellectual
Emre.Eken 11:1dde68750ed1 29 * property whatsoever. Maxim Integrated Products, Inc. retains all
Emre.Eken 11:1dde68750ed1 30 * ownership rights.
Emre.Eken 11:1dde68750ed1 31 *******************************************************************************
Emre.Eken 11:1dde68750ed1 32 */
Emre.Eken 11:1dde68750ed1 33 #ifndef _PERIPHERALS_H_
Emre.Eken 11:1dde68750ed1 34 #define _PERIPHERALS_H_
Emre.Eken 11:1dde68750ed1 35
Emre.Eken 11:1dde68750ed1 36 #include "mbed.h"
Emre.Eken 11:1dde68750ed1 37 #include "USBSerial.h"
Emre.Eken 11:1dde68750ed1 38 #include "HspLed.h"
Emre.Eken 11:1dde68750ed1 39 #include "MAX30001.h"
Emre.Eken 11:1dde68750ed1 40 #include "S25FS512.h"
Emre.Eken 11:1dde68750ed1 41 #include "PushButton.h"
Emre.Eken 11:1dde68750ed1 42 #include "SDFileSystem.h"
Emre.Eken 11:1dde68750ed1 43 /**
Emre.Eken 11:1dde68750ed1 44 * This static class is used as a central locatoin for all devices on the HSP platform
Emre.Eken 11:1dde68750ed1 45 * it gives (in-effect) a singleton interface for each device so that anywhere in code
Emre.Eken 11:1dde68750ed1 46 * one can reference on of these devices
Emre.Eken 11:1dde68750ed1 47 */
Emre.Eken 11:1dde68750ed1 48 class Peripherals {
Emre.Eken 11:1dde68750ed1 49 public:
Emre.Eken 11:1dde68750ed1 50 static USBSerial *setUSBSerial(USBSerial * device) { mUSBSerial = device; return device; }
Emre.Eken 11:1dde68750ed1 51 static USBSerial *usbSerial(void) { return mUSBSerial; }
Emre.Eken 11:1dde68750ed1 52
Emre.Eken 11:1dde68750ed1 53 static HspLed *hspLed(void) { return mHspLed; }
Emre.Eken 11:1dde68750ed1 54 static HspLed *setHspLed(HspLed *device) { mHspLed = device; return device; }
Emre.Eken 11:1dde68750ed1 55
Emre.Eken 11:1dde68750ed1 56 static MAX30001 *max30001(void) { return mMAX30001; }
Emre.Eken 11:1dde68750ed1 57 static MAX30001 *setMAX30001(MAX30001 *device) { mMAX30001 = device; return device; }
Emre.Eken 11:1dde68750ed1 58
Emre.Eken 11:1dde68750ed1 59 static Timer *timestampTimer(void) { return mTimestampTimer; }
Emre.Eken 11:1dde68750ed1 60 static Timer *setTimestampTimer(Timer *timer) { mTimestampTimer = timer; return timer; }
Emre.Eken 11:1dde68750ed1 61
Emre.Eken 11:1dde68750ed1 62 static S25FS512 *s25FS512(void) { return mS25FS512; }
Emre.Eken 11:1dde68750ed1 63 static S25FS512 *setS25FS512(S25FS512 *s25FS512) { mS25FS512 = s25FS512; return s25FS512; }
Emre.Eken 11:1dde68750ed1 64
Emre.Eken 11:1dde68750ed1 65 static PushButton *pushButton(void) { return mPushButton; }
Emre.Eken 11:1dde68750ed1 66 static PushButton *setPushButton(PushButton *pushButton) { mPushButton = pushButton; return pushButton; }
Emre.Eken 11:1dde68750ed1 67
Emre.Eken 11:1dde68750ed1 68 static SDFileSystem *sdFS(void) { return mSD; }
Emre.Eken 11:1dde68750ed1 69 static SDFileSystem *setSdFS(SDFileSystem *SD) { mSD = SD; return SD; }
Emre.Eken 11:1dde68750ed1 70
Emre.Eken 11:1dde68750ed1 71 static DigitalIn *SDDetect(void) { return mSDDetect; }
Emre.Eken 11:1dde68750ed1 72 static DigitalIn *setSDDetect(DigitalIn *SDDetect) { mSDDetect = SDDetect; return SDDetect; }
Emre.Eken 11:1dde68750ed1 73
Emre.Eken 11:1dde68750ed1 74 private:
Emre.Eken 11:1dde68750ed1 75 static USBSerial *mUSBSerial;
Emre.Eken 11:1dde68750ed1 76 static MAX30001 *mMAX30001;
Emre.Eken 11:1dde68750ed1 77 static HspLed *mHspLed;
Emre.Eken 11:1dde68750ed1 78 static Serial *mSerial;
Emre.Eken 11:1dde68750ed1 79 static Timer *mTimestampTimer;
Emre.Eken 11:1dde68750ed1 80 static S25FS512 *mS25FS512;
Emre.Eken 11:1dde68750ed1 81 static PushButton *mPushButton;
Emre.Eken 11:1dde68750ed1 82 static SDFileSystem *mSD;
Emre.Eken 11:1dde68750ed1 83 static DigitalIn *mSDDetect;
Emre.Eken 11:1dde68750ed1 84 };
Emre.Eken 11:1dde68750ed1 85
Emre.Eken 11:1dde68750ed1 86 #endif // _PERIPHERALS_H_
Emre.Eken 11:1dde68750ed1 87
Emre.Eken 11:1dde68750ed1 88