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