stm32f1/lib/usb_cdcacm.h

22 lines
683 B
C
Raw Normal View History

/** library for USB CDC ACM communication (API)
2019-12-06 17:40:34 +01:00
* @file
* @author King Kévin <kingkevin@cuvoodoo.info>
* @copyright SPDX-License-Identifier: GPL-3.0-or-later
2019-12-06 17:40:34 +01:00
* @date 2016-2019
*/
#pragma once
2018-04-03 16:59:02 +02:00
/** flag set to true when user is connected to USB CDC ACM port (e.g. when a terminal is opened) */
extern volatile bool usb_cdcacm_connecting;
/** setup USB CDC ACM peripheral */
2017-04-15 13:57:45 +02:00
void usb_cdcacm_setup(void);
/** send character over USB (non-blocking)
* @param[in] c character to send
* @note blocks if transmit buffer is full, else puts in buffer and returns
2019-03-26 19:27:40 +01:00
*/
2017-04-15 13:57:45 +02:00
void usb_cdcacm_putchar(char c);
/** wait until all is transmitted (blocking)
*/
void usb_cdcacm_flush(void);