Compare commits
2 commits
e45a899c43
...
e4ea3dd431
Author | SHA1 | Date | |
---|---|---|---|
|
e4ea3dd431 | ||
|
51634ffd6b |
|
@ -293,7 +293,7 @@ short uart_open(p_channel chan, const unsigned char * spec, short mode) {
|
|||
uart_setbps(cdev_to_uart(chan->dev), bps_code);
|
||||
|
||||
// Get the next token
|
||||
token = strtok_r(spec_copy, ",", &saveptr);
|
||||
token = strtok_r(NULL, ",", &saveptr);
|
||||
if (token) {
|
||||
// Parse the data bit count
|
||||
i = atoi(token);
|
||||
|
@ -320,7 +320,7 @@ short uart_open(p_channel chan, const unsigned char * spec, short mode) {
|
|||
}
|
||||
|
||||
// Get the next token
|
||||
token = strtok_r(spec_copy, ",", &saveptr);
|
||||
token = strtok_r(NULL, ",", &saveptr);
|
||||
if (token) {
|
||||
// Parse the stop bit count (1 or 2)
|
||||
i = atoi(token);
|
||||
|
@ -334,7 +334,7 @@ short uart_open(p_channel chan, const unsigned char * spec, short mode) {
|
|||
}
|
||||
|
||||
// Get the next token
|
||||
token = strtok_r(spec_copy, ",", &saveptr);
|
||||
token = strtok_r(NULL, ",", &saveptr);
|
||||
if (token) {
|
||||
// NONE, ODD, EVEN, MARK, or SPACE
|
||||
if (strcmp(token, "NONE") == 0) {
|
||||
|
|
|
@ -246,11 +246,11 @@ void initialize() {
|
|||
}
|
||||
#endif
|
||||
|
||||
// if (res = uart_install()) {
|
||||
// log_num(LOG_ERROR, "FAILED: serial port initialization", res);
|
||||
// } else {
|
||||
// log(LOG_INFO, "Serial ports initialized.");
|
||||
// }
|
||||
if ((res = uart_install())) {
|
||||
log_num(LOG_ERROR, "FAILED: serial port initialization", res);
|
||||
} else {
|
||||
log(LOG_INFO, "Serial ports initialized.");
|
||||
}
|
||||
|
||||
if ((res = fsys_init())) {
|
||||
log_num(LOG_ERROR, "FAILED: file system initialization", res);
|
||||
|
|
Loading…
Reference in a new issue