Skip to content
Snippets Groups Projects
Commit 7e939323 authored by q3k's avatar q3k
Browse files

badg23, gc9a01: move to components/

parent 33c71513
No related branches found
No related tags found
No related merge requests found
Showing
with 26 additions and 62 deletions
......@@ -4,7 +4,4 @@ set(IDF_TARGET esp32s3)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
# TODO(q3k): migrate badge23/components/* to components/*.
list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/badge23/components/")
project(badge23)
idf_component_register(SRCS "espan.c" "apa102LEDStrip.c" "audio.c" "captouch.c" "decode_image.c" "leds.c" "display.c" "synth.c" "scope.c"
EMBED_FILES
${project_dir}/resources/boot.snd
${project_dir}/resources/pan.s16
${project_dir}/resources/image.jpg
INCLUDE_DIRS ".")
menu "Example Configuration"
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
config I2C_MASTER_SCL
int "SCL GPIO Num"
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 19 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 6
help
GPIO number for I2C Master clock line.
config I2C_MASTER_SDA
int "SDA GPIO Num"
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 18 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3
default 5
help
GPIO number for I2C Master data line.
endmenu
## IDF Component Manager Manifest File
dependencies:
espressif/esp_jpeg: "==1.0.0"
## Required IDF version
idf:
version: ">=4.1.0"
# # Put list of dependencies here
# # For components maintained by Espressif:
# component: "~1.0.0"
# # For 3rd party components:
# username/component: ">=1.0.0,<2.0.0"
# username2/component2:
# version: "~1.0.0"
# # For transient dependencies `public` flag can be set.
# # `public` flag doesn't have an effect dependencies of the `main` component.
# # All dependencies of `main` are public by default.
# public: true
idf_component_register(
SRCS
apa102LEDStrip.c
audio.c
captouch.c
display.c
espan.c
leds.c
scope.c
synth.c
INCLUDE_DIRS
include
REQUIRES
gc9a01
)
#include "apa102LEDStrip.h"
#include "badge23/apa102LEDStrip.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
......
#include "audio.h"
#include "synth.h"
#include "scope.h"
#include "badge23/audio.h"
#include "badge23/synth.h"
#include "badge23/scope.h"
#include "driver/i2s.h"
......@@ -10,7 +10,6 @@
#include <stdio.h>
#include <math.h>
#include <string.h>
#include "../../py/mphal.h"
static void audio_player_task(void* arg);
......
File moved
#include "display.h"
#include "components/gc9a01/gc9a01.h"
#include "badge23/display.h"
#include "gc9a01.h"
#include "esp_log.h"
#include <freertos/FreeRTOS.h>
......@@ -10,7 +10,7 @@
#include <string.h>
#include <math.h>
#include "scope.h"
#include "badge23/scope.h"
#include "esp_system.h"
uint16_t *pixels;
......
#include "captouch.h"
#include "audio.h"
#include "leds.h"
#include "../../py/mphal.h"
#include "display.h"
#include "badge23/captouch.h"
#include "badge23/audio.h"
#include "badge23/leds.h"
#include "badge23/display.h"
#include "esp_log.h"
#include "driver/i2c.h"
......@@ -56,9 +55,7 @@ void os_app_main(void)
vTaskDelay(2000 / portTICK_PERIOD_MS);
//set_global_vol_dB(0);
mp_hal_stdout_tx_str("task inits done\n\r");
display_init();
mp_hal_stdout_tx_str("display init done\n\r");
while(1) {
manual_captouch_readout(1);
vTaskDelay((CAPTOUCH_POLLING_PERIOD) / portTICK_PERIOD_MS);
......
File moved
File moved
File moved
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment