Browse Source
platform: Moved the aux serial functions into their own header
fix/newlib-file-io-hooks
dragonmux
2 years ago
No known key found for this signature in database
GPG Key ID: 64861EA89B35507A
15 changed files with
42 additions and
4 deletions
-
src/platforms/96b_carbon/platform.c
-
src/platforms/blackpillv2/platform.c
-
src/platforms/common/aux_serial.c
-
src/platforms/common/aux_serial.h
-
src/platforms/common/usb_serial.c
-
src/platforms/common/usbuart.h
-
src/platforms/f072/platform.c
-
src/platforms/f3/platform.c
-
src/platforms/f4discovery/platform.c
-
src/platforms/hydrabus/platform.c
-
src/platforms/launchpad-icdi/platform.c
-
src/platforms/native/platform.c
-
src/platforms/stlink/platform.c
-
src/platforms/stm32/usbuart.c
-
src/platforms/swlink/platform.c
|
|
@ -25,6 +25,7 @@ |
|
|
|
#include "general.h" |
|
|
|
#include "usb.h" |
|
|
|
#include "usbuart.h" |
|
|
|
#include "aux_serial.h" |
|
|
|
#include "morse.h" |
|
|
|
|
|
|
|
#include <libopencm3/stm32/f4/rcc.h> |
|
|
|
|
|
@ -25,6 +25,7 @@ |
|
|
|
#include "general.h" |
|
|
|
#include "usb.h" |
|
|
|
#include "usbuart.h" |
|
|
|
#include "aux_serial.h" |
|
|
|
#include "morse.h" |
|
|
|
|
|
|
|
#include <libopencm3/stm32/rcc.h> |
|
|
|
|
|
@ -31,6 +31,7 @@ |
|
|
|
#include "general.h" |
|
|
|
#include "usbuart.h" |
|
|
|
#include "usb.h" |
|
|
|
#include "aux_serial.h" |
|
|
|
|
|
|
|
void aux_serial_set_encoding(struct usb_cdc_line_coding *coding) |
|
|
|
{ |
|
|
|
|
|
@ -0,0 +1,29 @@ |
|
|
|
/*
|
|
|
|
* This file is part of the Black Magic Debug project. |
|
|
|
* |
|
|
|
* Copyright (C) 2022 1BitSquared <info@1bitsquared.com> |
|
|
|
* Written by Rachel Mant <git@dragonmux.network> |
|
|
|
* |
|
|
|
* 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, either version 3 of the License, or |
|
|
|
* (at your option) any later version. |
|
|
|
* |
|
|
|
* 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/>.
|
|
|
|
*/ |
|
|
|
#ifndef AUX_SERIAL_H |
|
|
|
#define AUX_SERIAL_H |
|
|
|
|
|
|
|
#include <libopencm3/usb/usbd.h> |
|
|
|
#include <libopencm3/usb/cdc.h> |
|
|
|
|
|
|
|
void aux_serial_init(void); |
|
|
|
void aux_serial_set_encoding(struct usb_cdc_line_coding *coding); |
|
|
|
|
|
|
|
#endif /*AUX_SERIAL_H*/ |
|
|
@ -47,6 +47,7 @@ |
|
|
|
#include "traceswo.h" |
|
|
|
#endif |
|
|
|
#include "usbuart.h" |
|
|
|
#include "aux_serial.h" |
|
|
|
|
|
|
|
#include <libopencm3/cm3/cortex.h> |
|
|
|
#include <libopencm3/cm3/nvic.h> |
|
|
|
|
|
@ -21,13 +21,9 @@ |
|
|
|
#define __USBUART_H |
|
|
|
|
|
|
|
#include <libopencm3/usb/usbd.h> |
|
|
|
#include <libopencm3/usb/cdc.h> |
|
|
|
|
|
|
|
#include "general.h" |
|
|
|
|
|
|
|
void aux_serial_init(void); |
|
|
|
|
|
|
|
void aux_serial_set_encoding(struct usb_cdc_line_coding *coding); |
|
|
|
void usbuart_usb_out_cb(usbd_device *dev, uint8_t ep); |
|
|
|
void usbuart_usb_in_cb(usbd_device *dev, uint8_t ep); |
|
|
|
|
|
|
|
|
|
@ -24,6 +24,7 @@ |
|
|
|
#include "general.h" |
|
|
|
#include "usb.h" |
|
|
|
#include "usbuart.h" |
|
|
|
#include "aux_serial.h" |
|
|
|
#include "morse.h" |
|
|
|
|
|
|
|
#include <libopencm3/stm32/rcc.h> |
|
|
|
|
|
@ -24,6 +24,7 @@ |
|
|
|
#include "general.h" |
|
|
|
#include "usb.h" |
|
|
|
#include "usbuart.h" |
|
|
|
#include "aux_serial.h" |
|
|
|
#include "morse.h" |
|
|
|
|
|
|
|
#include <libopencm3/stm32/f3/rcc.h> |
|
|
|
|
|
@ -25,6 +25,7 @@ |
|
|
|
#include "general.h" |
|
|
|
#include "usb.h" |
|
|
|
#include "usbuart.h" |
|
|
|
#include "aux_serial.h" |
|
|
|
#include "morse.h" |
|
|
|
|
|
|
|
#include <libopencm3/stm32/rcc.h> |
|
|
|
|
|
@ -25,6 +25,7 @@ |
|
|
|
#include "general.h" |
|
|
|
#include "usb.h" |
|
|
|
#include "usbuart.h" |
|
|
|
#include "aux_serial.h" |
|
|
|
#include "morse.h" |
|
|
|
|
|
|
|
#include <libopencm3/stm32/rcc.h> |
|
|
|
|
|
@ -18,6 +18,7 @@ |
|
|
|
#include "gdb_if.h" |
|
|
|
#include "usb.h" |
|
|
|
#include "usbuart.h" |
|
|
|
#include "aux_serial.h" |
|
|
|
|
|
|
|
#include <libopencm3/lm4f/rcc.h> |
|
|
|
#include <libopencm3/lm4f/nvic.h> |
|
|
|
|
|
@ -25,6 +25,7 @@ |
|
|
|
#include "general.h" |
|
|
|
#include "usb.h" |
|
|
|
#include "usbuart.h" |
|
|
|
#include "aux_serial.h" |
|
|
|
#include "morse.h" |
|
|
|
|
|
|
|
#include <libopencm3/stm32/rcc.h> |
|
|
|
|
|
@ -25,6 +25,7 @@ |
|
|
|
#include "general.h" |
|
|
|
#include "usb.h" |
|
|
|
#include "usbuart.h" |
|
|
|
#include "aux_serial.h" |
|
|
|
|
|
|
|
#include <libopencm3/stm32/rcc.h> |
|
|
|
#include <libopencm3/cm3/scb.h> |
|
|
|
|
|
@ -31,6 +31,7 @@ |
|
|
|
#include "general.h" |
|
|
|
#include "usbuart.h" |
|
|
|
#include "usb.h" |
|
|
|
#include "aux_serial.h" |
|
|
|
|
|
|
|
#ifdef DMA_STREAM0 |
|
|
|
#define dma_channel_reset(dma, channel) dma_stream_reset(dma, channel) |
|
|
|
|
|
@ -26,6 +26,7 @@ |
|
|
|
#include "general.h" |
|
|
|
#include "usb.h" |
|
|
|
#include "usbuart.h" |
|
|
|
#include "aux_serial.h" |
|
|
|
|
|
|
|
#include <libopencm3/stm32/rcc.h> |
|
|
|
#include <libopencm3/cm3/scb.h> |
|
|
|