マクロ定義 | |
#define | TNUM_SIOP 2 |
#define | SIO_RDY_SND 1U |
#define | SIO_RDY_RCV 2U |
型定義 | |
typedef struct sio_port_control_block | SIOPCB |
関数 | |
void | upd72001_initialize (void) |
bool_t | upd72001_openflag (void) |
SIOPCB * | upd72001_opn_por (ID siopid, intptr_t exinf) |
void | upd72001_cls_por (SIOPCB *siopcb) |
bool_t | upd72001_snd_chr (SIOPCB *siopcb, char_t c) |
int_t | upd72001_rcv_chr (SIOPCB *siopcb) |
void | upd72001_ena_cbr (SIOPCB *siopcb, uint_t cbrtn) |
void | upd72001_dis_cbr (SIOPCB *siopcb, uint_t cbrtn) |
void | upd72001_isr (void) |
void | upd72001_irdy_snd (intptr_t exinf) |
void | upd72001_irdy_rcv (intptr_t exinf) |
#define SIO_RDY_RCV 2U |
#define SIO_RDY_SND 1U |
upd72001.h の 65 行で定義されています。
参照元 serial_snd_chr(), sio_irdy_snd(), upd72001_dis_cbr(), と upd72001_ena_cbr().
#define TNUM_SIOP 2 |
typedef struct sio_port_control_block SIOPCB |
upd72001.h の 60 行で定義されています。
void upd72001_cls_por | ( | SIOPCB * | siopcb | ) |
upd72001.c の 327 行で定義されています。
参照先 CR1_DOWN, sio_port_initialization_block::ctrl, sio_port_control_block::openflag, sio_port_control_block::p_siopinib, UPD72001_CR1, と upd72001_write_ctrl().
参照元 sio_cls_por().
00328 { 00329 upd72001_write_ctrl(p_siopcb->p_siopinib->ctrl, UPD72001_CR1, CR1_DOWN); 00330 p_siopcb->openflag = false; 00331 }
upd72001.c の 383 行で定義されています。
参照先 sio_port_control_block::cr1, CR1_RECV, CR1_SEND, sio_port_initialization_block::ctrl, sio_port_control_block::p_siopinib, SIO_RDY_RCV, SIO_RDY_SND, UPD72001_CR1, と upd72001_write_ctrl().
参照元 sio_dis_cbr().
00384 { 00385 uint8_t cr1_bit = 0; 00386 00387 switch (cbrtn) { 00388 case SIO_RDY_SND: 00389 cr1_bit = CR1_SEND; 00390 break; 00391 case SIO_RDY_RCV: 00392 cr1_bit = CR1_RECV; 00393 break; 00394 } 00395 p_siopcb->cr1 &= ~cr1_bit; 00396 upd72001_write_ctrl(p_siopcb->p_siopinib->ctrl, 00397 UPD72001_CR1, p_siopcb->cr1); 00398 }
upd72001.c の 362 行で定義されています。
参照先 sio_port_control_block::cr1, CR1_RECV, CR1_SEND, sio_port_initialization_block::ctrl, sio_port_control_block::p_siopinib, SIO_RDY_RCV, SIO_RDY_SND, UPD72001_CR1, と upd72001_write_ctrl().
参照元 sio_ena_cbr().
00363 { 00364 uint8_t cr1_bit = 0; 00365 00366 switch (cbrtn) { 00367 case SIO_RDY_SND: 00368 cr1_bit = CR1_SEND; 00369 break; 00370 case SIO_RDY_RCV: 00371 cr1_bit = CR1_RECV; 00372 break; 00373 } 00374 p_siopcb->cr1 |= cr1_bit; 00375 upd72001_write_ctrl(p_siopcb->p_siopinib->ctrl, 00376 UPD72001_CR1, p_siopcb->cr1); 00377 }
void upd72001_initialize | ( | void | ) |
upd72001.c の 265 行で定義されています。
参照先 sio_port_control_block::openflag, sio_port_control_block::p_siopinib, と TNUM_SIOP.
参照元 sio_initialize().
00266 { 00267 SIOPCB *p_siopcb; 00268 uint_t i; 00269 00270 /* 00271 * シリアルI/Oポート管理ブロックの初期化 00272 */ 00273 for (p_siopcb = siopcb_table, i = 0; i < TNUM_SIOP; p_siopcb++, i++) { 00274 p_siopcb->p_siopinib = &(siopinib_table[i]); 00275 p_siopcb->openflag = false; 00276 } 00277 }
void upd72001_irdy_rcv | ( | intptr_t | exinf | ) |
target_serial.c の 172 行で定義されています。
参照先 sio_irdy_rcv().
参照元 upd72001_isr_siop().
00173 { 00174 sio_irdy_rcv(exinf); 00175 }
void upd72001_irdy_snd | ( | intptr_t | exinf | ) |
target_serial.c の 163 行で定義されています。
参照先 sio_irdy_snd().
参照元 upd72001_isr_siop().
00164 { 00165 sio_irdy_snd(exinf); 00166 }
void upd72001_isr | ( | void | ) |
upd72001.c の 424 行で定義されています。
参照先 upd72001_eoi(), と upd72001_isr_siop().
参照元 sio_isr().
00425 { 00426 if (siopcb_table[0].openflag) { 00427 upd72001_isr_siop(&(siopcb_table[0])); 00428 } 00429 if (siopcb_table[1].openflag) { 00430 upd72001_isr_siop(&(siopcb_table[1])); 00431 } 00432 upd72001_eoi(); 00433 }
bool_t upd72001_openflag | ( | void | ) |
upd72001.c の 283 行で定義されています。
参照元 sio_cls_por(), sio_opn_por(), と upd72001_opn_por().
00284 { 00285 return(siopcb_table[0].openflag || siopcb_table[1].openflag); 00286 }
upd72001.c の 292 行で定義されています。
参照先 sio_port_initialization_block::brg1_def, sio_port_initialization_block::brg2_def, sio_port_control_block::cr1, CR10_DEF, CR14_DEF, CR15_DEF, CR1_DOWN, sio_port_initialization_block::cr3_def, sio_port_initialization_block::cr4_def, sio_port_initialization_block::cr5_def, CR_RESET, sio_port_initialization_block::ctrl, sio_port_control_block::exinf, get_siopcb, sio_port_control_block::getready, sio_port_control_block::openflag, sio_port_control_block::p_siopinib, sio_port_control_block::putready, TADR_UPD72001_CTRLA, TADR_UPD72001_CTRLB, UPD72001_CR1, UPD72001_CR10, UPD72001_CR12, UPD72001_CR14, UPD72001_CR15, UPD72001_CR2, UPD72001_CR3, UPD72001_CR4, UPD72001_CR5, upd72001_openflag(), upd72001_write_brg(), upd72001_write_ctrl(), と upd72001_write_reg().
参照元 sio_opn_por().
00293 { 00294 SIOPCB *p_siopcb; 00295 const SIOPINIB *p_siopinib; 00296 00297 p_siopcb = get_siopcb(siopid); 00298 p_siopinib = p_siopcb->p_siopinib; 00299 00300 upd72001_write_reg(p_siopinib->ctrl, CR_RESET); 00301 if (!upd72001_openflag()) { 00302 upd72001_write_ctrl((void *) TADR_UPD72001_CTRLA, UPD72001_CR2, 0x18); 00303 upd72001_write_ctrl((void *) TADR_UPD72001_CTRLB, UPD72001_CR2, 0x00); 00304 } 00305 p_siopcb->cr1 = CR1_DOWN; 00306 upd72001_write_ctrl(p_siopinib->ctrl, UPD72001_CR1, p_siopcb->cr1); 00307 upd72001_write_ctrl(p_siopinib->ctrl, UPD72001_CR4, p_siopinib->cr4_def); 00308 upd72001_write_brg(p_siopinib->ctrl, UPD72001_CR12, 0x01U, 00309 p_siopinib->brg2_def, p_siopinib->brg1_def); 00310 upd72001_write_brg(p_siopinib->ctrl, UPD72001_CR12, 0x02U, 00311 p_siopinib->brg2_def, p_siopinib->brg1_def); 00312 upd72001_write_ctrl(p_siopinib->ctrl, UPD72001_CR15, CR15_DEF); 00313 upd72001_write_ctrl(p_siopinib->ctrl, UPD72001_CR14, CR14_DEF); 00314 upd72001_write_ctrl(p_siopinib->ctrl, UPD72001_CR10, CR10_DEF); 00315 upd72001_write_ctrl(p_siopinib->ctrl, UPD72001_CR3, p_siopinib->cr3_def); 00316 upd72001_write_ctrl(p_siopinib->ctrl, UPD72001_CR5, p_siopinib->cr5_def); 00317 p_siopcb->exinf = exinf; 00318 p_siopcb->getready = p_siopcb->putready = false; 00319 p_siopcb->openflag = true; 00320 return(p_siopcb); 00321 }
upd72001.c の 350 行で定義されています。
参照先 upd72001_getchar(), と upd72001_getready().
参照元 sio_rcv_chr().
00351 { 00352 if (upd72001_getready(p_siopcb)) { 00353 return((int_t)(uint8_t) upd72001_getchar(p_siopcb)); 00354 } 00355 return(-1); 00356 }
upd72001.c の 337 行で定義されています。
参照先 upd72001_putchar(), と upd72001_putready().
参照元 sio_snd_chr().
00338 { 00339 if (upd72001_putready(p_siopcb)) { 00340 upd72001_putchar(p_siopcb, c); 00341 return(true); 00342 } 00343 return(false); 00344 }
Copyright © 2008 by Kijineko Inc.