[93] | 1 | /*
|
---|
| 2 | * TOPPERS/SSP Kernel
|
---|
| 3 | * Smallest Set Profile Kernel
|
---|
| 4 | *
|
---|
| 5 | * Copyright (C) 2007 by Embedded and Real-Time Systems Laboratory
|
---|
| 6 | * Graduate School of Information Science, Nagoya Univ., JAPAN
|
---|
| 7 | * Copyright (C) 2015 by Naoki Saito
|
---|
| 8 | * Nagoya Municipal Industrial Research Institute, JAPAN
|
---|
| 9 | *
|
---|
| 10 | * ãLì ÒÍCȺÌ(1)`(4)Ìðð½·êÉÀèC{\tgEF
|
---|
| 11 | * Ai{\tgEFAðüϵ½àÌðÜÞDȺ¯¶jðgpE¡»Eü
|
---|
| 12 | * ÏEÄzziȺCpÆÄÔj·é±Æð³Åø·éD
|
---|
| 13 | * (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
|
---|
| 14 | * \¦C±Ìpð¨æѺL̳ÛØKèªC»ÌÜÜÌ`Å\[
|
---|
| 15 | * XR[hÉÜÜêÄ¢é±ÆD
|
---|
| 16 | * (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJÉg
|
---|
| 17 | * pÅ«é`ÅÄzz·éêÉÍCÄzzɺ¤hL
|
---|
| 18 | gip
|
---|
| 19 | * Ò}j
|
---|
| 20 | AÈÇjÉCãLÌì \¦C±Ìpð¨æѺL
|
---|
| 21 | * ̳ÛØKèðfÚ·é±ÆD
|
---|
| 22 | * (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJÉg
|
---|
| 23 | * pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
|
---|
| 24 | * ÆD
|
---|
| 25 | * (a) Äzzɺ¤hL
|
---|
| 26 | gipÒ}j
|
---|
| 27 | AÈÇjÉCãLÌ
|
---|
| 28 | * ì \¦C±Ìpð¨æѺL̳ÛØKèðfÚ·é±ÆD
|
---|
| 29 | * (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
|
---|
| 30 | * ñ·é±ÆD
|
---|
| 31 | * (4) {\tgEFAÌpÉæè¼ÚIܽÍÔÚIɶ¶é¢©Èé¹
|
---|
| 32 | * Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
|
---|
| 33 | * ܽC{\tgEFAÌ[UܽÍGh[U©çÌ¢©Èé
|
---|
| 34 | * RÉîÿ©çàCãLì Ò¨æÑTOPPERSvWFNgð
|
---|
| 35 | * ÆÓ·é±ÆD
|
---|
| 36 | *
|
---|
| 37 | * {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
|
---|
| 38 | * æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄCÁèÌgpÚI
|
---|
| 39 | * ÉηéK«àÜßÄC¢©ÈéÛØàsíÈ¢DܽC{\tgEF
|
---|
| 40 | * AÌpÉæè¼ÚIܽÍÔÚIɶ¶½¢©Èé¹QÉÖµÄàC»
|
---|
| 41 | * ÌÓCðíÈ¢D
|
---|
| 42 | *
|
---|
| 43 | */
|
---|
| 44 |
|
---|
| 45 | /*
|
---|
| 46 | * VAI/OfoCXiSIOjhCo(CQ-FRM-FM3p)
|
---|
| 47 | */
|
---|
| 48 |
|
---|
| 49 | #ifndef TOPPERS_TARGET_SERIAL_H
|
---|
| 50 | #define TOPPERS_TARGET_SERIAL_H
|
---|
| 51 |
|
---|
| 52 | #include "cq_frm_fm3.h"
|
---|
| 53 | #include "target_syssvc.h"
|
---|
| 54 |
|
---|
| 55 | /*
|
---|
| 56 | * SIOÌÝxN^Ô
|
---|
| 57 | */
|
---|
| 58 | #if (SIO_PORTID == 1)
|
---|
| 59 | #define INHNO_SIO_TX INT_MFS0_TX
|
---|
| 60 | #define INTNO_SIO_TX INT_MFS0_TX
|
---|
| 61 | #define INHNO_SIO_RX INT_MFS0_RX
|
---|
| 62 | #define INTNO_SIO_RX INT_MFS0_RX
|
---|
| 63 | #elif (SIO_PORTID == 2)
|
---|
| 64 | #define INHNO_SIO_TX INT_MFS4_TX
|
---|
| 65 | #define INTNO_SIO_TX INT_MFS4_TX
|
---|
| 66 | #define INHNO_SIO_RX INT_MFS4_RX
|
---|
| 67 | #define INTNO_SIO_RX INT_MFS4_RX
|
---|
| 68 | #endif
|
---|
| 69 | #define INTPRI_SIO -3 /* ÝDæx */
|
---|
| 70 | #define INTATR_SIO 0 /* Ý®« */
|
---|
| 71 |
|
---|
| 72 | /*
|
---|
| 73 | * R[obN[`̯ÊÔ
|
---|
| 74 | */
|
---|
| 75 | #define SIO_RDY_SND 1U /* MÂ\R[obN */
|
---|
| 76 | #define SIO_RDY_RCV 2U /* óMÊmR[obN */
|
---|
| 77 |
|
---|
| 78 | #ifndef TOPPERS_MACRO_ONLY
|
---|
| 79 |
|
---|
| 80 | /*
|
---|
| 81 | * VA|[gÌÇubN
|
---|
| 82 | */
|
---|
| 83 | typedef struct sio_port_control_block {
|
---|
| 84 | ID port;
|
---|
| 85 | uint32_t reg;
|
---|
| 86 | intptr_t exinf;
|
---|
| 87 | } SIOPCB;
|
---|
| 88 |
|
---|
| 89 | /*
|
---|
| 90 | * SIOú»
|
---|
| 91 | */
|
---|
| 92 | extern void sio_initialize(intptr_t exinf);
|
---|
| 93 |
|
---|
| 94 | /*
|
---|
| 95 | * VAI[v
|
---|
| 96 | */
|
---|
| 97 | extern SIOPCB *sio_opn_por(ID siopid, intptr_t exinf);
|
---|
| 98 |
|
---|
| 99 | /*
|
---|
| 100 | * VAN[Y
|
---|
| 101 | */
|
---|
| 102 | extern void sio_cls_por(SIOPCB *p_siopcb);
|
---|
| 103 |
|
---|
| 104 | /*
|
---|
| 105 | * Ýnh
|
---|
| 106 | */
|
---|
| 107 | extern void sio_isr_tx(intptr_t exinf);
|
---|
| 108 | extern void sio_isr_rx(intptr_t exinf);
|
---|
| 109 |
|
---|
| 110 | /*
|
---|
| 111 | * 1¶M
|
---|
| 112 | */
|
---|
| 113 | extern bool_t sio_snd_chr(SIOPCB *siopcb, char c);
|
---|
| 114 |
|
---|
| 115 | /*
|
---|
| 116 | * 1¶óM
|
---|
| 117 | */
|
---|
| 118 | extern int_t sio_rcv_chr(SIOPCB *siopcb);
|
---|
| 119 |
|
---|
| 120 | /*
|
---|
| 121 | * R[obNÌÂ
|
---|
| 122 | */
|
---|
| 123 | extern void sio_ena_cbr(SIOPCB *siopcb, uint_t cbrtn);
|
---|
| 124 |
|
---|
| 125 | /*
|
---|
| 126 | * R[obNÌÖ~
|
---|
| 127 | */
|
---|
| 128 | extern void sio_dis_cbr(SIOPCB *siopcb, uint_t cbrtn);
|
---|
| 129 |
|
---|
| 130 | /*
|
---|
| 131 | * MÂ\R[obN
|
---|
| 132 | */
|
---|
| 133 | extern void sio_irdy_snd(intptr_t exinf);
|
---|
| 134 |
|
---|
| 135 | /*
|
---|
| 136 | * óMÊmR[obN
|
---|
| 137 | */
|
---|
| 138 | extern void sio_irdy_rcv(intptr_t exinf);
|
---|
| 139 |
|
---|
| 140 | /*
|
---|
| 141 | * 1¶Mi|[OÅÌoÍj
|
---|
| 142 | */
|
---|
| 143 | extern void sio_pol_snd_chr(char c, ID siopid);
|
---|
| 144 |
|
---|
| 145 | /*
|
---|
| 146 | * ^[QbgÌVAú»
|
---|
| 147 | */
|
---|
| 148 | extern void target_usart_init(ID siopid);
|
---|
| 149 |
|
---|
| 150 | /*
|
---|
| 151 | * áxoÍú»
|
---|
| 152 | */
|
---|
| 153 | extern void target_low_output_init(ID siopid);
|
---|
| 154 |
|
---|
| 155 | #endif /* TOPPERS_MACRO_ONLY */
|
---|
| 156 | #endif /* TOPPERS_TARGET_SERIAL_H */
|
---|