- Timestamp:
- Apr 5, 2019, 9:26:53 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_rx/trunk/asp3_dcre/target/gr_sakura_gcc/tSIOPortGRSakura.cdl
r337 r374 51 51 */ 52 52 import_C("gr_sakura.h"); 53 import_C(" rx630.h");53 import_C("device.h"); 54 54 55 55 /* 56 56 * FIFO内蔵シリアルコミュニケーションインタフェース用 簡易SIOドライバ 57 57 */ 58 import("t SCIF.cdl");58 import("tMbedSerial.cdl"); 59 59 60 60 /* … … 74 74 call sSIOPort cSIOPort; 75 75 [inline] entry siSIOCBR eiSIOCBR; 76 77 /*78 * 割込み要求ライン操作のための結合79 */80 call sInterruptRequest cRxInterruptRequest;81 call sInterruptRequest cTxInterruptRequest;82 76 }; 83 77 … … 86 80 * ト)のセルタイプ 87 81 */ 88 [active]89 82 composite tSIOPortGRSakura { 90 83 /* … … 98 91 */ 99 92 attr { 100 uintptr_t baseAddress; /* ベースアドレス */ 101 INTNO rxInterruptNumber; /* 受信割込み番号 */ 102 INTNO txInterruptNumber; /* 送信割込み番号 */ 103 PRI isrPriority = 1; /* ISR優先度 */ 104 PRI interruptPriority = -4; /* 割込み優先度 */ 93 int32_t tx; /* 送信Pin */ 94 int32_t rx; /* 受信Pin */ 105 95 uint32_t baudRate = 115200; /* ボーレートの設定値 */ 106 96 }; … … 109 99 * SIOドライバ 110 100 */ 111 cell tSCIF SCIF { 112 baseAddress = composite.baseAddress; 101 cell tMbedSerial MbedSerial { 102 tx = composite.tx; 103 rx = composite.rx; 113 104 baudRate = composite.baudRate; 114 105 ciSIOCBR = SIOPortMain.eiSIOCBR; … … 120 111 cell tSIOPortGRSakuraMain SIOPortMain { 121 112 ciSIOCBR => composite.ciSIOCBR; 122 cSIOPort = SCIF.eSIOPort; 123 cRxInterruptRequest = RxInterruptRequest.eInterruptRequest; 124 cTxInterruptRequest = TxInterruptRequest.eInterruptRequest; 113 cSIOPort = MbedSerial.eSIOPort; 125 114 }; 126 115 composite.eSIOPort => SIOPortMain.eSIOPort; 127 128 /*129 * SIOの受信割込みサービスルーチンと割込み要求ライン130 */131 cell tISR RxISRInstance {132 interruptNumber = composite.rxInterruptNumber;133 isrPriority = composite.isrPriority;134 ciISRBody = SCIF.eiRxISR;135 };136 cell tInterruptRequest RxInterruptRequest {137 interruptNumber = composite.rxInterruptNumber;138 interruptPriority = composite.interruptPriority;139 };140 141 /*142 * SIOの受信割込みサービスルーチンと割込み要求ライン143 */144 cell tISR TxISRInstance {145 interruptNumber = composite.txInterruptNumber;146 isrPriority = composite.isrPriority;147 ciISRBody = SCIF.eiTxISR;148 };149 cell tInterruptRequest TxInterruptRequest {150 interruptNumber = composite.txInterruptNumber;151 interruptPriority = composite.interruptPriority;152 };153 116 }; 154 117 … … 158 121 * サンプルプログラムが使うポートが,SIOPortTarget1に固定されているた 159 122 * め,ポート1とポート3を入れ換えている.具体的には,SIOPortTarget1は 160 * SCIFのチャネル2(チャネル番号は0から始まるので,ポート3のこと)に,161 * SIOPortTarget3は SCIFのチャネル0につながっている.123 * MbedSerialのチャネル2(チャネル番号は0から始まるので,ポート3のこと)に, 124 * SIOPortTarget3はMbedSerialのチャネル0につながっている. 162 125 */ 163 126 [prototype] 164 127 cell tSIOPortGRSakura SIOPortTarget1 { 165 128 /* 属性の設定 */ 166 baseAddress = C_EXP("SCI0_BASE"); 167 rxInterruptNumber = C_EXP("INT_SCI0_RXI"); 168 txInterruptNumber = C_EXP("INT_SCI0_TEI"); 129 tx = C_EXP("P20"); /* PIN_IO1 */ 130 rx = C_EXP("P21"); /* PIN_IO0 */ 169 131 }; 170 132 … … 172 134 cell tSIOPortGRSakura SIOPortTarget2 { 173 135 /* 属性の設定 */ 174 baseAddress = C_EXP("SCI1_BASE"); 175 rxInterruptNumber = C_EXP("INT_SCI1_RXI"); 176 txInterruptNumber = C_EXP("INT_SCI1_TEI"); 136 tx = C_EXP("P32"); /* PIN_IO6 */ 137 rx = C_EXP("P33"); /* PIN_IO7 */ 177 138 }; 178 139 … … 180 141 cell tSIOPortGRSakura SIOPortTarget3 { 181 142 /* 属性の設定 */ 182 baseAddress = C_EXP("SCI2_BASE"); 183 rxInterruptNumber = C_EXP("INT_SCI2_RXI"); 184 txInterruptNumber = C_EXP("INT_SCI2_TEI"); 143 tx = C_EXP("P50"); /* PIN_IO24 */ 144 rx = C_EXP("P52"); /* PIN_IO26 */ 185 145 }; 186 146 … … 188 148 cell tSIOPortGRSakura SIOPortTarget4 { 189 149 /* 属性の設定 */ 190 baseAddress = C_EXP("SCI3_BASE"); 191 rxInterruptNumber = C_EXP("INT_SCI3_RXI"); 192 txInterruptNumber = C_EXP("INT_SCI3_TEI"); 150 tx = C_EXP("P23"); /* PIN_IO3 */ 151 rx = C_EXP("P25"); /* PIN_IO5 */ 193 152 }; 194 153 … … 196 155 cell tSIOPortGRSakura SIOPortTarget5 { 197 156 /* 属性の設定 */ 198 baseAddress = C_EXP("SCI4_BASE"); 199 rxInterruptNumber = C_EXP("INT_SCI4_RXI"); 200 txInterruptNumber = C_EXP("INT_SCI4_TEI"); 157 tx = C_EXP("PC3"); /* PIN_IO9 */ 158 rx = C_EXP("PC2"); /* PIN_IO8 */ 201 159 }; 202 160 … … 204 162 cell tSIOPortGRSakura SIOPortTarget6 { 205 163 /* 属性の設定 */ 206 baseAddress = C_EXP("SCI5_BASE"); 207 rxInterruptNumber = C_EXP("INT_SCI5_RXI"); 208 txInterruptNumber = C_EXP("INT_SCI5_TEI"); 164 tx = C_EXP("PC7"); /* PIN_IO12 */ 165 rx = C_EXP("PC6"); /* PIN_IO11 */ 209 166 }; 210 167 … … 212 169 cell tSIOPortGRSakura SIOPortTarget7 { 213 170 /* 属性の設定 */ 214 baseAddress = C_EXP("SCI6_BASE"); 215 rxInterruptNumber = C_EXP("INT_SCI6_RXI"); 216 txInterruptNumber = C_EXP("INT_SCI6_TEI"); 171 tx = C_EXP("P26"); /* PIN_IO58 */ 172 rx = C_EXP("P30"); /* PIN_IO60 */ 217 173 }; 218 174 … … 220 176 cell tSIOPortGRSakura SIOPortTarget8 { 221 177 /* 属性の設定 */ 222 baseAddress = NULL; 223 rxInterruptNumber = NULL; 224 txInterruptNumber = NULL; 178 tx = NULL; 179 rx = NULL; 225 180 };
Note:
See TracChangeset
for help on using the changeset viewer.