FreeCalypso > hg > tcs211-l1-reconst
comparison chipsetsw/system/bootloader/inc/serial.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
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__ */ |