]> rtime.felk.cvut.cz Git - rpp-test-sw.git/blob - rpp-test-sw/cmdproc/include/cmdproc_io_tisci.h
Merge branch 'cmd_echoserver' of git@rtime.felk.cvut.cz:rpp-test-sw into personal...
[rpp-test-sw.git] / rpp-test-sw / cmdproc / include / cmdproc_io_tisci.h
1 /** @file cmdio_tisci.h
2  *   @brief Texas Instrument SCI IO for cmdProc header file
3  *   @date 1.August.2012
4  *
5  *  Definition of IO for ARM Cortex R4
6  */
7
8
9 #ifndef CMDIO_BUFFER_H_
10 #define CMDIO_BUFFER_H_
11
12 /* Include files */
13 #include "cmdproc.h"
14
15 /**     Puts character into output buffer. Is blocking, when buffer is full.
16  *  @param[in]  cmd_io  IO stack pointer
17  *  @param[in]  ch      Character to be printed
18  *  @return 1 when succes, 0 when fail
19  */
20 int tisci_putc(cmd_io_t *cmd_io, int ch);
21
22 /**     Gets character from input buffer, is blocking when buffer is empty.
23  *  @param[in]  cmd_io  IO stack pointer
24  *  @return     read character
25  */
26 int tisci_getc(cmd_io_t *cmd_io);
27
28 /**
29  * Non-blocking reading of a character.
30  *
31  * @param cmd_io
32  *
33  * @return The read character or -1 if no character is available.
34  */
35 int tisci_getc_nb(cmd_io_t *cmd_io);
36
37 /**     Writes string into output buffer, is blocking when buffer is full.
38  *  @param[in]  cmd_io  IO stack pointer
39  *  @param[in]  buf     String to be written
40  *  @param[in]  count   Number of character to be written
41  *  @return     number of written characters
42  */
43 int tisci_write(cmd_io_t *cmd_io, const void *buf, int count);
44
45 /**     Reads string from input buffer, is blocking when buffer is empty.
46  *  @param[in]  cmd_io  IO stack pointer
47  *  @param[out] buf     Buffer into which string be read
48  *  @param[in]  count   Number of character to be read
49  *  @return     number of read characters
50  */
51 int tisci_read(cmd_io_t *cmd_io, void *buf, int count);
52
53 #endif /* CMDIO_BUFFER_H_ */