Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers UARTs.h Source File

UARTs.h

00001 #define UART0                               (UI_8) 0
00002 #define UART1                               (UI_8) 1
00003 #define UART2                               (UI_8) 2
00004 #define UART3                               (UI_8) 3
00005 
00006 #define DATABITS5                           (UI_8) 5
00007 #define DATABITS6                           (UI_8) 6
00008 #define DATABITS7                           (UI_8) 7
00009 #define DATABITS8                           (UI_8) 8
00010 
00011 #define STOPBITS1                           (UI_8) 1
00012 #define STOPBITS2                           (UI_8) 2
00013 #define STOPBITS1ANDHALF                    (UI_8) 2
00014 
00015 #define PARITYNONE                          (UI_8) 0
00016 #define PARITYODD                           (UI_8) 1
00017 #define PARITYEVEN                          (UI_8) 3
00018 #define PARITYFORCED1                       (UI_8) 5
00019 #define PARITYFORCED0                       (UI_8) 7
00020 
00021 #define BREAKDISABLE                        (UI_8) 0
00022 #define BREAKENABLE                         (UI_8) 1
00023 
00024 #define DIVLATCHACCESSBITDISABLE            (UI_8) 0
00025 #define DIVLATCHACCESSBITENABLE             (UI_8) 1
00026 
00027 #define MASK_DIVISOR_LATCH_ACCESS_BIT       (UI_8) 128
00028 
00029 extern void init_UARTs( UI_8 number_of_UART     /* number of interface 0=UART0, 1=UART1, 2=UART2, 3=UART3 */
00030             ,UI_8 data_bits_count   /* count of data bits  5,6,7,8 */
00031             ,UI_8 stop_bits_count   /* count of stop bits  1=1, 2=2 (if data_bits==5 then stopbits=1and1/2) */
00032             ,UI_8 type_of_parity    /* type of parity      0=fixed "0", 1=fixed "1", 2=odd , 3=even, 4=none (without parity bit) */
00033             ,UI_8 break_control     /* 0=disable 1=enable */
00034             );