int __io_putchar(int ch)
{
	if (ch == '\n') {
		char c = '\r';

		cdc_write(&c, 1);
	}

	return cdc_write((char *)&ch, 1);
}
示例#2
0
void
new_data(uint8_t *data, size_t len)
{
        onboard_led(-1);
        cdc_write(data, len, &loopback);
        cdc_read_more(&loopback);
}
示例#3
0
文件: vcdc.c 项目: AM7000000/mchck
static void
new_data(uint8_t *data, size_t len)
{
    printf("received: `%*s'\n", len, data);
    cdc_write(data, len, &cdc);
    cdc_read_more(&cdc);
}
示例#4
0
static void
new_data(uint8_t *data, size_t len)
{
        onboard_led(-1);
        cdc_write(data, len, &cdc);
}
示例#5
0
ssize_t
cdc_write_string(const char *s, struct cdc_ctx *ctx)
{
        return (cdc_write((const void *)s, strlen(s), ctx));
}
示例#6
0
static size_t
cdc_stdio_write(const uint8_t *buf, size_t len, void *data)
{
        return (cdc_write(buf, len, data));
}
示例#7
0
void
reply_write(const uint8_t *buf, size_t len)
{
        cdc_write(buf, len, &cdc);
}