Intermediate step in the examples tree, looking to get USB working correctly on the
429 still
This commit is contained in:
committed by
Piotr Esden-Tempski
parent
e4d106dce6
commit
a3ff2c9250
@@ -17,6 +17,8 @@
|
||||
## along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
##
|
||||
|
||||
OBJS = console.o
|
||||
|
||||
BINARY = cdcacm
|
||||
|
||||
LDSCRIPT = ../stm32f4-discovery.ld
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <libopencm3/usb/usbd.h>
|
||||
#include <libopencm3/usb/cdc.h>
|
||||
#include <libopencm3/cm3/scb.h>
|
||||
#include "console.h"
|
||||
|
||||
static const struct usb_device_descriptor dev = {
|
||||
.bLength = USB_DT_DEVICE_SIZE,
|
||||
@@ -208,6 +209,7 @@ static void cdcacm_data_rx_cb(usbd_device *usbd_dev, uint8_t ep)
|
||||
|
||||
static void cdcacm_set_config(usbd_device *usbd_dev, uint16_t wValue)
|
||||
{
|
||||
console_puts("set config called.\n");
|
||||
(void)wValue;
|
||||
|
||||
usbd_ep_setup(usbd_dev, 0x01, USB_ENDPOINT_ATTR_BULK, 64,
|
||||
@@ -227,6 +229,8 @@ int main(void)
|
||||
usbd_device *usbd_dev;
|
||||
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_120MHZ]);
|
||||
console_setup();
|
||||
console_puts("USB demo (orig)\n");
|
||||
|
||||
rcc_periph_clock_enable(RCC_GPIOA);
|
||||
rcc_periph_clock_enable(RCC_OTGFS);
|
||||
|
||||
Reference in New Issue
Block a user