Add an initial stab at a GD32 mcu support driver

pull/1148/head
Jesse Vincent 3 years ago
parent cd41471643
commit 4ca969092b
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -0,0 +1,51 @@
/* -*- mode: c++ -*-
* driver::MCU::GD32 -- GD32 MCU driver for Kaleidoscope, initially targeting the GD32F303 series
* Copyright (C) 2019, 2020 Keyboard.io, Inc
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "kaleidoscope/driver/mcu/Base.h" // for Base, BaseProps
namespace kaleidoscope {
namespace driver {
namespace mcu {
struct GD32Props : public kaleidoscope::driver::mcu::BaseProps {
};
#ifndef KALEIDOSCOPE_VIRTUAL_BUILD
template<typename _Props>
class GD32 : public kaleidoscope::driver::mcu::Base<_Props> {
public:
void detachFromHost() {
USBCore::disconnect();
}
void attachToHost() {
USBCore::connect();
}
void setup() {
}
};
#else
template<typename _Props>
class GD32 : public kaleidoscope::driver::mcu::Base<_Props> {};
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD
} // namespace mcu
} // namespace driver
} // namespace kaleidoscope
Loading…
Cancel
Save