Ignore:
Timestamp:
Apr 5, 2019, 9:26:53 PM (5 years ago)
Author:
coas-nagasima
Message:

mbed関連を更新
シリアルドライバをmbedのHALを使うよう変更
ファイルディスクリプタの処理を更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_arm/trunk/asp3_dcre/target/gr_peach_gcc/tSIOPortGRPeach.cdl

    r352 r374  
    5050 */
    5151import_C("gr_peach.h");
    52 import_C("rza1.h");
     52import_C("device.h");
    5353
    5454/*
    5555 *  FIFO内蔵シリアルコミュニケーションインタフェース用 簡易SIOドライバ
    5656 */
    57 import("tSCIF.cdl");
     57import("tMbedSerial.cdl");
    5858
    5959/*
     
    7373        call                    sSIOPort        cSIOPort;
    7474        [inline] entry  siSIOCBR        eiSIOCBR;
    75 
    76         /*
    77          *  割込み要求ライン操作のための結合
    78          */
    79         call    sInterruptRequest       cRxInterruptRequest;
    80         call    sInterruptRequest       cTxInterruptRequest;
    8175};
    8276
     
    8579 *  ト)のセルタイプ
    8680 */
    87 [active]
    8881composite tSIOPortGRPeach {
    8982        /*
     
    9790         */
    9891        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 */
    10494                uint32_t        baudRate = 115200;                      /* ボーレートの設定値 */
    10595        };
     
    10898         *  SIOドライバ
    10999         */
    110         cell tSCIF SCIF {
    111                 baseAddress = composite.baseAddress;
     100        cell tMbedSerial MbedSerial {
     101                tx          = composite.tx;
     102                rx          = composite.rx;
    112103                baudRate    = composite.baudRate;
    113104                ciSIOCBR    = SIOPortMain.eiSIOCBR;
     
    119110        cell tSIOPortGRPeachMain SIOPortMain {
    120111                ciSIOCBR            => composite.ciSIOCBR;
    121                 cSIOPort            = SCIF.eSIOPort;
    122                 cRxInterruptRequest = RxInterruptRequest.eInterruptRequest;
    123                 cTxInterruptRequest = TxInterruptRequest.eInterruptRequest;
     112                cSIOPort            = MbedSerial.eSIOPort;
    124113        };
    125114        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         };
    152115};
    153116
     
    157120 *  サンプルプログラムが使うポートが,SIOPortTarget1に固定されているた
    158121 *  め,ポート1とポート3を入れ換えている.具体的には,SIOPortTarget1は
    159  *  SCIFのチャネル2(チャネル番号は0から始まるので,ポート3のこと)に,
    160  *  SIOPortTarget3はSCIFのチャネル0につながっている.
     122 *  MbedSerialのチャネル2(チャネル番号は0から始まるので,ポート3のこと)に,
     123 *  SIOPortTarget3はMbedSerialのチャネル0につながっている.
    161124 */
    162125[prototype]
    163126cell tSIOPortGRPeach SIOPortTarget1 {
    164127        /* 属性の設定 */
    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");
    168130};
    169131
     
    171133cell tSIOPortGRPeach SIOPortTarget2 {
    172134        /* 属性の設定 */
    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");
    176137};
    177138
     
    179140cell tSIOPortGRPeach SIOPortTarget3 {
    180141        /* 属性の設定 */
    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");
    184144};
    185145
     
    187147cell tSIOPortGRPeach SIOPortTarget4 {
    188148        /* 属性の設定 */
    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");
    192151};
    193152
     
    195154cell tSIOPortGRPeach SIOPortTarget5 {
    196155        /* 属性の設定 */
    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");
    200158};
    201159
     
    203161cell tSIOPortGRPeach SIOPortTarget6 {
    204162        /* 属性の設定 */
    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");
    208165};
    209166
     
    211168cell tSIOPortGRPeach SIOPortTarget7 {
    212169        /* 属性の設定 */
    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");
    216172};
    217173
     
    219175cell tSIOPortGRPeach SIOPortTarget8 {
    220176        /* 属性の設定 */
    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]
     182cell tSIOPortGRPeach SIOPortTarget9 {
     183        /* 属性の設定 */
     184        tx = C_EXP("P8_14");
     185        rx = C_EXP("P8_15");
     186};
     187
     188[prototype]
     189cell tSIOPortGRPeach SIOPortTarget10 {
     190        /* 属性の設定 */
     191        tx = C_EXP("P8_13");
     192        rx = C_EXP("P8_11");
     193};
     194
     195[prototype]
     196cell tSIOPortGRPeach SIOPortTarget11 {
     197        /* 属性の設定 */
     198        tx = C_EXP("P11_10");
     199        rx = C_EXP("P11_11");
     200};
     201
     202[prototype]
     203cell tSIOPortGRPeach SIOPortTarget12 {
     204        /* 属性の設定 */
     205        tx = C_EXP("P6_6");
     206        rx = C_EXP("P6_7");
     207};
     208
     209[prototype]
     210cell tSIOPortGRPeach SIOPortTarget13 {
     211        /* 属性の設定 */
     212        tx = C_EXP("P5_6");
     213        rx = C_EXP("P5_7");
     214};
     215
     216[prototype]
     217cell tSIOPortGRPeach SIOPortTarget14 {
     218        /* 属性の設定 */
     219        tx = C_EXP("P11_1");
     220        rx = C_EXP("P11_2");
     221};
     222
     223[prototype]
     224cell 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.