MaternoFetal

Fork of mbed-os-example-tcp-server by mbed_example

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ADS1299.h Source File

ADS1299.h

00001 //
00002 //  ADS1299.h
00003 //  Created by Joel Murphy, Summer 2K13  
00004 //  Ported from Conor Russomanno's Arduino library
00005 //
00006 //
00007 
00008 #ifndef _ADS1299_h
00009 #define _ADS1299_h
00010 //#include "mbed.h"
00011 
00012 //SPI Command Definition Byte Assignments (Datasheet, p35)
00013 #define _WAKEUP 0x02 // Wake-up from standby mode
00014 #define _STANDBY 0x04 // Enter Standby mode
00015 #define _RESET 0x06 // Reset the device
00016 #define _START 0x08 // Start and restart (synchronize) conversions
00017 #define _STOP 0x0A // Stop conversion
00018 #define _RDATAC 0x10 // Enable Read Data Continuous mode (default mode at power-up)
00019 #define _SDATAC 0x11 // Stop Read Data Continuous mode
00020 #define _RDATA 0x12 // Read data by command; supports multiple read back
00021 //#define _RREG 0x20 // (00100000) is the first opcode that the address must be added to for RREG communication
00022 //#define _WREG 0x40 // 01000000 in binary (Datasheet, p35)
00023 
00024 
00025 #define RREG 0x20
00026 #define WREG 0x40
00027 
00028 //Register Addresses
00029 #define ID 0x00
00030 #define CONFIG1 0x01
00031 #define CONFIG2 0x02
00032 #define CONFIG3 0x03
00033 #define LOFF 0x04
00034 #define CH1SET 0x05
00035 #define CH2SET 0x06
00036 #define CH3SET 0x07
00037 #define CH4SET 0x08
00038 #define CH5SET 0x09
00039 #define CH6SET 0x0A
00040 #define CH7SET 0x0B
00041 #define CH8SET 0x0C
00042 #define BIAS_SENSP 0x0D
00043 #define BIAS_SENSN 0x0E
00044 #define LOFF_SENSP 0x0F
00045 #define LOFF_SENSN 0x10
00046 #define LOFF_FLIP 0x11
00047 #define LOFF_STATP 0x12
00048 #define LOFF_STATN 0x13
00049 #define GPIO 0x14
00050 #define MISC1 0x15
00051 #define MISC2 0x16
00052 #define CONFIG4 0x17
00053 
00054 //    int stat;         // used to hold the status register
00055  //   char regData [24];  // array used when reading register data
00056  //   long channelData [8];   // array used when reading channel data
00057  //   bool verbose;        // turn on/off Serial feedback
00058 
00059 #endif