mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-28 17:24:50 -04:00
reworked usb serial communication (#1766)
This commit is contained in:
parent
58307aee9c
commit
7a4c3184a1
14 changed files with 188 additions and 53 deletions
|
@ -1,11 +1,12 @@
|
|||
extern "C" {
|
||||
#include "usb_serial_io.h"
|
||||
#include "usb_serial_device_to_host.h"
|
||||
#include "usb_serial_cdc.h"
|
||||
}
|
||||
|
||||
#include "usb_serial_shell.hpp"
|
||||
#include "usb_serial.hpp"
|
||||
#include "portapack.hpp"
|
||||
#include "usb_serial_host_to_device.hpp"
|
||||
|
||||
#include <libopencm3/cm3/common.h>
|
||||
#include <libopencm3/lpc43xx/usb.h>
|
||||
|
@ -24,6 +25,7 @@ void USBSerial::initialize() {
|
|||
|
||||
init_serial_usb_driver(&SUSBD1);
|
||||
shellInit();
|
||||
init_host_to_device();
|
||||
}
|
||||
|
||||
void USBSerial::dispatch() {
|
||||
|
@ -35,7 +37,11 @@ void USBSerial::dispatch() {
|
|||
create_shell(_eventDispatcher);
|
||||
}
|
||||
|
||||
bulk_out_receive();
|
||||
schedule_host_to_device_transfer();
|
||||
}
|
||||
|
||||
void USBSerial::dispatch_transfer() {
|
||||
complete_host_to_device_transfer();
|
||||
}
|
||||
|
||||
void USBSerial::on_channel_opened() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue