mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-27 16:56:15 -04:00
Tease apart utility.hpp, other header dependencies.
Trying to get a host-testable FSK demodulator, and finding a lot of M4- and ChibiOS-specific code is getting included. Boo.
This commit is contained in:
parent
e049097f49
commit
f82fd1f8d7
13 changed files with 135 additions and 64 deletions
|
@ -28,8 +28,6 @@
|
|||
#include <complex>
|
||||
#include <memory>
|
||||
|
||||
#include <hal.h>
|
||||
|
||||
#define LOCATE_IN_RAM __attribute__((section(".ramtext")))
|
||||
|
||||
constexpr size_t operator "" _KiB(unsigned long long v) {
|
||||
|
@ -62,18 +60,6 @@ inline constexpr T pow(const T base, unsigned const exponent) {
|
|||
return (exponent == 0) ? 1 : (base * pow(base, exponent - 1));
|
||||
}
|
||||
|
||||
#if defined(LPC43XX_M4)
|
||||
static inline bool m4_flag_saturation() {
|
||||
return __get_APSR() & (1U << 27);
|
||||
}
|
||||
|
||||
static inline void clear_m4_flag_saturation() {
|
||||
uint32_t flags = 1;
|
||||
__asm volatile ("MSR APSR_nzcvqg, %0" : : "r" (flags));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
float complex16_mag_squared_to_dbv_norm(const float c16_mag_squared);
|
||||
|
||||
inline float magnitude_squared(const std::complex<float> c) {
|
||||
|
@ -84,13 +70,6 @@ inline float magnitude_squared(const std::complex<float> c) {
|
|||
return r2 + i2;
|
||||
}
|
||||
|
||||
/* Override new/delete to use Chibi/OS heap functions */
|
||||
/* NOTE: Do not inline these, it doesn't work. ;-) */
|
||||
void* operator new(size_t size);
|
||||
void* operator new[](size_t size);
|
||||
void operator delete(void* p);
|
||||
void operator delete[](void* p);
|
||||
|
||||
namespace std {
|
||||
|
||||
/*! Stephan T Lavavej (STL!) implementation of make_unique, which has been accepted into the C++14 standard.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue