summaryrefslogtreecommitdiff
path: root/src/TRK_MINNOW_DOLPHIN/Portable/usr_put.c
blob: f70141de34f6bb4f4d28214191bd491cfb406ab5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
 * usr_put.c
 * Description:
 */

#include "TRK_MINNOW_DOLPHIN/Os/dolphin/usr_put.h"
// #include <os.h>

// void OSReport(char* fmt, ...) causes extra crclr instruction.
// look into issue later
extern void OSReport(char* fmt);

BOOL usr_puts_serial(const char* msg) {
    BOOL connect_ = FALSE;
    char c;
    char buf[2];

    while (!connect_ && (c = *msg++) != '\0') {
        BOOL connect = GetTRKConnected();

        buf[0] = c;
        buf[1] = '\0';

        SetTRKConnected(FALSE);
        OSReport(buf);

        SetTRKConnected(connect);
        connect_ = FALSE;
    }

    return connect_;
}

void usr_put_initialize(void) {}