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