Compare commits

..

7 Commits

3
.gitmodules vendored

@ -14,6 +14,3 @@
[submodule "gui/source/ImGuiColorTextEdit"] [submodule "gui/source/ImGuiColorTextEdit"]
path = gui/source/ImGuiColorTextEdit path = gui/source/ImGuiColorTextEdit
url = https://github.com/BalazsJako/ImGuiColorTextEdit url = https://github.com/BalazsJako/ImGuiColorTextEdit
[submodule "gui/kissfft"]
path = gui/kissfft
url = https://github.com/mborgerding/kissfft

Binary file not shown.

@ -162,10 +162,10 @@ INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC) \
source source/periph source source/periph
# Define C warning options here. # Define C warning options here.
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes -pedantic -Werror CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes -pedantic
# Define C++ warning options here. # Define C++ warning options here.
CPPWARN = -Wall -Wextra -Wundef -pedantic -Wno-volatile -Werror -Wconversion CPPWARN = -Wall -Wextra -Wundef -pedantic -Wno-volatile
# #
# Project, target, sources and paths # Project, target, sources and paths
@ -217,17 +217,6 @@ include $(RULESPATH)/rules.mk
# Custom rules # Custom rules
# #
check:
cppcheck --std=c++17 --enable=warning,style,performance,portability --force $(shell find source/ -name "*.cpp" -or -name "*.hpp" -or -name "*.c" -or -name "*.h" -type f)
tidy:
clang-tidy \
-warnings-as-errors=* \
--extra-arg=-I --extra-arg=/usr/lib/gcc/arm-none-eabi/13/include/g++-v13 \
--extra-arg=-I --extra-arg=/usr/lib/gcc/arm-none-eabi/13/include/g++-v13/arm-none-eabi \
$(CPPSRC)
# #
# Custom rules # Custom rules
############################################################################## ##############################################################################

