comparison src/cs/system/bootloader/inc/serial.h @ 0:945cf7f506b2

src/cs: chipsetsw import from tcs211-fcmodem binary blobs and LCD demo files have been excluded, all line endings are LF only
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 25 Sep 2016 22:50:11 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:945cf7f506b2
1 /*******************************************************************************
2 *
3 * SERIAL.H
4 *
5 * This module contains functions to send or receive commands on the USART 8251.
6 * Only polled mode is used.
7 *
8 * (C) Texas Instruments 1998
9 *
10 ******************************************************************************/
11
12 #ifndef __SERIAL_H__
13 #define __SERIAL_H__
14
15 #include "main/sys_types.h"
16
17 /*
18 * ser_receive_command and ser_receive_char have 2 modes:
19 * SER_INFINITE : Waits until a command is received.
20 * SER_IMMEDIATE: Returns imediately even if no character is received.
21 */
22
23 enum {
24 SER_INFINITE,
25 SER_IMMEDIATE
26 };
27
28 /*
29 * Return values of ser_receive_data_for_flash.
30 */
31
32 enum {
33 SER_DATA_READY,
34 SER_DATA_ERROR,
35 SER_END_OF_FILE
36 };
37
38 extern void ser_wait_no_activity (SYS_UWORD8 device_id);
39 extern long ser_send_command (SYS_UWORD8 *command, SYS_UWORD8 device_id);
40 extern SYS_UWORD8 ser_receive_command (SYS_UWORD8 *command, int mode);
41 extern long ser_receive_data_for_flash (SYS_UWORD32 *address, SYS_UWORD16 *data, SYS_UWORD8 device_id);
42 extern void ser_initialize_flash_data_detection (void);
43 extern void ser_initialize_serial_link (void);
44 extern void ser_wait_last_character_sent (SYS_UWORD8 device_id);
45
46 #endif /* __SERIAL_H__ */