ARM: use BX when branch to an address in register
[kugel-rb.git] / firmware / target / arm / s3c2440 / uart-s3c2440.h
blob38790af8e8282727f56e6a88d8f22487e988b80a
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
10 * Copyright (C) 2009 by Bob Cousins
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef __UART_S3C2440_H__
23 #define __UART_S3C2440_H__
25 /* target specific */
26 #define DEBUG_UART_PORT 0
28 #define UART_NO_PARITY 0
29 #define UART_ODD_PARITY 4
30 #define UART_EVEN_PARITY 5
31 #define UART_MARK_PARITY 6
32 #define UART_SPACE_PARITY 7
34 #define UART_1_STOP_BIT 0
35 #define UART_2_STOP_BIT 1
37 bool uart_init (void);
38 void uart_printf (const char *format, ...);
40 /* low level routines */
41 bool uart_init_device (unsigned dev);
42 bool uart_config (unsigned dev, unsigned speed, unsigned num_bits, unsigned parity, unsigned stop_bits);
44 bool uart_tx_ready (unsigned dev);
45 bool uart_send_byte (unsigned dev, char ch);
46 bool uart_send_buf (unsigned dev, char *buf, unsigned len);
48 bool uart_rx_ready (unsigned dev);
49 char uart_read_byte (unsigned dev);
52 #endif