OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-newlib/] [newlib-1.17.0/] [libgloss/] [scarts_32/] [UART_cfg.h] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 jlechner
/* UART device driver for SCARTS.
2
 * Copyright (C) 2010, 2011 Embedded Computing Systems Group,
3
 * Department of Computer Engineering, Vienna University of Technology.
4
 * Contributed by Martin Walter <mwalter@opencores.org>
5
 *
6
 * The authors hereby grant permission to use, copy, modify, distribute,
7
 * and license this software and its documentation for any purpose, provided
8
 * that existing copyright notices are retained in all copies and that this
9
 * notice is included verbatim in any distributions. No written agreement,
10
 * license, or royalty fee is required for any of the authorized uses.
11
 * Modifications to this software may be copyrighted by their authors
12
 * and need not follow the licensing terms described here, provided that
13
 * the new terms are clearly indicated on the first page of each file where
14
 * they apply.
15
 */
16
 
17
#ifndef __DEV_UART_CFG_H__
18
#define __DEV_UART_CFG_H__
19
 
20
#include <inttypes.h>
21
 
22
#define UART_CFG_FCLK_25MHZ 25000000
23
#define UART_CFG_FCLK_40MHZ 40000000
24
 
25
#define UART_CFG_BAUD_9600     9600
26
#define UART_CFG_BAUD_19200   19200
27
#define UART_CFG_BAUD_38400   38400
28
#define UART_CFG_BAUD_57600   57600
29
#define UART_CFG_BAUD_115200 115200
30
#define UART_CFG_BAUD_230400 230400
31
#define UART_CFG_BAUD_460800 460800
32
#define UART_CFG_BAUD_921600 921600
33
 
34
#define UART_CFG_MSG_LEN_1    0
35
#define UART_CFG_MSG_LEN_2    1
36
#define UART_CFG_MSG_LEN_3    2
37
#define UART_CFG_MSG_LEN_4    3
38
#define UART_CFG_MSG_LEN_5    4
39
#define UART_CFG_MSG_LEN_6    5
40
#define UART_CFG_MSG_LEN_7    6
41
#define UART_CFG_MSG_LEN_8    7
42
#define UART_CFG_MSG_LEN_9    8
43
#define UART_CFG_MSG_LEN_10   9
44
#define UART_CFG_MSG_LEN_11  10
45
#define UART_CFG_MSG_LEN_12  11
46
#define UART_CFG_MSG_LEN_13  12
47
#define UART_CFG_MSG_LEN_14  13
48
#define UART_CFG_MSG_LEN_15  14
49
#define UART_CFG_MSG_LEN_16  15
50
#define UART_CFG_PARITY_NONE  0
51
#define UART_CFG_PARITY_ODD   1
52
#define UART_CFG_PARITY_EVEN  2
53
#define UART_CFG_STOP_BITS_1  0
54
#define UART_CFG_STOP_BITS_2  1
55
 
56
typedef struct
57
{
58
  unsigned int msg_len   : 4;
59
  unsigned int parity    : 2;
60
  unsigned int stop_bits : 1;
61
} UART_Frame;
62
 
63
typedef struct
64
{
65
  uint32_t fclk;
66
  uint32_t baud;
67
  UART_Frame frame;
68
} UART_Cfg;
69
 
70
#endif
71
 

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.