Browse Source

platform: Moved the aux serial functions into their own header

fix/newlib-file-io-hooks
dragonmux 2 years ago
parent
commit
9b2eb0caad
No known key found for this signature in database GPG Key ID: 64861EA89B35507A
  1. 1
      src/platforms/96b_carbon/platform.c
  2. 1
      src/platforms/blackpillv2/platform.c
  3. 1
      src/platforms/common/aux_serial.c
  4. 29
      src/platforms/common/aux_serial.h
  5. 1
      src/platforms/common/usb_serial.c
  6. 4
      src/platforms/common/usbuart.h
  7. 1
      src/platforms/f072/platform.c
  8. 1
      src/platforms/f3/platform.c
  9. 1
      src/platforms/f4discovery/platform.c
  10. 1
      src/platforms/hydrabus/platform.c
  11. 1
      src/platforms/launchpad-icdi/platform.c
  12. 1
      src/platforms/native/platform.c
  13. 1
      src/platforms/stlink/platform.c
  14. 1
      src/platforms/stm32/usbuart.c
  15. 1
      src/platforms/swlink/platform.c

1
src/platforms/96b_carbon/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>

1
src/platforms/blackpillv2/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/rcc.h>

1
src/platforms/common/aux_serial.c

@ -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)
{

29
src/platforms/common/aux_serial.h

@ -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*/

1
src/platforms/common/usb_serial.c

@ -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>

4
src/platforms/common/usbuart.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);

1
src/platforms/f072/platform.c

@ -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>

1
src/platforms/f3/platform.c

@ -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>

1
src/platforms/f4discovery/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/rcc.h>

1
src/platforms/hydrabus/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/rcc.h>

1
src/platforms/launchpad-icdi/platform.c

@ -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>

1
src/platforms/native/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/rcc.h>

1
src/platforms/stlink/platform.c

@ -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>

1
src/platforms/stm32/usbuart.c

@ -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)

1
src/platforms/swlink/platform.c

@ -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>

Loading…
Cancel
Save