- Timestamp:
- Apr 5, 2019, 9:26:53 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_arm/trunk/asp3_dcre/target/gr_peach_gcc/tSIOPortGRPeach.cdl
r352 r374 50 50 */ 51 51 import_C("gr_peach.h"); 52 import_C(" rza1.h");52 import_C("device.h"); 53 53 54 54 /* 55 55 * FIFO内蔵シリアルコミュニケーションインタフェース用 簡易SIOドライバ 56 56 */ 57 import("t SCIF.cdl");57 import("tMbedSerial.cdl"); 58 58 59 59 /* … … 73 73 call sSIOPort cSIOPort; 74 74 [inline] entry siSIOCBR eiSIOCBR; 75 76 /*77 * 割込み要求ライン操作のための結合78 */79 call sInterruptRequest cRxInterruptRequest;80 call sInterruptRequest cTxInterruptRequest;81 75 }; 82 76 … … 85 79 * ト)のセルタイプ 86 80 */ 87 [active]88 81 composite tSIOPortGRPeach { 89 82 /* … … 97 90 */ 98 91 attr { 99 uintptr_t baseAddress; /* ベースアドレス */ 100 INTNO rxInterruptNumber; /* 受信割込み番号 */ 101 INTNO txInterruptNumber; /* 送信割込み番号 */ 102 PRI isrPriority = 1; /* ISR優先度 */ 103 PRI interruptPriority = -4; /* 割込み優先度 */ 92 int32_t tx; /* 送信Pin */ 93 int32_t rx; /* 受信Pin */ 104 94 uint32_t baudRate = 115200; /* ボーレートの設定値 */ 105 95 }; … … 108 98 * SIOドライバ 109 99 */ 110 cell tSCIF SCIF { 111 baseAddress = composite.baseAddress; 100 cell tMbedSerial MbedSerial { 101 tx = composite.tx; 102 rx = composite.rx; 112 103 baudRate = composite.baudRate; 113 104 ciSIOCBR = SIOPortMain.eiSIOCBR; … … 119 110 cell tSIOPortGRPeachMain SIOPortMain { 120 111 ciSIOCBR => composite.ciSIOCBR; 121 cSIOPort = SCIF.eSIOPort; 122 cRxInterruptRequest = RxInterruptRequest.eInterruptRequest; 123 cTxInterruptRequest = TxInterruptRequest.eInterruptRequest; 112 cSIOPort = MbedSerial.eSIOPort; 124 113 }; 125 114 composite.eSIOPort => SIOPortMain.eSIOPort; 126 127 /*128 * SIOの受信割込みサービスルーチンと割込み要求ライン129 */130 cell tISR RxISRInstance {131 interruptNumber = composite.rxInterruptNumber;132 isrPriority = composite.isrPriority;133 ciISRBody = SCIF.eiRxISR;134 };135 cell tInterruptRequest RxInterruptRequest {136 interruptNumber = composite.rxInterruptNumber;137 interruptPriority = composite.interruptPriority;138 };139 140 /*141 * SIOの受信割込みサービスルーチンと割込み要求ライン142 */143 cell tISR TxISRInstance {144 interruptNumber = composite.txInterruptNumber;145 isrPriority = composite.isrPriority;146 ciISRBody = SCIF.eiTxISR;147 };148 cell tInterruptRequest TxInterruptRequest {149 interruptNumber = composite.txInterruptNumber;150 interruptPriority = composite.interruptPriority;151 };152 115 }; 153 116 … … 157 120 * サンプルプログラムが使うポートが,SIOPortTarget1に固定されているた 158 121 * め,ポート1とポート3を入れ換えている.具体的には,SIOPortTarget1は 159 * SCIFのチャネル2(チャネル番号は0から始まるので,ポート3のこと)に,160 * SIOPortTarget3は SCIFのチャネル0につながっている.122 * MbedSerialのチャネル2(チャネル番号は0から始まるので,ポート3のこと)に, 123 * SIOPortTarget3はMbedSerialのチャネル0につながっている. 161 124 */ 162 125 [prototype] 163 126 cell tSIOPortGRPeach SIOPortTarget1 { 164 127 /* 属性の設定 */ 165 baseAddress = C_EXP("SCIF2_BASE"); 166 rxInterruptNumber = C_EXP("INTNO_SCIF2_RXI"); 167 txInterruptNumber = C_EXP("INTNO_SCIF2_TXI"); 128 tx = C_EXP("P6_3"); 129 rx = C_EXP("P6_2"); 168 130 }; 169 131 … … 171 133 cell tSIOPortGRPeach SIOPortTarget2 { 172 134 /* 属性の設定 */ 173 baseAddress = C_EXP("SCIF1_BASE"); 174 rxInterruptNumber = C_EXP("INTNO_SCIF1_RXI"); 175 txInterruptNumber = C_EXP("INTNO_SCIF1_TXI"); 135 tx = C_EXP("P2_5"); 136 rx = C_EXP("P2_6"); 176 137 }; 177 138 … … 179 140 cell tSIOPortGRPeach SIOPortTarget3 { 180 141 /* 属性の設定 */ 181 baseAddress = C_EXP("SCIF0_BASE"); 182 rxInterruptNumber = C_EXP("INTNO_SCIF0_RXI"); 183 txInterruptNumber = C_EXP("INTNO_SCIF0_TXI"); 142 tx = C_EXP("P4_12"); 143 rx = C_EXP("P4_13"); 184 144 }; 185 145 … … 187 147 cell tSIOPortGRPeach SIOPortTarget4 { 188 148 /* 属性の設定 */ 189 baseAddress = C_EXP("SCIF3_BASE"); 190 rxInterruptNumber = C_EXP("INTNO_SCIF3_RXI"); 191 txInterruptNumber = C_EXP("INTNO_SCIF3_TXI"); 149 tx = C_EXP("P2_14"); 150 rx = C_EXP("P2_15"); 192 151 }; 193 152 … … 195 154 cell tSIOPortGRPeach SIOPortTarget5 { 196 155 /* 属性の設定 */ 197 baseAddress = C_EXP("SCIF4_BASE"); 198 rxInterruptNumber = C_EXP("INTNO_SCIF4_RXI"); 199 txInterruptNumber = C_EXP("INTNO_SCIF4_TXI"); 156 tx = C_EXP("P4_14"); 157 rx = C_EXP("P4_15"); 200 158 }; 201 159 … … 203 161 cell tSIOPortGRPeach SIOPortTarget6 { 204 162 /* 属性の設定 */ 205 baseAddress = C_EXP("SCIF5_BASE"); 206 rxInterruptNumber = C_EXP("INTNO_SCIF5_RXI"); 207 txInterruptNumber = C_EXP("INTNO_SCIF5_TXI"); 163 tx = C_EXP("P5_3"); 164 rx = C_EXP("P5_4"); 208 165 }; 209 166 … … 211 168 cell tSIOPortGRPeach SIOPortTarget7 { 212 169 /* 属性の設定 */ 213 baseAddress = C_EXP("SCIF6_BASE"); 214 rxInterruptNumber = C_EXP("INTNO_SCIF6_RXI"); 215 txInterruptNumber = C_EXP("INTNO_SCIF6_TXI"); 170 tx = C_EXP("P8_8"); 171 rx = C_EXP("P8_9"); 216 172 }; 217 173 … … 219 175 cell tSIOPortGRPeach SIOPortTarget8 { 220 176 /* 属性の設定 */ 221 baseAddress = C_EXP("SCIF7_BASE"); 222 rxInterruptNumber = C_EXP("INTNO_SCIF7_RXI"); 223 txInterruptNumber = C_EXP("INTNO_SCIF7_TXI"); 224 }; 177 tx = C_EXP("P5_0"); 178 rx = C_EXP("P5_1"); 179 }; 180 181 [prototype] 182 cell tSIOPortGRPeach SIOPortTarget9 { 183 /* 属性の設定 */ 184 tx = C_EXP("P8_14"); 185 rx = C_EXP("P8_15"); 186 }; 187 188 [prototype] 189 cell tSIOPortGRPeach SIOPortTarget10 { 190 /* 属性の設定 */ 191 tx = C_EXP("P8_13"); 192 rx = C_EXP("P8_11"); 193 }; 194 195 [prototype] 196 cell tSIOPortGRPeach SIOPortTarget11 { 197 /* 属性の設定 */ 198 tx = C_EXP("P11_10"); 199 rx = C_EXP("P11_11"); 200 }; 201 202 [prototype] 203 cell tSIOPortGRPeach SIOPortTarget12 { 204 /* 属性の設定 */ 205 tx = C_EXP("P6_6"); 206 rx = C_EXP("P6_7"); 207 }; 208 209 [prototype] 210 cell tSIOPortGRPeach SIOPortTarget13 { 211 /* 属性の設定 */ 212 tx = C_EXP("P5_6"); 213 rx = C_EXP("P5_7"); 214 }; 215 216 [prototype] 217 cell tSIOPortGRPeach SIOPortTarget14 { 218 /* 属性の設定 */ 219 tx = C_EXP("P11_1"); 220 rx = C_EXP("P11_2"); 221 }; 222 223 [prototype] 224 cell tSIOPortGRPeach SIOPortTarget15 { 225 /* 属性の設定 */ 226 tx = C_EXP("P7_4"); 227 rx = C_EXP("P7_5"); 228 };
Note:
See TracChangeset
for help on using the changeset viewer.