@ -223,7 +223,7 @@ void sampleRate(unsigned char *cmd)
{ {
if (EM.assert(USBSerial::read(&cmd[1], 1) == 1, Error::BadParamSize)) { if (EM.assert(USBSerial::read(&cmd[1], 1) == 1, Error::BadParamSize)) {
if (cmd[1] == 0xFF) { if (cmd[1] == 0xFF) {
auto r = static_cast<unsigned char>(SClock::getRate()); unsigned char r = SClock::getRate();
USBSerial::write(&r, 1); USBSerial::write(&r, 1);
} else { } else {
auto r = static_cast<SClock::Rate>(cmd[1]); auto r = static_cast<SClock::Rate>(cmd[1]);

@ -2,7 +2,7 @@
* @file communication.hpp * @file communication.hpp
* @brief Manages communication with the host computer. * @brief Manages communication with the host computer.
* *
* Copyright (C) 2023 Clyne Sullivan * Copyright (C) 2021 Clyne Sullivan
* *
* Distributed under the GNU GPL v3 or later. You should have received a copy of * Distributed under the GNU GPL v3 or later. You should have received a copy of
* the GNU General Public License along with this program. * the GNU General Public License along with this program.
@ -17,17 +17,9 @@
class CommunicationManager class CommunicationManager
{ {
public: public:
/**
* Starts the communication manager thread (threadComm).
*/
static void begin(); static void begin();
private: private:
/**
* Continuously polls the USB serial connection, handling received commands
* as necessary.
* Does not return.
*/
static void threadComm(void *); static void threadComm(void *);
static std::array<char, 4096> m_thread_stack; static std::array<char, 4096> m_thread_stack;

@ -156,7 +156,6 @@ void ConversionManager::threadRunner(void *)
samples = entry(samples, size); samples = entry(samples, size);
asm("mov sp, %0" :: "r" (sp)); asm("mov sp, %0" :: "r" (sp));
volatile auto testRead = *samples; volatile auto testRead = *samples;
(void)testRead;
} else { } else {
// Start execution timer: // Start execution timer:
asm("mov %0, sp; eor r0, r0; svc 2" : "=r" (sp)); asm("mov %0, sp; eor r0, r0; svc 2" : "=r" (sp));
@ -164,7 +163,6 @@ void ConversionManager::threadRunner(void *)
// Stop execution timer: // Stop execution timer:
asm("mov r0, #1; svc 2; mov sp, %0" :: "r" (sp)); asm("mov r0, #1; svc 2; mov sp, %0" :: "r" (sp));
volatile auto testRead = *samples; volatile auto testRead = *samples;
(void)testRead;
} }
} }

@ -2,7 +2,7 @@
* @file conversion.hpp * @file conversion.hpp
* @brief Manages algorithm application (converts input samples to output). * @brief Manages algorithm application (converts input samples to output).
* *
* Copyright (C) 2023 Clyne Sullivan * Copyright (C) 2021 Clyne Sullivan
* *
* Distributed under the GNU GPL v3 or later. You should have received a copy of * Distributed under the GNU GPL v3 or later. You should have received a copy of
* the GNU General Public License along with this program. * the GNU General Public License along with this program.
@ -27,10 +27,6 @@ constexpr unsigned int CONVERSION_THREAD_STACK_SIZE =
class ConversionManager class ConversionManager
{ {
public: public:
/**
* Starts two threads: the privileged monitor thread and the unprivileged
* algorithm execution thread.
*/
static void begin(); static void begin();
// Begins sample conversion. // Begins sample conversion.

@ -2,7 +2,7 @@
* @file elf.h * @file elf.h
* @brief Defines ELF binary format info. * @brief Defines ELF binary format info.
* *
* Public domain, written by Clyne Sullivan. * Free to use, written by Clyne Sullivan.
*/ */
#ifndef STMDSP_ELF_HPP #ifndef STMDSP_ELF_HPP

@ -2,7 +2,7 @@
* @file elfload.hpp * @file elfload.hpp
* @brief Loads ELF binary data into memory for execution. * @brief Loads ELF binary data into memory for execution.
* *
* Copyright (C) 2023 Clyne Sullivan * Copyright (C) 2021 Clyne Sullivan
* *
* Distributed under the GNU GPL v3 or later. You should have received a copy of * Distributed under the GNU GPL v3 or later. You should have received a copy of
* the GNU General Public License along with this program. * the GNU General Public License along with this program.
@ -24,26 +24,9 @@ class ELFManager
public: public:
using EntryFunc = Sample *(*)(Sample *, size_t); using EntryFunc = Sample *(*)(Sample *, size_t);
/**
* Attempts to parse the ELF binary loaded in the file buffer.
* Returns true if successful.
*/
static bool loadFromInternalBuffer(); static bool loadFromInternalBuffer();
/**
* Returns a function pointer to the loaded ELF's entry point.
* Returns nullptr if a valid ELF is not loaded.
*/
static EntryFunc loadedElf(); static EntryFunc loadedElf();
/**
* Returns the address of the ELF file buffer (copy ELF binary to here).
*/
static unsigned char *fileBuffer(); static unsigned char *fileBuffer();
/**
* "Unloads" the loaded binary by invalidating the entry pointer.
*/
static void unload(); static void unload();
private: private:

@ -2,7 +2,7 @@
* @file error.hpp * @file error.hpp
* @brief Tracks and reports non-critical errors. * @brief Tracks and reports non-critical errors.
* *
* Copyright (C) 2023 Clyne Sullivan * Copyright (C) 2021 Clyne Sullivan
* *
* Distributed under the GNU GPL v3 or later. You should have received a copy of * Distributed under the GNU GPL v3 or later. You should have received a copy of
* the GNU General Public License along with this program. * the GNU General Public License along with this program.
@ -31,25 +31,9 @@ class ErrorManager
constexpr static unsigned int MAX_ERROR_QUEUE_SIZE = 8; constexpr static unsigned int MAX_ERROR_QUEUE_SIZE = 8;
public: public:
/**
* Adds the given error to the error queue.
*/
void add(Error error); void add(Error error);
/**
* If condition is false, add the given error to the error queue.
* Returns condition.
*/
bool assert(bool condition, Error error); bool assert(bool condition, Error error);
/**
* Returns true if the error queue is not empty.
*/
bool hasError(); bool hasError();
/**
* Returns the oldest error queue entry after removing it from the queue.
*/
Error pop(); Error pop();
private: private:

@ -2,7 +2,7 @@
* @file handlers.hpp * @file handlers.hpp
* @brief Interrupt service routine handlers. * @brief Interrupt service routine handlers.
* *
* Copyright (C) 2023 Clyne Sullivan * Copyright (C) 2021 Clyne Sullivan
* *
* Distributed under the GNU GPL v3 or later. You should have received a copy of * Distributed under the GNU GPL v3 or later. You should have received a copy of
* the GNU General Public License along with this program. * the GNU General Public License along with this program.
@ -16,15 +16,12 @@
extern "C" { extern "C" {
// Service call handler ("svc" calls)
__attribute__((naked)) __attribute__((naked))
void port_syscall(struct port_extctx *ctxp, uint32_t n); void port_syscall(struct port_extctx *ctxp, uint32_t n);
// Handle memory faults possibly caused by the algorithm.
__attribute__((naked)) __attribute__((naked))
void MemManage_Handler(); void MemManage_Handler();
// Handle execution faults possibly caused by the algorithm.
__attribute__((naked)) __attribute__((naked))
void HardFault_Handler(); void HardFault_Handler();

@ -2,7 +2,7 @@
* @file monitor.hpp * @file monitor.hpp
* @brief Manages the device monitoring thread (status LEDs, etc.). * @brief Manages the device monitoring thread (status LEDs, etc.).
* *
* Copyright (C) 2023 Clyne Sullivan * Copyright (C) 2021 Clyne Sullivan
* *
* Distributed under the GNU GPL v3 or later. You should have received a copy of * Distributed under the GNU GPL v3 or later. You should have received a copy of
* the GNU General Public License along with this program. * the GNU General Public License along with this program.
@ -19,15 +19,9 @@
class Monitor class Monitor
{ {
public: public:
/**
* Starts the monitor thread.
*/
static void begin(); static void begin();
private: private:
/**
* Updates status LEDs. Does not return.
*/
static void threadMonitor(void *); static void threadMonitor(void *);
static std::array<char, THD_WORKING_AREA_SIZE(256)> m_thread_stack; static std::array<char, THD_WORKING_AREA_SIZE(256)> m_thread_stack;

@ -2,7 +2,7 @@
* @file adc.hpp * @file adc.hpp
* @brief Manages signal reading through the ADC. * @brief Manages signal reading through the ADC.
* *
* Copyright (C) 2023 Clyne Sullivan * Copyright (C) 2021 Clyne Sullivan
* *
* Distributed under the GNU GPL v3 or later. You should have received a copy of * Distributed under the GNU GPL v3 or later. You should have received a copy of
* the GNU General Public License along with this program. * the GNU General Public License along with this program.
@ -22,47 +22,18 @@ class ADC
public: public:
using Operation = void (*)(adcsample_t *buffer, size_t count); using Operation = void (*)(adcsample_t *buffer, size_t count);
/**
* Initializes analog input pins and the microcontoller's ADC peripheral.
*/
static void begin(); static void begin();
/**
* Begins continuous ADC sampling triggered by SClock at the set sampling
* rate.
* @param buffer Pointer to buffer for sample data.
* @param count Number of samples that the buffer can hold.
* @param operation Handler function to operate on filled half-buffers.
*/
static void start(adcsample_t *buffer, size_t count, Operation operation); static void start(adcsample_t *buffer, size_t count, Operation operation);
/**
* Stops the continuous ADC sampling.
*/
static void stop(); static void stop();
/**
* Runs a single conversion on the "alt" inputs (parameter knobs).
* @param id The ID of the desired "alt" input (zero or one).
* @return The sampled value for the given input.
*/
static adcsample_t readAlt(unsigned int id); static adcsample_t readAlt(unsigned int id);
/**
* Sets the desired sampling rate for the ADC to operate at.
*/
static void setRate(SClock::Rate rate); static void setRate(SClock::Rate rate);
/**
* Used to override the handler function for the currently running
* conversion.
*/
static void setOperation(Operation operation); static void setOperation(Operation operation);
private: private:
// ADC driver for signal input.
static ADCDriver *m_driver; static ADCDriver *m_driver;
// ADC driver for "alt" inputs.
static ADCDriver *m_driver2; static ADCDriver *m_driver2;
static const ADCConfig m_config; static const ADCConfig m_config;

@ -1,14 +1,3 @@
/**
* @file cordic.cpp
* @brief Provides mathematical functions for algorithms.
*
* Copyright (C) 2023 Clyne Sullivan
*
* Distributed under the GNU GPL v3 or later. You should have received a copy of
* the GNU General Public License along with this program.
* If not, see <https://www.gnu.org/licenses/>.
*/
#include "cordic.hpp" #include "cordic.hpp"
#include "hal.h" #include "hal.h"

@ -1,33 +1,11 @@
/**
* @file cordic.hpp
* @brief Provides mathematical functions for algorithms.
*
* Copyright (C) 2023 Clyne Sullivan
*
* Distributed under the GNU GPL v3 or later. You should have received a copy of
* the GNU General Public License along with this program.
* If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef CORDIC_HPP_ #ifndef CORDIC_HPP_
#define CORDIC_HPP_ #define CORDIC_HPP_
/**
* Named after the hardware CORDIC peripheral even though software
* implementations may be used.
*/
namespace cordic { namespace cordic {
// Provides pi in case cordic functions require it.
constexpr double PI = 3.1415926535L; constexpr double PI = 3.1415926535L;
/**
* Prepares cordic functions for use.
*/
void init(); void init();
// mod - Calculates remainder for given fraction.
// cos, sin, tan - The trig functions.
#if !defined(TARGET_PLATFORM_L4) #if !defined(TARGET_PLATFORM_L4)
double mod(double n, double d); double mod(double n, double d);

@ -2,7 +2,7 @@
* @file dac.hpp * @file dac.hpp
* @brief Manages signal creation using the DAC. * @brief Manages signal creation using the DAC.
* *
* Copyright (C) 2023 Clyne Sullivan * Copyright (C) 2021 Clyne Sullivan
* *
* Distributed under the GNU GPL v3 or later. You should have received a copy of * Distributed under the GNU GPL v3 or later. You should have received a copy of
* the GNU General Public License along with this program. * the GNU General Public License along with this program.
@ -18,35 +18,12 @@
class DAC class DAC
{ {
public: public:
/**
* Initializes DAC output pins and peripheral.
*/
static void begin(); static void begin();
/**
* Begins continuous DAC conversion on the given channel, running at the
* current SClock sampling rate.
* @param channel Selected output channel (0 = sig. out, 1 = sig. gen.).
* @param buffer Buffer of sample data to output.
* @param count Number of samples in sample buffer.
*/
static void start(int channel, dacsample_t *buffer, size_t count); static void start(int channel, dacsample_t *buffer, size_t count);
/**
* Stops DAC conversion on the given channel.
*/
static void stop(int channel); static void stop(int channel);
/**
* Determines if signal generator needs more sample data for streamed
* output (i.e. audio file streaming).
* @return >0 if samples needed, <0 on initial run.
*/
static int sigGenWantsMore(); static int sigGenWantsMore();
/**
* Returns true if signal generator is currently running.
*/
static int isSigGenRunning(); static int isSigGenRunning();
private: private:

@ -264,6 +264,7 @@ static const USBEndpointConfig ep2config = {
* Handles the USB driver global events. * Handles the USB driver global events.
*/ */
static void usb_event(USBDriver *usbp, usbevent_t event) { static void usb_event(USBDriver *usbp, usbevent_t event) {
extern SerialUSBDriver SDU1;
switch (event) { switch (event) {
case USB_EVENT_ADDRESS: case USB_EVENT_ADDRESS:

@ -2,7 +2,7 @@
* @file usbserial.hpp * @file usbserial.hpp
* @brief Wrapper for ChibiOS's SerialUSBDriver. * @brief Wrapper for ChibiOS's SerialUSBDriver.
* *
* Copyright (C) 2023 Clyne Sullivan * Copyright (C) 2021 Clyne Sullivan
* *
* Distributed under the GNU GPL v3 or later. You should have received a copy of * Distributed under the GNU GPL v3 or later. You should have received a copy of
* the GNU General Public License along with this program. * the GNU General Public License along with this program.
@ -17,30 +17,11 @@
class USBSerial class USBSerial
{ {
public: public:
/**
* Prepares for USB serial communication.
*/
static void begin(); static void begin();
/**
* Returns true if input data has been received.
*/
static bool isActive(); static bool isActive();
/**
* Reads received input data into the given buffer.
* @param buffer Buffer to store input data.
* @param count Number of bytes to read.
* @return Number of bytes actually read.
*/
static size_t read(unsigned char *buffer, size_t count); static size_t read(unsigned char *buffer, size_t count);
/**
* Writes data to serial output.
* @param buffer Buffer of output data.
* @param count Number of bytes to write.
* @return Number of bytes actually written.
*/
static size_t write(const unsigned char *buffer, size_t count); static size_t write(const unsigned char *buffer, size_t count);
private: private:

@ -1,4 +1,5 @@
// Run status // Run status
//
enum class RunStatus : char enum class RunStatus : char
{ {
Idle = '1', Idle = '1',

@ -19,12 +19,12 @@ void SampleBuffer::clear() {
} }
__attribute__((section(".convcode"))) __attribute__((section(".convcode")))
void SampleBuffer::modify(Sample *data, unsigned int srcsize) { void SampleBuffer::modify(Sample *data, unsigned int srcsize) {
auto dsize = srcsize < m_size ? srcsize : m_size; auto size = srcsize < m_size ? srcsize : m_size;
dsize = (dsize + 15) & (~15); size = (size + 15) & (~15);
m_modified = m_buffer; m_modified = m_buffer;
const int *src = reinterpret_cast<const int *>(data); const int *src = reinterpret_cast<const int *>(data);
const int * const srcend = src + (dsize / 2); const int * const srcend = src + (size / 2);
int *dst = reinterpret_cast<int *>(m_buffer); int *dst = reinterpret_cast<int *>(m_buffer);
do { do {
int a = src[0]; int a = src[0];
@ -49,12 +49,12 @@ void SampleBuffer::modify(Sample *data, unsigned int srcsize) {
} }
__attribute__((section(".convcode"))) __attribute__((section(".convcode")))
void SampleBuffer::midmodify(Sample *data, unsigned int srcsize) { void SampleBuffer::midmodify(Sample *data, unsigned int srcsize) {
auto dsize = srcsize < m_size / 2 ? srcsize : m_size / 2; auto size = srcsize < m_size / 2 ? srcsize : m_size / 2;
dsize = (dsize + 15) & (~15); size = (size + 15) & (~15);
m_modified = middata(); m_modified = middata();
const int *src = reinterpret_cast<const int *>(data); const int *src = reinterpret_cast<const int *>(data);
const int * const srcend = src + (dsize / 2); const int * const srcend = src + (size / 2);
int *dst = reinterpret_cast<int *>(middata()); int *dst = reinterpret_cast<int *>(middata());
do { do {
int a = src[0]; int a = src[0];

@ -2,7 +2,7 @@
* @file samplebuffer.hpp * @file samplebuffer.hpp
* @brief Manages ADC/DAC buffer data. * @brief Manages ADC/DAC buffer data.
* *
* Copyright (C) 2023 Clyne Sullivan * Copyright (C) 2021 Clyne Sullivan
* *
* Distributed under the GNU GPL v3 or later. You should have received a copy of * Distributed under the GNU GPL v3 or later. You should have received a copy of
* the GNU General Public License along with this program. * the GNU General Public License along with this program.
@ -20,79 +20,25 @@ using Sample = uint16_t;
constexpr unsigned int MAX_SAMPLE_BUFFER_BYTESIZE = sizeof(Sample) * 8192; constexpr unsigned int MAX_SAMPLE_BUFFER_BYTESIZE = sizeof(Sample) * 8192;
constexpr unsigned int MAX_SAMPLE_BUFFER_SIZE = MAX_SAMPLE_BUFFER_BYTESIZE / sizeof(Sample); constexpr unsigned int MAX_SAMPLE_BUFFER_SIZE = MAX_SAMPLE_BUFFER_BYTESIZE / sizeof(Sample);
/**
* Manages a buffer of sample data from the ADC or DAC with facilities to
* work with separate halves of the total buffer (which is necessary when
* streaming data to or from the buffer).
*/
class SampleBuffer class SampleBuffer
{ {
public: public:
// Manage the sample data memory at 'buffer'. SampleBuffer(Sample *buffer);
explicit SampleBuffer(Sample *buffer);
/**
* Fill the current buffer with midpoint (2048/0V) values.
*/
void clear(); void clear();
/**
* Copy 'srcsize' samples from 'data' into the first half of the current
* buffer. Also do equivalent of setModified().
*/
void modify(Sample *data, unsigned int srcsize); void modify(Sample *data, unsigned int srcsize);
/**
* Copy 'srcsize' samples from 'data' into the second half of the current
* buffer. Also do equivalent of setMidmodified().
*/
void midmodify(Sample *data, unsigned int srcsize); void midmodify(Sample *data, unsigned int srcsize);
/**
* Set modified buffer pointer to first half of the current buffer.
*/
void setModified(); void setModified();
/**
* Set modified buffer pointer to second half of the current buffer.
*/
void setMidmodified(); void setMidmodified();
/**
* Return pointer to most recently modified buffer portion.
* Clears this internal pointer when called.
*/
Sample *modified(); Sample *modified();
/**
* Returns pointer to first half of current buffer.
*/
Sample *data(); Sample *data();
/**
* Returns pointer to second half of current buffer.
*/
Sample *middata(); Sample *middata();
/**
* Returns uint8_t-casted pointer to the current buffer.
*/
uint8_t *bytedata(); uint8_t *bytedata();
/**
* Sets the total working size of the current buffer. Current buffer must
* be able to accommodate.
*/
void setSize(unsigned int size); void setSize(unsigned int size);
/**
* Returns the current total working size (number of samples).
*/
unsigned int size() const; unsigned int size() const;
/**
* Returns the current total working size (number of bytes).
*/
unsigned int bytesize() const; unsigned int bytesize() const;
private: private:

@ -2,7 +2,7 @@
* @file samples.hpp * @file samples.hpp
* @brief Provides sample buffers for inputs and outputs. * @brief Provides sample buffers for inputs and outputs.
* *
* Copyright (C) 2023 Clyne Sullivan * Copyright (C) 2021 Clyne Sullivan
* *
* Distributed under the GNU GPL v3 or later. You should have received a copy of * Distributed under the GNU GPL v3 or later. You should have received a copy of
* the GNU General Public License along with this program. * the GNU General Public License along with this program.
@ -14,8 +14,6 @@
#include "samplebuffer.hpp" #include "samplebuffer.hpp"
// Define sample buffers for the input and output signals and the signal
// generator.
class Samples class Samples
{ {
public: public:

@ -2,7 +2,7 @@
* @file sclock.hpp * @file sclock.hpp
* @brief Manages sampling rate clock speeds. * @brief Manages sampling rate clock speeds.
* *
* Copyright (C) 2023 Clyne Sullivan * Copyright (C) 2021 Clyne Sullivan
* *
* Distributed under the GNU GPL v3 or later. You should have received a copy of * Distributed under the GNU GPL v3 or later. You should have received a copy of
* the GNU General Public License along with this program. * the GNU General Public License along with this program.
@ -19,7 +19,6 @@
class SClock class SClock
{ {
public: public:
// These are the supported sampling rates. GUI keeps its own enumeration.
enum class Rate : unsigned int { enum class Rate : unsigned int {
R8K = 0, R8K = 0,
R16K, R16K,
@ -29,32 +28,11 @@ public:
R96K R96K
}; };
/**
* Initializes the sample clock hardware.
*/
static void begin(); static void begin();
/**
* Starts the sample rate clock if it is not already running.
*/
static void start(); static void start();
/**
* Indicate that the caller no longer needs the sample clock.
* This decrements an internal counter that is incremented by start()
* calls; if the counter reaches zero, the clock will actually stop.
*/
static void stop(); static void stop();
/**
* Sets the desired sampling rate, used for the next start() call.
*/
static void setRate(Rate rate); static void setRate(Rate rate);
/**
* Gets the desired sampling rate (SClock::Rate value) casted to an
* unsigned int.
*/
static unsigned int getRate(); static unsigned int getRate();
private: private:

@ -1,8 +1,6 @@
CXX = g++ CXX = g++
CXXFILES := \ CXXFILES := \
kissfft/kiss_fft.c \
kissfft/kiss_fftr.c \
source/serial/src/serial.cc \ source/serial/src/serial.cc \
source/imgui/backends/imgui_impl_sdl2.cpp \ source/imgui/backends/imgui_impl_sdl2.cpp \
source/imgui/backends/imgui_impl_opengl2.cpp \ source/imgui/backends/imgui_impl_opengl2.cpp \
@ -15,8 +13,7 @@ CXXFILES := \
$(wildcard source/stmdsp/*.cpp) \ $(wildcard source/stmdsp/*.cpp) \
$(wildcard source/*.cpp) $(wildcard source/*.cpp)
CXXFLAGS := -std=c++20 -Og -ggdb -g3 \ CXXFLAGS := -std=c++20 -O2 \
-Ikissfft \
-Isource -Isource/imgui -Isource/stmdsp -Isource/serial/include \ -Isource -Isource/imgui -Isource/stmdsp -Isource/serial/include \
-Isource/ImGuiColorTextEdit -Isource/ImGuiFileDialog \ -Isource/ImGuiColorTextEdit -Isource/ImGuiFileDialog \
$(shell sdl2-config --cflags) \ $(shell sdl2-config --cflags) \
@ -35,7 +32,7 @@ LDFLAGS = $(shell sdl2-config --libs) -lGL -lpthread
OUTPUT := stmdspgui OUTPUT := stmdspgui
endif endif
OFILES := $(patsubst %.c, %.o, $(patsubst %.cc, %.o, $(patsubst %.cpp, %.o, $(CXXFILES)))) OFILES := $(patsubst %.cc, %.o, $(patsubst %.cpp, %.o, $(CXXFILES)))
all: $(OUTPUT) all: $(OUTPUT)

@ -1 +0,0 @@
Subproject commit 8f47a67f595a6641c566087bf5277034be64f24d

@ -316,7 +316,7 @@ bool deviceConnect()
return false; return false;
} }
void deviceStart(bool fetchSamples) void deviceStart(bool logResults, bool drawSamples)
{ {
if (!m_device) { if (!m_device) {
log("No device connected."); log("No device connected.");
@ -336,7 +336,7 @@ void deviceStart(bool fetchSamples)
log("Ready."); log("Ready.");
} else { } else {
m_device->continuous_start(); m_device->continuous_start();
if (fetchSamples || wavOutput.valid()) if (drawSamples || logResults || wavOutput.valid())
std::thread(drawSamplesTask, m_device).detach(); std::thread(drawSamplesTask, m_device).detach();
log("Running."); log("Running.");

@ -28,7 +28,6 @@ void codeEditorInit()
{ {
editor.SetLanguageDefinition(TextEditor::LanguageDefinition::CPlusPlus()); editor.SetLanguageDefinition(TextEditor::LanguageDefinition::CPlusPlus());
editor.SetPalette(TextEditor::GetLightPalette()); editor.SetPalette(TextEditor::GetLightPalette());
editor.SetShowWhitespaces(false);
} }
void codeRenderMenu() void codeRenderMenu()

@ -2,7 +2,7 @@
#include "imgui.h" #include "imgui.h"
#include "imgui_internal.h" #include "imgui_internal.h"
#include "ImGuiFileDialog.h" #include "ImGuiFileDialog.h"
#include "kiss_fftr.h"
#include "stmdsp.hpp" #include "stmdsp.hpp"
#include <array> #include <array>
@ -45,7 +45,7 @@ void deviceLoadAudioFile(const std::string& file);
void deviceLoadLogFile(const std::string& file); void deviceLoadLogFile(const std::string& file);
void deviceSetSampleRate(unsigned int index); void deviceSetSampleRate(unsigned int index);
void deviceSetInputDrawing(bool enabled); void deviceSetInputDrawing(bool enabled);
void deviceStart(bool fetchSamples); void deviceStart(bool logResults, bool drawSamples);
void deviceStartMeasurement(); void deviceStartMeasurement();
void deviceUpdateDrawBufferSize(double timeframe); void deviceUpdateDrawBufferSize(double timeframe);
std::size_t pullFromDrawQueue( std::size_t pullFromDrawQueue(
@ -57,7 +57,6 @@ static std::string sampleRatePreview = "?";
static bool measureCodeTime = false; static bool measureCodeTime = false;
static bool logResults = false; static bool logResults = false;
static bool drawSamples = false; static bool drawSamples = false;
static bool drawFrequencies = false;
static bool popupRequestBuffer = false; static bool popupRequestBuffer = false;
static bool popupRequestSiggen = false; static bool popupRequestSiggen = false;
static bool popupRequestLog = false; static bool popupRequestLog = false;
@ -75,7 +74,6 @@ void deviceRenderDisconnect()
measureCodeTime = false; measureCodeTime = false;
logResults = false; logResults = false;
drawSamples = false; drawSamples = false;
drawFrequencies = false;
} }
void deviceRenderMenu() void deviceRenderMenu()
@ -106,7 +104,7 @@ void deviceRenderMenu()
static std::string startLabel ("Start"); static std::string startLabel ("Start");
addMenuItem(startLabel, isConnected, [&] { addMenuItem(startLabel, isConnected, [&] {
startLabel = isRunning ? "Start" : "Stop"; startLabel = isRunning ? "Start" : "Stop";
deviceStart(logResults || drawSamples || drawFrequencies); deviceStart(logResults, drawSamples);
if (logResults && isRunning) if (logResults && isRunning)
logResults = false; logResults = false;
}); });
@ -120,8 +118,7 @@ void deviceRenderMenu()
if (!isConnected || isRunning) if (!isConnected || isRunning)
ImGui::PushDisabled(); // Hey, pushing disabled! ImGui::PushDisabled(); // Hey, pushing disabled!
ImGui::Checkbox("Plot over time", &drawSamples); ImGui::Checkbox("Draw samples", &drawSamples);
ImGui::Checkbox("Plot over freq.", &drawFrequencies);
if (ImGui::Checkbox("Log results...", &logResults)) { if (ImGui::Checkbox("Log results...", &logResults)) {
if (logResults) if (logResults)
popupRequestLog = true; popupRequestLog = true;
@ -299,16 +296,13 @@ void deviceRenderWidgets()
void deviceRenderDraw() void deviceRenderDraw()
{ {
static std::vector<stmdsp::dacsample_t> buffer;
static std::vector<stmdsp::dacsample_t> bufferInput;
static std::vector<kiss_fft_scalar> bufferFFTIn;
static std::vector<kiss_fft_cpx> bufferFFTOut;
static auto bufferCirc = CircularBuffer(buffer);
static auto bufferInputCirc = CircularBuffer(bufferInput);
static bool drawSamplesInput = false;
static kiss_fftr_cfg kisscfg;
if (drawSamples) { if (drawSamples) {
static std::vector<stmdsp::dacsample_t> buffer;
static std::vector<stmdsp::dacsample_t> bufferInput;
static auto bufferCirc = CircularBuffer(buffer);
static auto bufferInputCirc = CircularBuffer(bufferInput);
static bool drawSamplesInput = false;
static unsigned int yMinMax = 4095; static unsigned int yMinMax = 4095;
ImGui::Begin("draw", &drawSamples); ImGui::Begin("draw", &drawSamples);
@ -439,88 +433,6 @@ void deviceRenderDraw()
} }
} }
ImGui::End();
} else if (drawFrequencies) {
ImGui::Begin("draw", &drawFrequencies);
ImGui::Text("Time: %0.3f sec", drawSamplesTimeframe);
ImGui::SameLine();
if (ImGui::Button("-", {30, 0})) {
drawSamplesTimeframe = std::max(drawSamplesTimeframe / 2., 0.0078125);
deviceUpdateDrawBufferSize(drawSamplesTimeframe);
}
ImGui::SameLine();
if (ImGui::Button("+", {30, 0})) {
drawSamplesTimeframe = std::min(drawSamplesTimeframe * 2, 32.);
deviceUpdateDrawBufferSize(drawSamplesTimeframe);
}
auto newSize = pullFromDrawQueue(bufferCirc);
if (newSize > 0) {
buffer.resize(newSize);
bufferFFTIn.resize(newSize);
bufferFFTOut.resize(newSize);
bufferCirc = CircularBuffer(buffer);
pullFromDrawQueue(bufferCirc);
kiss_fftr_free(kisscfg);
kisscfg = kiss_fftr_alloc(buffer.size(), false, nullptr, nullptr);
}
std::copy(buffer.begin(), buffer.end(), bufferFFTIn.begin());
kiss_fftr(kisscfg, bufferFFTIn.data(), bufferFFTOut.data());
auto drawList = ImGui::GetWindowDrawList();
ImVec2 p0 = ImGui::GetWindowPos();
auto size = ImGui::GetWindowSize();
p0.y += 65;
size.y -= 70;
drawList->AddRectFilled(p0, {p0.x + size.x, p0.y + size.y}, IM_COL32_BLACK);
const auto lcMinor = ImGui::GetColorU32(IM_COL32(40, 40, 40, 255));
const auto lcMajor = ImGui::GetColorU32(IM_COL32(140, 140, 140, 255));
{
const float yinc = size.y / 10.f;
for (int i = 1; i < 10; ++i) {
drawList->AddLine({p0.x, p0.y + i * yinc}, {p0.x + size.x, p0.y + i * yinc}, (i % 2) ? lcMinor : lcMajor);
}
}
{
const float xinc = size.x / 10.f;
for (int i = 1; i < 10; ++i) {
drawList->AddLine({p0.x + i * xinc, p0.y}, {p0.x + i * xinc, p0.y + size.y}, (i % 2) ? lcMinor : lcMajor);
}
}
const auto Fs = m_device->get_sample_rate();
const float di = static_cast<float>(buffer.size() / 2) / size.x;
const float dx = std::ceil(size.x / static_cast<float>(buffer.size()));
ImVec2 pp = p0;
float i = 0;
while (pp.x < p0.x + size.x) {
unsigned int idx = i;
float n = std::clamp(bufferFFTOut[idx].r / Fs / 4.f, 0.f, 1.f);
i += di;
ImVec2 next (pp.x + dx, p0.y + size.y * (1 - n));
drawList->AddLine(pp, next, ImGui::GetColorU32(IM_COL32(255, 0, 0, 255)), 2.f);
pp = next;
}
const auto mouse = ImGui::GetMousePos();
if (mouse.x > p0.x && mouse.x < p0.x + size.x &&
mouse.y > p0.y && mouse.y < p0.y + size.y)
{
char buf[16];
drawList->AddLine({mouse.x, p0.y}, {mouse.x, p0.y + size.y}, IM_COL32(255, 255, 0, 255));
const std::size_t si = (mouse.x - p0.x) / size.x * Fs / 2;
snprintf(buf, sizeof(buf), " %5luHz", si);
drawList->AddText(mouse, IM_COL32(255, 0, 0, 255), buf);
}
ImGui::End(); ImGui::End();
} }
} }

File diff suppressed because it is too large Load Diff

@ -56,10 +56,7 @@
} }
], ],
"drc_exclusions": [ "drc_exclusions": [
"lib_footprint_issues|147049125|88495000|d2aefee4-de29-456d-afff-5c2c101f4674|00000000-0000-0000-0000-000000000000", "lib_footprint_issues|147049125|88495000|d2aefee4-de29-456d-afff-5c2c101f4674|00000000-0000-0000-0000-000000000000"
"lib_footprint_mismatch|172056920|76359492|6e56ba3f-444a-46d5-a1a4-0a13bdcad72a|00000000-0000-0000-0000-000000000000",
"lib_footprint_mismatch|174000000|84500000|b094d6cc-194b-4f39-979a-d204c7caeddc|00000000-0000-0000-0000-000000000000",
"lib_footprint_mismatch|177600000|74900000|43bf6a24-f35b-46a4-974c-4c658f0c1038|00000000-0000-0000-0000-000000000000"
], ],
"meta": { "meta": {
"version": 2 "version": 2
@ -86,7 +83,7 @@
"items_not_allowed": "error", "items_not_allowed": "error",
"length_out_of_range": "error", "length_out_of_range": "error",
"lib_footprint_issues": "warning", "lib_footprint_issues": "warning",
"lib_footprint_mismatch": "warning", "lib_footprint_mismatch": "ignore",
"malformed_courtyard": "error", "malformed_courtyard": "error",
"microvia_drill_out_of_range": "error", "microvia_drill_out_of_range": "error",
"missing_courtyard": "ignore", "missing_courtyard": "ignore",
@ -123,7 +120,7 @@
"min_hole_to_hole": 0.25, "min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.19999999999999998, "min_microvia_diameter": 0.19999999999999998,
"min_microvia_drill": 0.09999999999999999, "min_microvia_drill": 0.09999999999999999,
"min_resolved_spokes": 2, "min_resolved_spokes": 1,
"min_silk_clearance": 0.0, "min_silk_clearance": 0.0,
"min_text_height": 0.7999999999999999, "min_text_height": 0.7999999999999999,
"min_text_thickness": 0.08, "min_text_thickness": 0.08,

@ -6,7 +6,8 @@
(title_block (title_block
(title "DSP PAW add-on board") (title "DSP PAW add-on board")
(date "2023-08-19") (date "2023-09-13")
(rev "2")
(company "bitgloo") (company "bitgloo")
(comment 1 "Released under the CERN Open Hardware Licence Version 2 - Strongly Reciprocal") (comment 1 "Released under the CERN Open Hardware Licence Version 2 - Strongly Reciprocal")
) )

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 KiB

After

Width:  |  Height:  |  Size: 218 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -6,17 +6,18 @@
(title_block (title_block
(title "DSP PAW add-on board") (title "DSP PAW add-on board")
(date "2023-08-19") (date "2023-09-13")
(rev "2")
(company "bitgloo") (company "bitgloo")
(comment 1 "Released under the CERN Open Hardware Licence Version 2 - Strongly Reciprocal") (comment 1 "Released under the CERN Open Hardware Licence Version 2 - Strongly Reciprocal")
) )
(lib_symbols (lib_symbols
(symbol "Device:LED_RAGB" (pin_names (offset 0) hide) (in_bom yes) (on_board yes) (symbol "Device:LED_BARG" (pin_names (offset 0) hide) (in_bom yes) (on_board yes)
(property "Reference" "D" (at 0 9.398 0) (property "Reference" "D" (at 0 9.398 0)
(effects (font (size 1.27 1.27))) (effects (font (size 1.27 1.27)))
) )
(property "Value" "LED_RAGB" (at 0 -8.89 0) (property "Value" "LED_BARG" (at 0 -8.89 0)
(effects (font (size 1.27 1.27))) (effects (font (size 1.27 1.27)))
) )
(property "Footprint" "" (at 0 -1.27 0) (property "Footprint" "" (at 0 -1.27 0)
@ -28,13 +29,13 @@
(property "ki_keywords" "LED RGB diode" (at 0 0 0) (property "ki_keywords" "LED RGB diode" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(property "ki_description" "RGB LED, red/anode/green/blue" (at 0 0 0) (property "ki_description" "RGB LED, blue/anode/red/green" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(property "ki_fp_filters" "LED* LED_SMD:* LED_THT:*" (at 0 0 0) (property "ki_fp_filters" "LED* LED_SMD:* LED_THT:*" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(symbol "LED_RAGB_0_0" (symbol "LED_BARG_0_0"
(text "B" (at -1.905 -6.35 0) (text "B" (at -1.905 -6.35 0)
(effects (font (size 1.27 1.27))) (effects (font (size 1.27 1.27)))
) )
@ -45,7 +46,7 @@
(effects (font (size 1.27 1.27))) (effects (font (size 1.27 1.27)))
) )
) )
(symbol "LED_RAGB_0_1" (symbol "LED_BARG_0_1"
(polyline (polyline
(pts (pts
(xy -1.27 -5.08) (xy -1.27 -5.08)
@ -275,21 +276,21 @@
(fill (type background)) (fill (type background))
) )
) )
(symbol "LED_RAGB_1_1" (symbol "LED_BARG_1_1"
(pin passive line (at -5.08 5.08 0) (length 2.54) (pin passive line (at -5.08 -5.08 0) (length 2.54)
(name "RK" (effects (font (size 1.27 1.27)))) (name "BK" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27)))) (number "1" (effects (font (size 1.27 1.27))))
) )
(pin passive line (at 5.08 0 180) (length 2.54) (pin passive line (at 5.08 0 180) (length 2.54)
(name "A" (effects (font (size 1.27 1.27)))) (name "A" (effects (font (size 1.27 1.27))))
(number "2" (effects (font (size 1.27 1.27)))) (number "2" (effects (font (size 1.27 1.27))))
) )
(pin passive line (at -5.08 0 0) (length 2.54) (pin passive line (at -5.08 5.08 0) (length 2.54)
(name "GK" (effects (font (size 1.27 1.27)))) (name "RK" (effects (font (size 1.27 1.27))))
(number "3" (effects (font (size 1.27 1.27)))) (number "3" (effects (font (size 1.27 1.27))))
) )
(pin passive line (at -5.08 -5.08 0) (length 2.54) (pin passive line (at -5.08 0 0) (length 2.54)
(name "BK" (effects (font (size 1.27 1.27)))) (name "GK" (effects (font (size 1.27 1.27))))
(number "4" (effects (font (size 1.27 1.27)))) (number "4" (effects (font (size 1.27 1.27))))
) )
) )
@ -484,6 +485,58 @@
) )
) )
) )
(symbol "power:+3V3" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes)
(property "Reference" "#PWR" (at 0 -3.81 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+3V3" (at 0 3.556 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_keywords" "global power" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "ki_description" "Power symbol creates a global label with name \"+3V3\"" (at 0 0 0)
(effects (font (size 1.27 1.27)) hide)
)
(symbol "+3V3_0_1"
(polyline
(pts
(xy -0.762 1.27)
(xy 0 2.54)
)
(stroke (width 0) (type default))
(fill (type none))
)
(polyline
(pts
(xy 0 0)
(xy 0 2.54)
)
(stroke (width 0) (type default))
(fill (type none))
)
(polyline
(pts
(xy 0 2.54)
(xy 0.762 1.27)
)
(stroke (width 0) (type default))
(fill (type none))
)
)
(symbol "+3V3_1_1"
(pin power_in line (at 0 0 90) (length 0) hide
(name "+3V3" (effects (font (size 1.27 1.27))))
(number "1" (effects (font (size 1.27 1.27))))
)
)
)
(symbol "power:GND" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes) (symbol "power:GND" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes)
(property "Reference" "#PWR" (at 0 -6.35 0) (property "Reference" "#PWR" (at 0 -6.35 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
@ -579,29 +632,29 @@
) )
(wire (pts (xy 96.52 106.68) (xy 100.33 106.68)) (wire (pts (xy 96.52 113.665) (xy 100.33 113.665))
(stroke (width 0) (type default)) (stroke (width 0) (type default))
(uuid 222aa4be-b44f-43d8-9f1d-36f978346489) (uuid 2657732d-844d-4789-b397-13ef6e692470)
)
(wire (pts (xy 96.52 111.76) (xy 100.33 111.76))
(stroke (width 0) (type default))
(uuid 36caa1f7-82cf-4e39-998d-7cccd6c68c00)
) )
(wire (pts (xy 110.49 106.68) (xy 114.3 106.68)) (wire (pts (xy 110.49 106.68) (xy 114.3 106.68))
(stroke (width 0) (type default)) (stroke (width 0) (type default))
(uuid b3676852-c578-405f-a793-f6668e22af7a) (uuid b3676852-c578-405f-a793-f6668e22af7a)
) )
(wire (pts (xy 96.52 115.57) (xy 96.52 111.76)) (wire (pts (xy 96.52 106.68) (xy 100.33 106.68))
(stroke (width 0) (type default)) (stroke (width 0) (type default))
(uuid cfee4500-40f6-4487-b611-6717f3037bb0) (uuid b674dc49-4d5a-40b4-a549-4890dfdad620)
) )
(wire (pts (xy 96.52 97.79) (xy 96.52 101.6)) (wire (pts (xy 100.33 113.665) (xy 100.33 111.76))
(stroke (width 0) (type default)) (stroke (width 0) (type default))
(uuid d26e9002-6368-445c-9889-91050d5d6bde) (uuid d0741e44-4b9b-454e-bafa-6dd0947bb0cd)
) )
(wire (pts (xy 96.52 101.6) (xy 100.33 101.6)) (wire (pts (xy 96.52 100.33) (xy 100.33 100.33))
(stroke (width 0) (type default)) (stroke (width 0) (type default))
(uuid e9c734d6-1417-42bf-93f2-87e45d7558bc) (uuid ddbb9e7c-ad47-488c-a7ae-a3e195052f25)
)
(wire (pts (xy 100.33 100.33) (xy 100.33 101.6))
(stroke (width 0) (type default))
(uuid ff98afc0-2c08-4b2d-8890-399dbc56adfa)
) )
(text "Status LEDs and parameter knobs" (at 115.57 69.85 0) (text "Status LEDs and parameter knobs" (at 115.57 69.85 0)
@ -621,17 +674,17 @@
(effects (font (size 1.27 1.27)) (justify left) hide) (effects (font (size 1.27 1.27)) (justify left) hide)
) )
) )
(global_label "PC12{slash}LED_B" (shape input) (at 88.9 115.57 180) (fields_autoplaced) (global_label "LED_G" (shape input) (at 88.9 106.68 180) (fields_autoplaced)
(effects (font (size 1.27 1.27)) (justify right)) (effects (font (size 1.27 1.27)) (justify right))
(uuid 0fd3b223-092e-4a18-9e3b-460e3e4605d7) (uuid 0fd3b223-092e-4a18-9e3b-460e3e4605d7)
(property "Intersheetrefs" "${INTERSHEET_REFS}" (at 74.5126 115.4906 0) (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 80.3095 106.68 0)
(effects (font (size 1.27 1.27)) (justify right) hide) (effects (font (size 1.27 1.27)) (justify right) hide)
) )
) )
(global_label "PC10{slash}LED_R" (shape input) (at 88.9 97.79 180) (fields_autoplaced) (global_label "LED_B" (shape input) (at 88.9 113.665 180) (fields_autoplaced)
(effects (font (size 1.27 1.27)) (justify right)) (effects (font (size 1.27 1.27)) (justify right))
(uuid 2074dbb5-c735-483e-a108-ecde670d15b4) (uuid 2074dbb5-c735-483e-a108-ecde670d15b4)
(property "Intersheetrefs" "${INTERSHEET_REFS}" (at 74.5126 97.7106 0) (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 80.3095 113.665 0)
(effects (font (size 1.27 1.27)) (justify right) hide) (effects (font (size 1.27 1.27)) (justify right) hide)
) )
) )
@ -642,10 +695,10 @@
(effects (font (size 1.27 1.27)) (justify left) hide) (effects (font (size 1.27 1.27)) (justify left) hide)
) )
) )
(global_label "PC11{slash}LED_G" (shape input) (at 88.9 106.68 180) (fields_autoplaced) (global_label "LED_R" (shape input) (at 88.9 100.33 180) (fields_autoplaced)
(effects (font (size 1.27 1.27)) (justify right)) (effects (font (size 1.27 1.27)) (justify right))
(uuid cdea714e-c064-473d-a6c3-973f5beb0d4e) (uuid cdea714e-c064-473d-a6c3-973f5beb0d4e)
(property "Intersheetrefs" "${INTERSHEET_REFS}" (at 74.5126 106.6006 0) (property "Intersheetrefs" "${INTERSHEET_REFS}" (at 80.3095 100.33 0)
(effects (font (size 1.27 1.27)) (justify right) hide) (effects (font (size 1.27 1.27)) (justify right) hide)
) )
) )
@ -671,9 +724,6 @@
(property "DNP" "" (at 193.04 106.68 0) (property "DNP" "" (at 193.04 106.68 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(property "LCSC Part #" "C330458" (at 193.04 106.68 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 5468099e-cb95-4972-9078-30e43b094d04)) (pin "1" (uuid 5468099e-cb95-4972-9078-30e43b094d04))
(pin "2" (uuid 0de265c9-fa60-41cd-b5c8-3b2982f1e4cf)) (pin "2" (uuid 0de265c9-fa60-41cd-b5c8-3b2982f1e4cf))
(pin "3" (uuid 8d22e474-522c-442d-84f9-4d3795fa75e1)) (pin "3" (uuid 8d22e474-522c-442d-84f9-4d3795fa75e1))
@ -694,61 +744,25 @@
) )
) )
(symbol (lib_id "power:VCC") (at 193.04 102.87 0) (unit 1) (symbol (lib_id "Device:R_US") (at 92.71 100.33 90) (unit 1)
(in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) (in_bom yes) (on_board yes) (dnp no)
(uuid 0b7ce666-6cbf-4100-957e-48b86848c1c6)
(property "Reference" "#PWR056" (at 193.04 106.68 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "VCC" (at 193.04 97.79 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (at 193.04 102.87 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (at 193.04 102.87 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 4d67f819-24dd-4ed0-ae73-b63ed362a7b4))
(instances
(project "stmdsp_rev3"
(path "/975c3983-57e7-4e06-a697-831e5209dd80"
(reference "#PWR056") (unit 1)
)
)
(project "DSP PAW add-on board"
(path "/c291319b-d76e-4fda-91cc-061acff65f9f/270d19d2-3af2-41db-ad1c-33373417ec82"
(reference "#PWR027") (unit 1)
)
(path "/c291319b-d76e-4fda-91cc-061acff65f9f/7798c5d5-f9b1-4b2e-811c-a15abcd34bfa"
(reference "#PWR068") (unit 1)
)
)
)
)
(symbol (lib_id "Device:R_US") (at 92.71 106.68 90) (unit 1)
(in_bom yes) (on_board yes) (dnp no) (fields_autoplaced)
(uuid 29f7e662-f721-4c3d-848d-61fc5171ba42) (uuid 29f7e662-f721-4c3d-848d-61fc5171ba42)
(property "Reference" "R18" (at 92.71 100.33 90) (property "Reference" "R18" (at 92.71 98.425 90)
(effects (font (size 1.27 1.27))) (effects (font (size 1.27 1.27)))
) )
(property "Value" "240" (at 92.71 102.87 90) (property "Value" "240" (at 92.71 102.235 90)
(effects (font (size 1.27 1.27))) (effects (font (size 1.27 1.27)))
) )
(property "Footprint" "Resistor_SMD:R_0603_1608Metric" (at 92.964 105.664 90) (property "Footprint" "Resistor_SMD:R_0603_1608Metric" (at 92.964 99.314 90)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(property "Datasheet" "" (at 92.71 106.68 0) (property "Datasheet" "" (at 92.71 100.33 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(property "Part Number" "RC0603JR-07240RL" (at 92.71 106.68 0) (property "Part Number" "RC0603JR-07240RL" (at 92.71 100.33 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(property "DNP" "" (at 92.71 106.68 0) (property "DNP" "" (at 92.71 100.33 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "LCSC Part #" "C23350" (at 92.71 106.68 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(pin "1" (uuid bc61001a-9375-4494-bd53-b146b8cbbfcd)) (pin "1" (uuid bc61001a-9375-4494-bd53-b146b8cbbfcd))
@ -836,28 +850,25 @@
) )
) )
(symbol (lib_id "Device:R_US") (at 92.71 97.79 90) (unit 1) (symbol (lib_id "Device:R_US") (at 92.71 113.665 90) (unit 1)
(in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) (in_bom yes) (on_board yes) (dnp no)
(uuid 63c4f82c-3aee-47eb-aaf9-4ff013fc8a40) (uuid 63c4f82c-3aee-47eb-aaf9-4ff013fc8a40)
(property "Reference" "R17" (at 92.71 91.44 90) (property "Reference" "R17" (at 92.71 111.76 90)
(effects (font (size 1.27 1.27))) (effects (font (size 1.27 1.27)))
) )
(property "Value" "560" (at 92.71 93.98 90) (property "Value" "560" (at 92.71 116.205 90)
(effects (font (size 1.27 1.27))) (effects (font (size 1.27 1.27)))
) )
(property "Footprint" "Resistor_SMD:R_0603_1608Metric" (at 92.964 96.774 90) (property "Footprint" "Resistor_SMD:R_0603_1608Metric" (at 92.964 112.649 90)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (at 92.71 97.79 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(property "Part Number" "RC0603JR-07560RL" (at 92.71 97.79 0) (property "Datasheet" "" (at 92.71 113.665 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(property "DNP" "" (at 92.71 97.79 0) (property "Part Number" "RC0603JR-07560RL" (at 92.71 113.665 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(property "LCSC Part #" "C23204" (at 92.71 97.79 0) (property "DNP" "" (at 92.71 113.665 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(pin "1" (uuid 261550e6-b14d-4948-b24c-2c241f5f4547)) (pin "1" (uuid 261550e6-b14d-4948-b24c-2c241f5f4547))
@ -879,13 +890,13 @@
) )
) )
(symbol (lib_id "power:VCC") (at 149.86 102.87 0) (unit 1) (symbol (lib_id "power:+3V3") (at 149.86 102.87 0) (unit 1)
(in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) (in_bom yes) (on_board yes) (dnp no)
(uuid 881d1958-8c2a-4d5a-827d-7379482ba809) (uuid 71503ef2-9ff6-4528-93d1-41bfb21ef761)
(property "Reference" "#PWR055" (at 149.86 106.68 0) (property "Reference" "#PWR024" (at 149.86 106.68 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(property "Value" "VCC" (at 149.86 97.79 0) (property "Value" "+3V3" (at 149.225 98.425 0)
(effects (font (size 1.27 1.27))) (effects (font (size 1.27 1.27)))
) )
(property "Footprint" "" (at 149.86 102.87 0) (property "Footprint" "" (at 149.86 102.87 0)
@ -894,25 +905,20 @@
(property "Datasheet" "" (at 149.86 102.87 0) (property "Datasheet" "" (at 149.86 102.87 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(pin "1" (uuid 3f92816b-1cb9-4f48-9c32-7731fb5014e6)) (pin "1" (uuid 31e7d8c9-bef6-45b1-b652-383617931be4))
(instances (instances
(project "stmdsp_rev3"
(path "/975c3983-57e7-4e06-a697-831e5209dd80"
(reference "#PWR055") (unit 1)
)
)
(project "DSP PAW add-on board" (project "DSP PAW add-on board"
(path "/c291319b-d76e-4fda-91cc-061acff65f9f/270d19d2-3af2-41db-ad1c-33373417ec82" (path "/c291319b-d76e-4fda-91cc-061acff65f9f/97fc232a-dbc7-49da-a6a0-e33e9aacbabd"
(reference "#PWR023") (unit 1) (reference "#PWR024") (unit 1)
) )
(path "/c291319b-d76e-4fda-91cc-061acff65f9f/7798c5d5-f9b1-4b2e-811c-a15abcd34bfa" (path "/c291319b-d76e-4fda-91cc-061acff65f9f/7798c5d5-f9b1-4b2e-811c-a15abcd34bfa"
(reference "#PWR067") (unit 1) (reference "#PWR077") (unit 1)
) )
) )
) )
) )
(symbol (lib_id "Device:LED_RAGB") (at 105.41 106.68 0) (unit 1) (symbol (lib_id "Device:LED_BARG") (at 105.41 106.68 0) (unit 1)
(in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced)
(uuid 9ec9653f-c3a4-41f7-9b1c-80cc24251ffe) (uuid 9ec9653f-c3a4-41f7-9b1c-80cc24251ffe)
(property "Reference" "D7" (at 105.41 93.98 0) (property "Reference" "D7" (at 105.41 93.98 0)
@ -933,9 +939,6 @@
(property "DNP" "" (at 105.41 106.68 0) (property "DNP" "" (at 105.41 106.68 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(property "LCSC Part #" "C427425" (at 105.41 106.68 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 363fad31-16fa-4be8-b5d2-c004f7616847)) (pin "1" (uuid 363fad31-16fa-4be8-b5d2-c004f7616847))
(pin "2" (uuid c958bf86-e891-47cb-9056-d1b81e2b51c9)) (pin "2" (uuid c958bf86-e891-47cb-9056-d1b81e2b51c9))
(pin "3" (uuid 42dd1fb6-acbd-4b4d-9b66-616c7b1fcb01)) (pin "3" (uuid 42dd1fb6-acbd-4b4d-9b66-616c7b1fcb01))
@ -949,28 +952,25 @@
) )
) )
(symbol (lib_id "Device:R_US") (at 92.71 115.57 90) (unit 1) (symbol (lib_id "Device:R_US") (at 92.71 106.68 90) (unit 1)
(in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) (in_bom yes) (on_board yes) (dnp no)
(uuid d04657bd-c6dc-4346-b2bd-fdac6c2c8be6) (uuid d04657bd-c6dc-4346-b2bd-fdac6c2c8be6)
(property "Reference" "R19" (at 92.71 109.22 90) (property "Reference" "R19" (at 92.71 104.775 90)
(effects (font (size 1.27 1.27))) (effects (font (size 1.27 1.27)))
) )
(property "Value" "240" (at 92.71 111.76 90) (property "Value" "240" (at 92.71 109.22 90)
(effects (font (size 1.27 1.27))) (effects (font (size 1.27 1.27)))
) )
(property "Footprint" "Resistor_SMD:R_0603_1608Metric" (at 92.964 114.554 90) (property "Footprint" "Resistor_SMD:R_0603_1608Metric" (at 92.964 105.664 90)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (at 92.71 115.57 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(property "Part Number" "RC0603JR-07240RL" (at 92.71 115.57 0) (property "Datasheet" "" (at 92.71 106.68 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(property "DNP" "" (at 92.71 115.57 0) (property "Part Number" "RC0603JR-07240RL" (at 92.71 106.68 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(property "LCSC Part #" "C23350" (at 92.71 115.57 0) (property "DNP" "" (at 92.71 106.68 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(pin "1" (uuid 58518da9-c923-45a5-928d-33b164e619f0)) (pin "1" (uuid 58518da9-c923-45a5-928d-33b164e619f0))
@ -992,6 +992,34 @@
) )
) )
(symbol (lib_id "power:+3V3") (at 193.04 102.87 0) (unit 1)
(in_bom yes) (on_board yes) (dnp no)
(uuid ed87550a-fea6-41a6-acde-ab0b2118affc)
(property "Reference" "#PWR024" (at 193.04 106.68 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Value" "+3V3" (at 192.405 98.425 0)
(effects (font (size 1.27 1.27)))
)
(property "Footprint" "" (at 193.04 102.87 0)
(effects (font (size 1.27 1.27)) hide)
)
(property "Datasheet" "" (at 193.04 102.87 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 4bd61509-f210-4907-9795-d698befe7b36))
(instances
(project "DSP PAW add-on board"
(path "/c291319b-d76e-4fda-91cc-061acff65f9f/97fc232a-dbc7-49da-a6a0-e33e9aacbabd"
(reference "#PWR024") (unit 1)
)
(path "/c291319b-d76e-4fda-91cc-061acff65f9f/7798c5d5-f9b1-4b2e-811c-a15abcd34bfa"
(reference "#PWR078") (unit 1)
)
)
)
)
(symbol (lib_id "power:VCC") (at 114.3 106.68 0) (unit 1) (symbol (lib_id "power:VCC") (at 114.3 106.68 0) (unit 1)
(in_bom yes) (on_board yes) (dnp no) (fields_autoplaced) (in_bom yes) (on_board yes) (dnp no) (fields_autoplaced)
(uuid f28364df-0228-4487-bd82-798aa123dfd6) (uuid f28364df-0228-4487-bd82-798aa123dfd6)
@ -1046,9 +1074,6 @@
(property "DNP" "" (at 149.86 106.68 0) (property "DNP" "" (at 149.86 106.68 0)
(effects (font (size 1.27 1.27)) hide) (effects (font (size 1.27 1.27)) hide)
) )
(property "LCSC Part #" "C330458" (at 149.86 106.68 0)
(effects (font (size 1.27 1.27)) hide)
)
(pin "1" (uuid 1a649be3-376f-4b5d-81c4-a51773e11622)) (pin "1" (uuid 1a649be3-376f-4b5d-81c4-a51773e11622))
(pin "2" (uuid 2642011f-a119-4c97-a567-49296afdd169)) (pin "2" (uuid 2642011f-a119-4c97-a567-49296afdd169))
(pin "3" (uuid 402bf8e9-23dc-4da7-aabf-504b3b356586)) (pin "3" (uuid 402bf8e9-23dc-4da7-aabf-504b3b356586))

Loading…
Cancel
Save