Serial console library for Cerevo CDP-TZ01B.
[詳解]
#include <stdbool.h>
#include <stdint.h>
[ソースコード]
Serial console library for Cerevo CDP-TZ01B.
- 著者
- Cerevo Inc.
bool TZ01_console_getc |
( |
uint8_t * |
c | ) |
|
Get character from serial console.
- 引数
-
- 戻り値
- Result
- 戻り値
-
true | Success. |
false | Failed. |
int TZ01_console_gets |
( |
char * |
buf, |
|
|
int |
max_len |
|
) |
| |
Get string from serial console.
- 引数
-
[out] | buf | string buffer. |
[in] | max_len | Max string length. |
- 戻り値
- Number of characters actually read.
bool TZ01_console_init |
( |
void |
| ) |
|
Initialize serial console.
- 戻り値
- Initialize result.
- 戻り値
-
true | Success. |
false | Failed. |
bool TZ01_console_putc |
( |
uint8_t |
c | ) |
|
Put character to serial console.
- 引数
-
- 戻り値
- Result.
- 戻り値
-
true | Success. |
false | Failed. |
int TZ01_console_puts |
( |
char * |
buf | ) |
|
Put String to serial console.
- 引数
-
- 覚え書き
- `buf' should have been null terminated.
- 戻り値
- Number of byte written.
int TZ01_console_read |
( |
uint8_t * |
buf, |
|
|
int |
len |
|
) |
| |
Read byte data from serial console.
- 引数
-
[out] | buf | Buffer pointer. |
[in] | len | Read length. |
- 戻り値
- Number of bytes actually read.
int TZ01_console_write |
( |
uint8_t * |
buf, |
|
|
int |
len |
|
) |
| |
Write byte data to serial console.
- 引数
-
[in] | buf | Buffer pointer. |
[in] | len | Write data length. |
- 戻り値
- Number of byte written.