[+] ESP32-S3 Config
This commit is contained in:
+10
-8
@@ -13,6 +13,11 @@
|
||||
;board = wemos_d1_uno32
|
||||
;framework = arduino
|
||||
|
||||
[env:s3]
|
||||
platform = espressif32
|
||||
board = esp32-s3-devkitc-1
|
||||
framework = arduino
|
||||
|
||||
; ESP32-S2 and C3 both has a problem where the ADC jumps around a LOT
|
||||
;[env:s2]
|
||||
;platform = espressif32
|
||||
@@ -25,14 +30,11 @@
|
||||
;framework = arduino
|
||||
|
||||
; YD STM32F411CEU6
|
||||
[env:stm32f411ce]
|
||||
platform = ststm32
|
||||
board = blackpill_f411ce
|
||||
framework = arduino
|
||||
;upload_protocol = stlink
|
||||
; Flash using yd-link
|
||||
;debug_tool = cmsis-dap
|
||||
upload_protocol = cmsis-dap
|
||||
;[env:stm32f411ce]
|
||||
;platform = ststm32
|
||||
;board = blackpill_f411ce
|
||||
;framework = arduino
|
||||
;upload_protocol = dfu
|
||||
|
||||
; Arduino nano is good but too few pins
|
||||
;[env:n328p]
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
#ifndef FIRMWARE_CONFIG_H
|
||||
#define FIRMWARE_CONFIG_H
|
||||
|
||||
#include "stm32f4xx_hal.h"
|
||||
|
||||
// ========================================
|
||||
// Pin Configuration
|
||||
// ========================================
|
||||
|
||||
// LED indicator for pulling update
|
||||
const int LED_REFRESH = PA13;
|
||||
const int LED_REFRESH = 37;
|
||||
|
||||
// 4 1:16 Multiplexers: GPIO pins for each analog multiplexer that handles 12 sensors of an octave
|
||||
// Notes are connected in order: Mux #1 (0-11), Mux #2 (12-23), Mux #3 (24-35), Mux #4 (36-47), Mux #5 (48-59)
|
||||
const int NUM_MUX = 5;
|
||||
const int PINS_PER_MUX = 12;
|
||||
const int MUX_IN[NUM_MUX] = {PA0, PA1, PA2, PA3, PA4}; // Analog signal input
|
||||
const int MUX_IN[NUM_MUX] = {4, 5, 6, 7, 8};
|
||||
|
||||
// Select pins for every multiplexer, each multiplexer has 4 select pins, all sel0 are connected to 14, etc.
|
||||
const int NUM_MUX_SEL = 4;
|
||||
const int MUX_SEL_OUT[NUM_MUX_SEL] = {PB4, PB5, PB6, PB7};
|
||||
const int MUX_SEL_OUT[NUM_MUX_SEL] = {10, 11, 12, 13};
|
||||
|
||||
// 3 1:8 Multiplexers for the midi panel
|
||||
const int P_NUM_MUX = 3;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#define u16 uint16_t
|
||||
#define u32 uint32_t
|
||||
#define u64 uint64_t
|
||||
//#define timeMillis() std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count()
|
||||
#define timeMillis() HAL_GetTick()
|
||||
#define timeMillis() std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count()
|
||||
//#define timeMillis() HAL_GetTick()
|
||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define let auto
|
||||
#define val const auto
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
#include <Arduino.h>
|
||||
#include <chrono>
|
||||
#include <cinttypes>
|
||||
#include "macros.h"
|
||||
#include "config.h"
|
||||
|
||||
#include "stm32f4xx_hal.h"
|
||||
|
||||
// ========================================
|
||||
// Code
|
||||
// ========================================
|
||||
@@ -39,7 +36,6 @@ let led_refresh_on = false;
|
||||
|
||||
void setup()
|
||||
{
|
||||
HAL_Init();
|
||||
|
||||
// Initialize pin and serial
|
||||
for (int pin: MUX_IN) pinMode(pin, INPUT);
|
||||
|
||||
Reference in New Issue
Block a user