Skip to content

Commit

Permalink
SUKU midi translator and midi uart moved to proper components
Browse files Browse the repository at this point in the history
  • Loading branch information
SukuWc committed Dec 11, 2023
1 parent 5d41e83 commit d34b9e0
Show file tree
Hide file tree
Showing 18 changed files with 1,392 additions and 9 deletions.
2 changes: 1 addition & 1 deletion firmware/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"name": "Unit Test",
"color": "white",
"singleInstance": true,
"command": "cd ./main/host_test && ./test.sh",
"command": "cd ./components/knot_midi_translator/host_test && ./test.sh",
}
]
},
Expand Down
7 changes: 7 additions & 0 deletions firmware/components/knot_midi_translator/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
idf_component_register(
SRCS
"knot_midi_translator.c"
INCLUDE_DIRS
"."
REQUIRES
)
674 changes: 674 additions & 0 deletions firmware/components/knot_midi_translator/LICENSE

Large diffs are not rendered by default.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ cmake_minimum_required(VERSION 3.10)
project(UnitTest VERSION 1.0)

# add the executable
add_executable(${PROJECT_NAME} main.c unity.c ../midi_translator.c)
add_executable(${PROJECT_NAME} main.c unity.c ../knot_midi_translator.c)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "unity.h"
#include "../midi_translator.h"
#include "../knot_midi_translator.h"

#include <stdio.h>
#include <memory.h>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <stdint.h>
#include "midi_translator.h"
#include "knot_midi_translator.h"


struct uart_midi_event_packet usb_midi_to_uart(struct usb_midi_event_packet usb_packet){
Expand Down
File renamed without changes.
11 changes: 11 additions & 0 deletions firmware/components/knot_midi_uart/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
idf_component_register(
SRCS
"knot_midi_uart.c"
INCLUDE_DIRS
"."
REQUIRES
"knot_midi_translator"
"driver"
"grid_common"
"grid_esp32_led"
)
674 changes: 674 additions & 0 deletions firmware/components/knot_midi_uart/LICENSE

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/


#include "knot_midi_uart.h"

#include <stdlib.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
Expand All @@ -18,7 +21,7 @@

#include "freertos/queue.h"
#include "driver/uart.h"
#include "midi_translator.h"
#include "knot_midi_translator.h"


#define EX_UART_NUM UART_NUM_1
Expand All @@ -35,7 +38,6 @@ uint8_t midi_through = false;
#include "driver/gpio.h"

#include "grid_led.h"
#include "../managed_components/sukuwc__grid_common/grid_led.h"

#define TRS_TX_AB_SELECT 15
#define TRS_RX_AB_SELECT 16
Expand Down
17 changes: 17 additions & 0 deletions firmware/components/knot_midi_uart/knot_midi_uart.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once

#include "driver/uart.h"
#include "knot_midi_translator.h"



#include "freertos/FreeRTOS.h"
#include "freertos/semphr.h"
#include "freertos/ringbuf.h"
#include "freertos/queue.h"


void uart_init(void);
int uart_send_data(struct uart_midi_event_packet ev);
void uart_housekeeping_task(void *arg);
void uart_rx_task(void *arg);
2 changes: 0 additions & 2 deletions firmware/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ idf_component_register(
SRCS
"midi_host_fw.c"
"class_driver.c"
"midi_translator.c"
"uart_driver.c"

INCLUDE_DIRS
"."
Expand Down
2 changes: 1 addition & 1 deletion firmware/main/class_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "grid_led.h"
#include "../managed_components/sukuwc__grid_common/grid_led.h"

#include "midi_translator.h"
#include "knot_midi_translator.h"

#include "rom/ets_sys.h" // For ets_printf

Expand Down

0 comments on commit d34b9e0

Please sign in to comment.