Ejemplo n.º 1
0
void usb_vcp_send_strn_cooked(const char *str, int len) {
#ifdef USE_DEVICE_MODE
    if (dev_is_enabled) {
        for (const char *top = str + len; str < top; str++) {
            if (*str == '\n') {
                USBD_CDC_TxAlways((const uint8_t*)"\r\n", 2);
            } else {
                USBD_CDC_TxAlways((const uint8_t*)str, 1);
            }
        }
    }
#endif
}
Ejemplo n.º 2
0
void usb_vcp_send_strn_cooked(const char *str, int len) {
#ifdef USE_DEVICE_MODE
    if (pyb_usb_flags & PYB_USB_FLAG_DEV_ENABLED) {
        for (const char *top = str + len; str < top; str++) {
            if (*str == '\n') {
                USBD_CDC_TxAlways((const uint8_t*)"\r\n", 2);
            } else {
                USBD_CDC_TxAlways((const uint8_t*)str, 1);
            }
        }
    }
#endif
}
Ejemplo n.º 3
0
void usb_vcp_send_strn(const char *str, int len) {
#ifdef USE_DEVICE_MODE
    if (dev_is_enabled) {
        USBD_CDC_TxAlways((const uint8_t*)str, len);
    }
#endif
}
Ejemplo n.º 4
0
void usb_vcp_send_strn(const char *str, int len) {
#ifdef USE_DEVICE_MODE
    if (pyb_usb_flags & PYB_USB_FLAG_DEV_ENABLED) {
        USBD_CDC_TxAlways((const uint8_t*)str, len);
    }
#endif
}
Ejemplo n.º 5
0
//*****************************************************************************
// print callback for microrl library
void print (const char * str)
{
	int i = 0;
	USBD_CDC_TxAlways((uint8_t*)str, (uint32_t)strlen(str));
}