mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
refactoring
This commit is contained in:
parent
893df7272f
commit
8d8d457da2
@ -187,7 +187,7 @@ set(AOPT)
|
|||||||
set(TOPT "-mthumb -DTHUMB")
|
set(TOPT "-mthumb -DTHUMB")
|
||||||
|
|
||||||
# Define C warning options here
|
# Define C warning options here
|
||||||
set(CWARN "-Wall -Wextra -Wstrict-prototypes")
|
set(CWARN "-Wall -Wextra")
|
||||||
|
|
||||||
# Define C++ warning options here
|
# Define C++ warning options here
|
||||||
set(CPPWARN "-Wall -Wextra")
|
set(CPPWARN "-Wall -Wextra")
|
||||||
|
@ -744,8 +744,6 @@ void cpu_clock_init(void)
|
|||||||
CGU_BASE_SSP1_CLK =
|
CGU_BASE_SSP1_CLK =
|
||||||
CGU_BASE_SSP1_CLK_AUTOBLOCK(1) | CGU_BASE_SSP1_CLK_CLK_SEL(CGU_SRC_PLL1);
|
CGU_BASE_SSP1_CLK_AUTOBLOCK(1) | CGU_BASE_SSP1_CLK_CLK_SEL(CGU_SRC_PLL1);
|
||||||
|
|
||||||
// \/ breaks below
|
|
||||||
|
|
||||||
#if (defined JAWBREAKER || defined HACKRF_ONE)
|
#if (defined JAWBREAKER || defined HACKRF_ONE)
|
||||||
/* Disable unused clocks */
|
/* Disable unused clocks */
|
||||||
/* Start with PLLs */
|
/* Start with PLLs */
|
||||||
@ -775,9 +773,6 @@ void cpu_clock_init(void)
|
|||||||
CGU_BASE_CGU_OUT0_CLK = CGU_BASE_CGU_OUT0_CLK_PD(1);
|
CGU_BASE_CGU_OUT0_CLK = CGU_BASE_CGU_OUT0_CLK_PD(1);
|
||||||
CGU_BASE_CGU_OUT1_CLK = CGU_BASE_CGU_OUT1_CLK_PD(1);
|
CGU_BASE_CGU_OUT1_CLK = CGU_BASE_CGU_OUT1_CLK_PD(1);
|
||||||
|
|
||||||
// /\ breaks above
|
|
||||||
|
|
||||||
|
|
||||||
/* Disable unused peripheral clocks */
|
/* Disable unused peripheral clocks */
|
||||||
CCU1_CLK_APB1_CAN1_CFG = 0;
|
CCU1_CLK_APB1_CAN1_CFG = 0;
|
||||||
CCU1_CLK_APB1_I2S_CFG = 0;
|
CCU1_CLK_APB1_I2S_CFG = 0;
|
||||||
|
@ -23,9 +23,6 @@
|
|||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
|
|
||||||
#include "proc_sd_over_usb.hpp"
|
|
||||||
#include "portapack_shared_memory.hpp"
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
void start_usb(void);
|
void start_usb(void);
|
||||||
void irq_usb(void);
|
void irq_usb(void);
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
|
|
||||||
* Copyright (C) 2023 Bernd Herzog
|
|
||||||
*
|
|
||||||
* This file is part of PortaPack.
|
|
||||||
*
|
|
||||||
* 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 2, 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; see the file COPYING. If not, write to
|
|
||||||
* the Free Software Foundation, Inc., 51 Franklin Street,
|
|
||||||
* Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __UI_PROC_SD_OVER_USB_H__
|
|
||||||
#define __UI_PROC_SD_OVER_USB_H__
|
|
||||||
|
|
||||||
#include "portapack_shared_memory.hpp"
|
|
||||||
#include "baseband_processor.hpp"
|
|
||||||
#include "baseband_thread.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
class USBProcessor : public BasebandProcessor {
|
|
||||||
public:
|
|
||||||
void execute(const buffer_c8_t&) override {};
|
|
||||||
|
|
||||||
//void on_message(const Message* const p) override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
|
|
||||||
//bool configured { false };
|
|
||||||
|
|
||||||
//BasebandThread baseband_thread { 3072000, this, NORMALPRIO + 20, baseband::Direction::Transmit };
|
|
||||||
|
|
||||||
|
|
||||||
//RequestSignalMessage sig_message { RequestSignalMessage::Signal::FillRequest };
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*__UI_PROC_SD_OVER_USB_H__*/
|
|
@ -133,7 +133,6 @@ static inline uint16_t bswap_16(const uint16_t x)
|
|||||||
__attribute__ ((always_inline));
|
__attribute__ ((always_inline));
|
||||||
|
|
||||||
static inline uint16_t bswap_16(const uint16_t x) {
|
static inline uint16_t bswap_16(const uint16_t x) {
|
||||||
|
|
||||||
uint8_t tmp;
|
uint8_t tmp;
|
||||||
union { uint16_t x; uint8_t b[2]; } data;
|
union { uint16_t x; uint8_t b[2]; } data;
|
||||||
|
|
||||||
@ -150,9 +149,7 @@ static inline uint32_t bswap_32(const uint32_t x)
|
|||||||
__attribute__ ((const))
|
__attribute__ ((const))
|
||||||
__attribute__ ((always_inline));
|
__attribute__ ((always_inline));
|
||||||
|
|
||||||
|
|
||||||
static inline uint32_t bswap_32(const uint32_t x) {
|
static inline uint32_t bswap_32(const uint32_t x) {
|
||||||
|
|
||||||
uint8_t tmp;
|
uint8_t tmp;
|
||||||
union { uint32_t x; uint8_t b[4]; } data;
|
union { uint32_t x; uint8_t b[4]; } data;
|
||||||
|
|
||||||
@ -173,8 +170,6 @@ static inline uint32_t bswap_32(const uint32_t x) {
|
|||||||
#define cpu_to_be16(x) bswap_16(x)
|
#define cpu_to_be16(x) bswap_16(x)
|
||||||
#define cpu_to_be32(x) bswap_32(x)
|
#define cpu_to_be32(x) bswap_32(x)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void scsi_command(msd_cbw_t *msd_cbw_data);
|
void scsi_command(msd_cbw_t *msd_cbw_data);
|
||||||
|
|
||||||
#endif /* __SCSI_H__ */
|
#endif /* __SCSI_H__ */
|
@ -22,7 +22,6 @@
|
|||||||
#ifndef __USB_SD_OVER_USB_H__
|
#ifndef __USB_SD_OVER_USB_H__
|
||||||
#define __USB_SD_OVER_USB_H__
|
#define __USB_SD_OVER_USB_H__
|
||||||
|
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <common/usb.h>
|
#include <common/usb.h>
|
||||||
#include <common/usb_request.h>
|
#include <common/usb_request.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user