Test program for MAX30101 Barely working.

Dependencies:   MAX30101 mbed vt100

Committer:
Rhyme
Date:
Fri May 12 00:15:20 2017 +0000
Revision:
4:4b1763d399a0
Parent:
3:f3d19ad49aee
Document cleaned up a little

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Rhyme 0:74347dd8a032 1 #ifndef _MSS_H_
Rhyme 0:74347dd8a032 2 #define _MSS_H_
Rhyme 0:74347dd8a032 3
Rhyme 0:74347dd8a032 4 #if defined (TARGET_KL25Z)
Rhyme 0:74347dd8a032 5 /* I2C */
Rhyme 0:74347dd8a032 6 #define PIN_SCL PTE1
Rhyme 0:74347dd8a032 7 #define PIN_SDA PTE0
Rhyme 0:74347dd8a032 8 /* SPI */
Rhyme 0:74347dd8a032 9 #define PIN_SCK PTD1
Rhyme 0:74347dd8a032 10 #define PIN_MISO PTD3
Rhyme 0:74347dd8a032 11 #define PIN_MOSI PTD2
Rhyme 0:74347dd8a032 12 #define PIN_CS0 PTD0
Rhyme 0:74347dd8a032 13 /* Interrupt */
Rhyme 0:74347dd8a032 14 #define PIN_INT0 PTD5
Rhyme 0:74347dd8a032 15 #define PIN_INT1 PTA13
Rhyme 0:74347dd8a032 16 #define PIN_INT2 PTC9 /* This pin does not support interrupt */
Rhyme 0:74347dd8a032 17 #define PIN_INT3 PTC8 /* This pin does not support interrupt */
Rhyme 0:74347dd8a032 18 #define PIN_INT4 PTA5
Rhyme 0:74347dd8a032 19 #define PIN_INT5 PTA4
Rhyme 0:74347dd8a032 20 /* Analog Input */
Rhyme 0:74347dd8a032 21 #define PIN_AN0 PTB0
Rhyme 0:74347dd8a032 22 #define PIN_AN1 PTB1
Rhyme 0:74347dd8a032 23 #define PIN_AN2 PTB2
Rhyme 0:74347dd8a032 24 #define PIN_AN3 PTB3
Rhyme 0:74347dd8a032 25 #define PIN_AN4 PTC2
Rhyme 0:74347dd8a032 26 #define PIN_AN5 PTC1
Rhyme 0:74347dd8a032 27 #define BOARD_NAME "FRDM-KL25Z"
Rhyme 0:74347dd8a032 28
Rhyme 0:74347dd8a032 29 #elif defined (TARGET_KL46Z)
Rhyme 0:74347dd8a032 30 /* I2C */
Rhyme 0:74347dd8a032 31 #define PIN_SCL PTE1
Rhyme 0:74347dd8a032 32 #define PIN_SDA PTE0
Rhyme 0:74347dd8a032 33 /* SPI */
Rhyme 0:74347dd8a032 34 #define PIN_SCK PTD5
Rhyme 0:74347dd8a032 35 #define PIN_MISO PTD7
Rhyme 0:74347dd8a032 36 #define PIN_MOSI PTD6
Rhyme 0:74347dd8a032 37 #define PIN_CS0 PTD4
Rhyme 0:74347dd8a032 38 /* Interrupt */
Rhyme 0:74347dd8a032 39 #define PIN_INT0 PTD2
Rhyme 0:74347dd8a032 40 #define PIN_INT1 PTA13
Rhyme 0:74347dd8a032 41 #define PIN_INT2 PTC9 /* This pin does not support interrupt */
Rhyme 0:74347dd8a032 42 #define PIN_INT3 PTC8 /* This pin does not support interrupt */
Rhyme 0:74347dd8a032 43 #define PIN_INT4 PTA5
Rhyme 0:74347dd8a032 44 #define PIN_INT5 PTA4
Rhyme 0:74347dd8a032 45 /* Analog Input */
Rhyme 0:74347dd8a032 46 #define PIN_AN0 PTB0
Rhyme 0:74347dd8a032 47 #define PIN_AN1 PTB1
Rhyme 0:74347dd8a032 48 #define PIN_AN2 PTB2
Rhyme 0:74347dd8a032 49 #define PIN_AN3 PTB3
Rhyme 0:74347dd8a032 50 #define PIN_AN4 PTC2
Rhyme 0:74347dd8a032 51 #define PIN_AN5 PTC1
Rhyme 0:74347dd8a032 52 #define BOARD_NAME "FRDM-KL46Z"
Rhyme 0:74347dd8a032 53
Rhyme 0:74347dd8a032 54 #elif defined (TARGET_K64F)
Rhyme 0:74347dd8a032 55 /* I2C */
Rhyme 0:74347dd8a032 56 #define PIN_SCL PTE24
Rhyme 0:74347dd8a032 57 #define PIN_SDA PTE25
Rhyme 0:74347dd8a032 58 /* SPI */
Rhyme 0:74347dd8a032 59 #define PIN_SCK PTD1
Rhyme 0:74347dd8a032 60 #define PIN_MISO PTD3
Rhyme 0:74347dd8a032 61 #define PIN_MOSI PTD2
Rhyme 0:74347dd8a032 62 #define PIN_CS0 PTD0
Rhyme 0:74347dd8a032 63 /* Interrupt */
Rhyme 0:74347dd8a032 64 #define PIN_INT0 PTC4
Rhyme 0:74347dd8a032 65 #define PIN_INT1 PTA0
Rhyme 0:74347dd8a032 66 #define PIN_INT2 PTC3
Rhyme 0:74347dd8a032 67 #define PIN_INT3 PTC2
Rhyme 0:74347dd8a032 68 #define PIN_INT4 PTA2
Rhyme 0:74347dd8a032 69 #define PIN_INT5 PTB23
Rhyme 0:74347dd8a032 70 /* Analog Input */
Rhyme 0:74347dd8a032 71 #define PIN_AN0 PTB2
Rhyme 0:74347dd8a032 72 #define PIN_AN1 PTB3
Rhyme 0:74347dd8a032 73 #define PIN_AN2 PTB10
Rhyme 0:74347dd8a032 74 #define PIN_AN3 PTB11
Rhyme 0:74347dd8a032 75 #define PIN_AN4 PTC11
Rhyme 0:74347dd8a032 76 #define PIN_AN5 PTC10
Rhyme 0:74347dd8a032 77 #define BOARD_NAME "FRDM-K64Z"
Rhyme 0:74347dd8a032 78
Rhyme 0:74347dd8a032 79 /**
Rhyme 0:74347dd8a032 80 * NOTE: On FRDM-K22F
Rhyme 0:74347dd8a032 81 * Both I2C and UART are assigned to
Rhyme 0:74347dd8a032 82 * the same pins PTE1/PTE0.
Rhyme 0:74347dd8a032 83 * So MSS does not work as is.
Rhyme 0:74347dd8a032 84 */
Rhyme 0:74347dd8a032 85 #elif defined (TARGET_K22F)
Rhyme 0:74347dd8a032 86 /* I2C */
Rhyme 3:f3d19ad49aee 87 /* for quattro-II/f-shaft-II */
Rhyme 3:f3d19ad49aee 88 #if 1
Rhyme 3:f3d19ad49aee 89 #define PIN_SCL PTB2
Rhyme 3:f3d19ad49aee 90 #define PIN_SDA PTB3
Rhyme 3:f3d19ad49aee 91 #endif
Rhyme 3:f3d19ad49aee 92 #if 0
Rhyme 3:f3d19ad49aee 93 #define PIN_SCL PTC10
Rhyme 3:f3d19ad49aee 94 #define PIN_SDA PTC11
Rhyme 3:f3d19ad49aee 95 #endif
Rhyme 0:74347dd8a032 96 /* SPI */
Rhyme 0:74347dd8a032 97 #define PIN_SCK PTD5
Rhyme 0:74347dd8a032 98 #define PIN_MISO PTD7
Rhyme 0:74347dd8a032 99 #define PIN_MOSI PTD6
Rhyme 0:74347dd8a032 100 #define PIN_CS0 PTD4
Rhyme 0:74347dd8a032 101 /* Interrupt */
Rhyme 3:f3d19ad49aee 102 //#define PIN_INT0 PTA1
Rhyme 3:f3d19ad49aee 103 //#define PIN_INT1 PTB19
Rhyme 3:f3d19ad49aee 104 //#define PIN_INT2 PTC6
Rhyme 3:f3d19ad49aee 105 //#define PIN_INT3 PTC3
Rhyme 3:f3d19ad49aee 106 //#define PIN_INT4 PTB18
Rhyme 3:f3d19ad49aee 107 //#define PIN_INT5 PTA4
Rhyme 3:f3d19ad49aee 108 #define PIN_INT0 PTB16
Rhyme 3:f3d19ad49aee 109 #define PIN_INT1 PTB17
Rhyme 3:f3d19ad49aee 110 #define PIN_INT2 PTB18
Rhyme 3:f3d19ad49aee 111 #define PIN_INT3 PTB19
Rhyme 0:74347dd8a032 112 /* Analog Input */
Rhyme 0:74347dd8a032 113 #define PIN_AN0 PTB0
Rhyme 0:74347dd8a032 114 #define PIN_AN1 PTB1
Rhyme 0:74347dd8a032 115 #define PIN_AN2 PTC1
Rhyme 0:74347dd8a032 116 #define PIN_AN3 PTC2
Rhyme 3:f3d19ad49aee 117 // #define PIN_AN4 PTB3
Rhyme 3:f3d19ad49aee 118 // #define PIN_AN5 PTB2
Rhyme 3:f3d19ad49aee 119 // #define BOARD_NAME "FRDM-K22F"
Rhyme 3:f3d19ad49aee 120 #define BOARD_NAME "f-shaft-II"
Rhyme 0:74347dd8a032 121
Rhyme 0:74347dd8a032 122 #elif defined (TARGET_KL05Z)
Rhyme 0:74347dd8a032 123 /* I2C */
Rhyme 0:74347dd8a032 124 #define PIN_SCL PTB3
Rhyme 0:74347dd8a032 125 #define PIN_SDA PTB4
Rhyme 0:74347dd8a032 126 /* SPI */
Rhyme 0:74347dd8a032 127 #define PIN_SCK PTB0
Rhyme 0:74347dd8a032 128 #define PIN_MISO PTA6
Rhyme 0:74347dd8a032 129 #define PIN_MOSI PTA7
Rhyme 0:74347dd8a032 130 #define PIN_CS0 PTA5
Rhyme 0:74347dd8a032 131 /* Interrupt */
Rhyme 0:74347dd8a032 132 #define PIN_INT0 PTB11
Rhyme 0:74347dd8a032 133 #define PIN_INT1 PTB10
Rhyme 0:74347dd8a032 134 #define PIN_INT2 PTB7
Rhyme 0:74347dd8a032 135 #define PIN_INT3 PTB6
Rhyme 0:74347dd8a032 136 #define PIN_INT4 PTA12
Rhyme 0:74347dd8a032 137 #define PIN_INT5 PTA10
Rhyme 0:74347dd8a032 138 /* Analog Input */
Rhyme 0:74347dd8a032 139 #define PIN_AN0 PTB8
Rhyme 0:74347dd8a032 140 #define PIN_AN1 PTB9
Rhyme 0:74347dd8a032 141 #define PIN_AN2 PTA8
Rhyme 0:74347dd8a032 142 #define PIN_AN3 PTA0
Rhyme 0:74347dd8a032 143 #define PIN_AN4 PTA9
Rhyme 0:74347dd8a032 144 #define PIN_AN5 PTB13
Rhyme 0:74347dd8a032 145 #define BOARD_NAME "FRDM-KL05Z"
Rhyme 0:74347dd8a032 146
Rhyme 3:f3d19ad49aee 147 #elif defined (TARGET_F411RE)
Rhyme 0:74347dd8a032 148 /* I2C */
Rhyme 0:74347dd8a032 149 #define PIN_SCL PB_8
Rhyme 0:74347dd8a032 150 #define PIN_SDA PB_9
Rhyme 0:74347dd8a032 151 /* SPI */
Rhyme 0:74347dd8a032 152 #define PIN_SCK PA_5
Rhyme 0:74347dd8a032 153 #define PIN_MISO PA_6
Rhyme 0:74347dd8a032 154 #define PIN_MOSI PA_7
Rhyme 0:74347dd8a032 155 #define PIN_CS0 PB_6
Rhyme 0:74347dd8a032 156 /* Interrupt */
Rhyme 0:74347dd8a032 157 #define PIN_INT0 PC_7
Rhyme 0:74347dd8a032 158 #define PIN_INT1 PA_9
Rhyme 0:74347dd8a032 159 #define PIN_INT2 PA_8
Rhyme 0:74347dd8a032 160 #define PIN_INT3 PB_10
Rhyme 0:74347dd8a032 161 #define PIN_INT4 PB_4
Rhyme 0:74347dd8a032 162 #define PIN_INT5 PB_5
Rhyme 0:74347dd8a032 163 /* Analog In */
Rhyme 0:74347dd8a032 164 #define PIN_AN0 PA_0
Rhyme 0:74347dd8a032 165 #define PIN_AN1 PA_1
Rhyme 0:74347dd8a032 166 #define PIN_AN2 PA_4
Rhyme 0:74347dd8a032 167 #define PIN_AN3 PB_0
Rhyme 0:74347dd8a032 168 #define PIN_AN4 PC_1
Rhyme 0:74347dd8a032 169 #define PIN_AN5 PC_0
Rhyme 0:74347dd8a032 170 #define BOARD_NAME "NUCLEO-F411RE"
Rhyme 0:74347dd8a032 171
Rhyme 3:f3d19ad49aee 172 #elif defined (TARGET_MAX32600MBED)
Rhyme 3:f3d19ad49aee 173 /* I2C */
Rhyme 3:f3d19ad49aee 174 #define PIN_SCL P2_7
Rhyme 3:f3d19ad49aee 175 #define PIN_SDA P2_6
Rhyme 3:f3d19ad49aee 176 /* SPI */
Rhyme 3:f3d19ad49aee 177 #define PIN_SCK P2_0
Rhyme 3:f3d19ad49aee 178 #define PIN_MISO P2_2
Rhyme 3:f3d19ad49aee 179 #define PIN_MOSI P2_1
Rhyme 3:f3d19ad49aee 180 #define PIN_CS0 P2_3
Rhyme 3:f3d19ad49aee 181 /* Interrupt */
Rhyme 3:f3d19ad49aee 182 #define PIN_INT0 P2_4
Rhyme 3:f3d19ad49aee 183 #define PIN_INT1 P2_5
Rhyme 3:f3d19ad49aee 184 #define PIN_INT2 P1_7
Rhyme 3:f3d19ad49aee 185 #define PIN_INT3 P1_6
Rhyme 3:f3d19ad49aee 186 #define PIN_INT4 P1_5
Rhyme 3:f3d19ad49aee 187 #define PIN_INT5 P1_4
Rhyme 3:f3d19ad49aee 188 /* Analog In */
Rhyme 3:f3d19ad49aee 189 #define PIN_AN0 AIN_0P
Rhyme 3:f3d19ad49aee 190 #define PIN_AN1 AIN_1P
Rhyme 3:f3d19ad49aee 191 #define PIN_AN2 AIN_2P
Rhyme 3:f3d19ad49aee 192 #define PIN_AN3 AIN_3P
Rhyme 3:f3d19ad49aee 193 #define PIN_AN4 AIN_4P
Rhyme 3:f3d19ad49aee 194 #define PIN_AN5 AIN_5P
Rhyme 3:f3d19ad49aee 195 #define BOARD_NAME "MAX32600MBED"
Rhyme 3:f3d19ad49aee 196
Rhyme 0:74347dd8a032 197 #else
Rhyme 0:74347dd8a032 198 #error TARGET NOT DEFINED
Rhyme 0:74347dd8a032 199 /* I2C */
Rhyme 0:74347dd8a032 200 #define PIN_SCL D15
Rhyme 0:74347dd8a032 201 #define PIN_SDA D14
Rhyme 0:74347dd8a032 202 /* SPI */
Rhyme 0:74347dd8a032 203 #define PIN_SCK D13
Rhyme 0:74347dd8a032 204 #define PIN_MISO D12
Rhyme 0:74347dd8a032 205 #define PIN_MOSI D11
Rhyme 0:74347dd8a032 206 #define PIN_CS0 D10
Rhyme 0:74347dd8a032 207 /* Interrupt */
Rhyme 0:74347dd8a032 208 #define PIN_INT0 D9
Rhyme 0:74347dd8a032 209 #define PIN_INT1 D8
Rhyme 0:74347dd8a032 210 #define PIN_INT2 D7
Rhyme 0:74347dd8a032 211 #define PIN_INT3 D6
Rhyme 0:74347dd8a032 212 #define PIN_INT4 D5
Rhyme 0:74347dd8a032 213 #define PIN_INT5 D4
Rhyme 0:74347dd8a032 214 /* Analog In */
Rhyme 0:74347dd8a032 215 #define PIN_AN0 A0
Rhyme 0:74347dd8a032 216 #define PIN_AN1 A1
Rhyme 0:74347dd8a032 217 #define PIN_AN2 A2
Rhyme 0:74347dd8a032 218 #define PIN_AN3 A3
Rhyme 0:74347dd8a032 219 #define PIN_AN4 A4
Rhyme 0:74347dd8a032 220 #define PIN_AN5 A5
Rhyme 0:74347dd8a032 221 /* MSS on board LEDs */
Rhyme 0:74347dd8a032 222 #define LED_D1 D13
Rhyme 0:74347dd8a032 223 #define LED_D2 D12
Rhyme 0:74347dd8a032 224 #define LED_D3 D11
Rhyme 0:74347dd8a032 225 #define LED_D4 D10
Rhyme 0:74347dd8a032 226 #define LED_D5 D3
Rhyme 0:74347dd8a032 227 #define LED_D6 D2
Rhyme 0:74347dd8a032 228 #define LED_D7 D1
Rhyme 0:74347dd8a032 229 #define LED_D8 D0
Rhyme 0:74347dd8a032 230
Rhyme 3:f3d19ad49aee 231
Rhyme 3:f3d19ad49aee 232
Rhyme 0:74347dd8a032 233 #endif
Rhyme 0:74347dd8a032 234
Rhyme 0:74347dd8a032 235 #endif /* _MSS_H_ */