Mercurial > nand-ecoscentric
changeset 1754:5650657d3c26
Assert DTR/RTS modem signals
| author | gthomas |
|---|---|
| date | Thu, 16 Sep 2004 21:50:47 +0000 |
| parents | 1cb798c09c9a |
| children | d61d51cfd8ab |
| files | packages/hal/powerpc/ppc40x/current/ChangeLog packages/hal/powerpc/ppc40x/current/src/hal_diag.c |
| diffstat | 2 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/hal/powerpc/ppc40x/current/ChangeLog +++ b/packages/hal/powerpc/ppc40x/current/ChangeLog @@ -1,3 +1,7 @@ +2004-09-16 Gary Thomas <gary@mlbassoc.com> + + * src/hal_diag.c: Assert RTS/DTR modem signals. + 2004-02-26 Gary Thomas <gary@mlbassoc.com> * src/ppc405_pci.c:
--- a/packages/hal/powerpc/ppc40x/current/src/hal_diag.c +++ b/packages/hal/powerpc/ppc40x/current/src/hal_diag.c @@ -9,7 +9,7 @@ // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. -// Copyright (C) 2002, 2003 Gary Thomas +// Copyright (C) 2002, 2003, 2004 Gary Thomas // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -119,6 +119,10 @@ #define SIO_LSR_TEMT 0x40 // transmitter register empty #define SIO_LSR_ERR 0x80 // any error condition +// Modem control register +#define SIO_MCR_DTR 0x01 // [inverted] DTR +#define SIO_MCR_RTS 0x02 // [inverted] RTS + // The modem status register bits. #define SIO_MSR_DCTS 0x01 // delta clear to send #define SIO_MSR_DDSR 0x02 // delta data set ready @@ -198,6 +202,9 @@ init_serial_channel(const channel_data_t // Enable FIFOs (and clear them). HAL_WRITE_UINT8(base+CYG_DEV_SERIAL_FCR, (SIO_FCR_FCR0 | SIO_FCR_FCR1 | SIO_FCR_FCR2)); + + // Assert handshake signals + HAL_WRITE_UINT8(base+CYG_DEV_SERIAL_MCR, (SIO_MCR_DTR|SIO_MCR_RTS)); } static cyg_bool
