On Tue, 23 Mar 1999, Joerg Lichtin wrote:
> I have posted the same question a few days ago, so I thought I can trie
> it one more time . So is there anybody who can give me some help, how to
> put the UART into a direct SIR mode without any IRDA overhaed protocol.
> (no zero pulses) I have read every serial and HW header file, but don't
> know how to use them.
Note that you aren't doing IrDA of any shape, so what you apparently need
to do is redirect the UART to the Ir LED and receiver.
I think the following two or three lines will do this, but it might not
work, and you should download the dragonball hardware manual to see what I
am doing and reset things before you close the serial port.
This WILL get you into trouble, and may cause temporary or permanent
hardware problems, so don't say you haven't been warned.
First, some defines:
#define UART_POLARITY_INVERTED 0x000C
#define RSDISABLE 0xfff7
Word *UART_MISC_REG = (Word *) 0xfffff908;
Word *UART_PORTJ_REG = (Word *) 0xfffff438;
Word *UART_PORTG_REG = (Word *) 0xfffff430;
To switch from the rs232 driver to the Ir Hardware:
*UART_PORTJ_REG &= 0xffcf;
*UART_PORTG_REG &= RSDISABLE;
You may or may not need:
*UART_MISC_REG |= UART_POLARITY_INVERTED;