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