You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
689 B
C++
33 lines
689 B
C++
4 years ago
|
/**
|
||
|
* @file usbserial.hpp
|
||
|
* @brief Wrapper for ChibiOS's SerialUSBDriver.
|
||
|
*
|
||
4 years ago
|
* Copyright (C) 2021 Clyne Sullivan
|
||
4 years ago
|
*
|
||
|
* Distributed under the GNU GPL v3 or later. You should have received a copy of
|
||
|
* the GNU General Public License along with this program.
|
||
|
* If not, see <https://www.gnu.org/licenses/>.
|
||
|
*/
|
||
|
|
||
4 years ago
|
#ifndef STMDSP_USBSERIAL_HPP_
|
||
|
#define STMDSP_USBSERIAL_HPP_
|
||
|
|
||
4 years ago
|
#include "usbcfg.h"
|
||
4 years ago
|
|
||
4 years ago
|
class USBSerial
|
||
4 years ago
|
{
|
||
4 years ago
|
public:
|
||
|
static void begin();
|
||
4 years ago
|
|
||
4 years ago
|
static bool isActive();
|
||
|
|
||
|
static size_t read(unsigned char *buffer, size_t count);
|
||
|
static size_t write(const unsigned char *buffer, size_t count);
|
||
|
|
||
|
private:
|
||
|
static SerialUSBDriver *m_driver;
|
||
|
};
|
||
4 years ago
|
|
||
|
#endif // STMDSP_USBSERIAL_HPP_
|
||
|
|