コード例 #1
0
ファイル: tty1.c プロジェクト: EPiCS/reconos_v2
void
tty_test( void )
{
    cyg_io_handle_t tty_handle;

    test_open_tty(&tty_handle);

    tty_api_test(&tty_handle);

    CYG_TEST_PASS_FINISH("tty1 test OK");
}
コード例 #2
0
ファイル: tty2.c プロジェクト: lijinlei/Kernel_BOOX60
//---------------------------------------------------------------------------
// TTY test main function.
void
tty_test( void )
{
    char test_msg1[]="This is a test message!\n";
    char test_msg2[]="$O5468697320697320612074657374206d657373616765210d0a#12";
    cyg_uint32 msglen;
    cyg_io_handle_t tty_handle;

    test_open_tty(&tty_handle);

    CYG_TEST_INFO("Writing a raw string to the TTY device...");
    msglen = strlen(&test_msg1[0]);
    Tcyg_io_write(tty_handle, &test_msg1[0], &msglen);

    CYG_TEST_INFO("Writing a GDB encoded string to the TTY device...");
    msglen = strlen(&test_msg2[0]);
    Tcyg_io_write(tty_handle, &test_msg2[0], &msglen);

    CYG_TEST_PASS_FINISH("tty2 test OK");
}