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_rx/trunk/asp3_dcre/target/gr_sakura_gcc/tSIOPortGRSakura.cdl

    r337 r374  
    5151 */
    5252import_C("gr_sakura.h");
    53 import_C("rx630.h");
     53import_C("device.h");
    5454
    5555/*
    5656 *  FIFO内蔵シリアルコミュニケーションインタフェース用 簡易SIOドライバ
    5757 */
    58 import("tSCIF.cdl");
     58import("tMbedSerial.cdl");
    5959
    6060/*
     
    7474        call                    sSIOPort        cSIOPort;
    7575        [inline] entry  siSIOCBR        eiSIOCBR;
    76 
    77         /*
    78          *  割込み要求ライン操作のための結合
    79          */
    80         call    sInterruptRequest       cRxInterruptRequest;
    81         call    sInterruptRequest       cTxInterruptRequest;
    8276};
    8377
     
    8680 *  ト)のセルタイプ
    8781 */
    88 [active]
    8982composite tSIOPortGRSakura {
    9083        /*
     
    9891         */
    9992        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 */
    10595                uint32_t        baudRate = 115200;                      /* ボーレートの設定値 */
    10696        };
     
    10999         *  SIOドライバ
    110100         */
    111         cell tSCIF SCIF {
    112                 baseAddress = composite.baseAddress;
     101        cell tMbedSerial MbedSerial {
     102                tx          = composite.tx;
     103                rx          = composite.rx;
    113104                baudRate    = composite.baudRate;
    114105                ciSIOCBR    = SIOPortMain.eiSIOCBR;
     
    120111        cell tSIOPortGRSakuraMain SIOPortMain {
    121112                ciSIOCBR            => composite.ciSIOCBR;
    122                 cSIOPort            = SCIF.eSIOPort;
    123                 cRxInterruptRequest = RxInterruptRequest.eInterruptRequest;
    124                 cTxInterruptRequest = TxInterruptRequest.eInterruptRequest;
     113                cSIOPort            = MbedSerial.eSIOPort;
    125114        };
    126115        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         };
    153116};
    154117
     
    158121 *  サンプルプログラムが使うポートが,SIOPortTarget1に固定されているた
    159122 *  め,ポート1とポート3を入れ換えている.具体的には,SIOPortTarget1は
    160  *  SCIFのチャネル2(チャネル番号は0から始まるので,ポート3のこと)に,
    161  *  SIOPortTarget3はSCIFのチャネル0につながっている.
     123 *  MbedSerialのチャネル2(チャネル番号は0から始まるので,ポート3のこと)に,
     124 *  SIOPortTarget3はMbedSerialのチャネル0につながっている.
    162125 */
    163126[prototype]
    164127cell tSIOPortGRSakura SIOPortTarget1 {
    165128        /* 属性の設定 */
    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 */
    169131};
    170132
     
    172134cell tSIOPortGRSakura SIOPortTarget2 {
    173135        /* 属性の設定 */
    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 */
    177138};
    178139
     
    180141cell tSIOPortGRSakura SIOPortTarget3 {
    181142        /* 属性の設定 */
    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 */
    185145};
    186146
     
    188148cell tSIOPortGRSakura SIOPortTarget4 {
    189149        /* 属性の設定 */
    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 */
    193152};
    194153
     
    196155cell tSIOPortGRSakura SIOPortTarget5 {
    197156        /* 属性の設定 */
    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 */
    201159};
    202160
     
    204162cell tSIOPortGRSakura SIOPortTarget6 {
    205163        /* 属性の設定 */
    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 */
    209166};
    210167
     
    212169cell tSIOPortGRSakura SIOPortTarget7 {
    213170        /* 属性の設定 */
    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 */
    217173};
    218174
     
    220176cell tSIOPortGRSakura SIOPortTarget8 {
    221177        /* 属性の設定 */
    222         baseAddress       = NULL;
    223         rxInterruptNumber = NULL;
    224         txInterruptNumber = NULL;
     178        tx = NULL;
     179        rx = NULL;
    225180};
Note: See TracChangeset for help on using the changeset viewer.