Skip to content

Commit

Permalink
#256 Add targets property for tinyusb
Browse files Browse the repository at this point in the history
  • Loading branch information
martinberlin committed Oct 18, 2023
1 parent aa1edd0 commit 1679bc5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 6 additions & 7 deletions examples/v7-usb-device/main/msc-sd/msc_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ EpdiyHighlevelState hl;
// Image handling
uint8_t* source_buf; // IMG file buffer
uint8_t* decoded_image; // RAW decoded image
double gamma_value = 0.9; // Lower: Darker Higher: Brigther
double gamma_value = 0.7; // Lower: Darker Higher: Brigther

// JPG decoder from @bitbank2
#include "JPEGDEC.h"
Expand Down Expand Up @@ -286,8 +286,6 @@ int decodeJpeg(uint8_t* source_buf, int file_size, int xpos, int ypos) {
void read_file(char * filename) {
char filepath[150];
sprintf(filepath, "%s/%s", BASE_PATH, filename);


ESP_LOGI(TAG, "Opening file: %s", filepath);

FILE* file = fopen(filepath, "r");
Expand Down Expand Up @@ -357,13 +355,14 @@ static void _mount(void)
char selected_file[256];
//While the next entry is not readable we will print directory files
while ((d = readdir(dh)) != NULL) {
file_cnt++;

if (file_cnt == 1) {
if (file_cnt == 1 && strncmp(d->d_name, ".", 1) > 0 ) {
strcpy(selected_file, d->d_name);
printf("Opening: %s\n", selected_file);
} else {
file_cnt++;
printf("%s\n", d->d_name);
continue;
}
printf("%s\n", d->d_name);
sprintf(strbuf, "%s", d->d_name);
epd_write_string(&FiraSans_20, strbuf, &cursor_x, &cursor_y, fb, &font_props);
cursor_x = 10;
Expand Down
4 changes: 3 additions & 1 deletion idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ url: "https://github.com/vroland/epdiy"
license: LGPLv3

dependencies:
espressif/esp_tinyusb: "*"
espressif/esp_tinyusb:
version: "~1.0.0"
targets: esp32s3

0 comments on commit 1679bc5

Please sign in to comment.