Skip to content

Commit

Permalink
Merge pull request #253 from brainsmoke/feature/eriks_pixel_improvements
Browse files Browse the repository at this point in the history
add missing ifdef
  • Loading branch information
tjclement authored Aug 12, 2023
2 parents f871094 + 7536da3 commit a6c30f2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions firmware/components/driver_display_hub75/driver_hub75_bits.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,22 @@
#include "include/driver_hub75_bits.h"
#include "include/i2s_parallel.h"

#ifndef DRIVER_HUB75_DMA_DATA_TEST
#include "esp_heap_caps.h"
#endif




#ifdef DRIVER_HUB75_DMA_DATA_TEST
#define CONFIG_DRIVER_HUB75_ENABLE
#define CONFIG_HUB75_WIDTH 32
#define MALLOC_CAP_DMA (-1)
#include <stdlib.h>
#include <stdio.h>
void *heap_caps_calloc(size_t nmemb, size_t size, int cap) { return calloc(nmemb, size); }
void i2sparallel_init(i2s_parallel_buffer_desc_t *bufa, i2s_parallel_buffer_desc_t *bufb) { }
void i2sparallel_flipBuffer(int bufid) { }
#else
#include "esp_heap_caps.h"
#endif

#ifdef CONFIG_DRIVER_HUB75_ENABLE

#define BIT_RED (1<<0) //connected to GPIO2 here
#define BIT_GREEN (1<<1) //connected to GPIO15 here
#define BIT_BLUE (1<<2) //connected to GPIO4 here
Expand Down Expand Up @@ -596,3 +595,6 @@ int main(int argc, char *argv[])
}

#endif // DRIVER_HUB75_DMA_DATA_TEST


#endif // CONFIG_DRIVER_HUB75_ENABLE

0 comments on commit a6c30f2

Please sign in to comment.