File tree Expand file tree Collapse file tree 13 files changed +21
-10
lines changed Expand file tree Collapse file tree 13 files changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ namespace lgfx
60
60
static inline void * heap_alloc_psram (size_t length) { return malloc (length); }
61
61
static inline void * heap_alloc_dma ( size_t length) { return malloc (length); } // aligned_alloc(16, length);
62
62
static inline void heap_free (void * buf) { free (buf); }
63
- static inline bool heap_capable_dma (const void * ptr) { return true ; }
63
+ static inline bool heap_capable_dma (const void * ptr) { return false ; }
64
64
65
65
static inline void gpio_hi (uint32_t pin) { digitalWrite (pin, HIGH); }
66
66
static inline void gpio_lo (uint32_t pin) { digitalWrite (pin, LOW); }
Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ Original Source:
38
38
#include < esp_memory_utils.h>
39
39
#elif __has_include(<soc/soc_memory_types.h>)
40
40
#include < soc/soc_memory_types.h>
41
+ #else
42
+ __attribute ((weak))
43
+ esp_ptr_dma_capable(const void *) { return false ; }
41
44
#endif
42
45
43
46
#if defined ( ARDUINO )
Original file line number Diff line number Diff line change @@ -134,7 +134,11 @@ namespace lgfx
134
134
i2s_dev->in_link .val = 0 ;
135
135
i2s_dev->out_link .val = 0 ;
136
136
137
+ #if defined ( I2S_TX_PCM_BYPASS )
137
138
i2s_dev->conf1 .val = I2S_TX_PCM_BYPASS | I2S_TX_STOP_EN;
139
+ #else
140
+ i2s_dev->conf1 .val = (BIT (3 )) | I2S_TX_STOP_EN;
141
+ #endif
138
142
i2s_dev->conf2 .val = I2S_LCD_EN;
139
143
i2s_dev->conf_chan .val = 1 << I2S_TX_CHAN_MOD_S | 1 << I2S_RX_CHAN_MOD_S;
140
144
Original file line number Diff line number Diff line change @@ -134,7 +134,11 @@ namespace lgfx
134
134
i2s_dev->in_link .val = 0 ;
135
135
i2s_dev->out_link .val = 0 ;
136
136
137
+ #if defined ( I2S_TX_PCM_BYPASS )
137
138
i2s_dev->conf1 .val = I2S_TX_PCM_BYPASS | I2S_TX_STOP_EN;
139
+ #else
140
+ i2s_dev->conf1 .val = (BIT (3 )) | I2S_TX_STOP_EN;
141
+ #endif
138
142
i2s_dev->conf2 .val = I2S_LCD_EN;
139
143
i2s_dev->conf_chan .val = 1 << I2S_TX_CHAN_MOD_S | 1 << I2S_RX_CHAN_MOD_S;
140
144
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ namespace lgfx
68
68
static inline void * heap_alloc_psram (size_t length) { return malloc (length); }
69
69
static inline void * heap_alloc_dma ( size_t length) { return malloc (length); } // aligned_alloc(16, length);
70
70
static inline void heap_free (void * buf) { free (buf); }
71
- static inline bool heap_capable_dma (const void * ptr) { return true ; }
71
+ static inline bool heap_capable_dma (const void * ptr) { return false ; }
72
72
73
73
static inline void gpio_hi (int_fast8_t pin) { if (pin & 16 ) { if (pin == 16 ) *(volatile uint32_t *)(0x60000768 ) |= 1 ; } else { *(volatile uint32_t *)(0x60000304 ) = 1 << (pin & 15 ); } }
74
74
static inline void gpio_lo (int_fast8_t pin) { if (pin & 16 ) { if (pin == 16 ) *(volatile uint32_t *)(0x60000768 ) &= ~1 ; } else { *(volatile uint32_t *)(0x60000308 ) = 1 << (pin & 15 ); } }
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ namespace lgfx
45
45
static inline void * heap_alloc_psram (size_t length) { return malloc (length); }
46
46
static inline void * heap_alloc_dma ( size_t length) { return malloc (length); } // aligned_alloc(16, length);
47
47
static inline void heap_free (void * buf) { free (buf); }
48
- static inline bool heap_capable_dma (const void * ptr) { return true ; }
48
+ static inline bool heap_capable_dma (const void * ptr) { return false ; }
49
49
50
50
void gpio_hi (uint32_t pin);
51
51
void gpio_lo (uint32_t pin);
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ namespace lgfx
42
42
static inline void * heap_alloc_psram (size_t length) { return malloc (length); }
43
43
static inline void * heap_alloc_dma ( size_t length) { return malloc (length); } // aligned_alloc(16, length);
44
44
static inline void heap_free (void * buf) { free (buf); }
45
- static inline bool heap_capable_dma (const void * ptr) { return true ; }
45
+ static inline bool heap_capable_dma (const void * ptr) { return false ; }
46
46
47
47
static inline void gpio_hi (uint32_t pin) { }
48
48
static inline void gpio_lo (uint32_t pin) { }
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ namespace lgfx
100
100
static inline void * heap_alloc_psram (size_t length) { return malloc (length); }
101
101
static inline void * heap_alloc_dma ( size_t length) { return malloc (length); } // aligned_alloc(16, length);
102
102
static inline void heap_free (void * buf) { free (buf); }
103
- static inline bool heap_capable_dma (const void * ptr) { return true ; }
103
+ static inline bool heap_capable_dma (const void * ptr) { return false ; }
104
104
105
105
enum pin_mode_t
106
106
{ output
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ namespace lgfx
108
108
static inline void * heap_alloc_psram (size_t length) { return malloc (length); }
109
109
static inline void * heap_alloc_dma ( size_t length) { return memalign (16 , length); }
110
110
static inline void heap_free (void * buf) { free (buf); }
111
- static inline bool heap_capable_dma (const void * ptr) { return true ; }
111
+ static inline bool heap_capable_dma (const void * ptr) { return false ; }
112
112
113
113
static inline void gpio_hi (uint32_t pin) { if (pin > 255 ) return ; PORT->Group [pin >> samd21::PORT_SHIFT].OUTSET .reg = (1ul << (pin & samd21::PIN_MASK)); }
114
114
static inline void gpio_lo (uint32_t pin) { if (pin > 255 ) return ; PORT->Group [pin >> samd21::PORT_SHIFT].OUTCLR .reg = (1ul << (pin & samd21::PIN_MASK)); }
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ namespace lgfx
138
138
static inline void * heap_alloc_psram (size_t length) { return malloc (length); }
139
139
static inline void * heap_alloc_dma ( size_t length) { return memalign (16 , length); }
140
140
static inline void heap_free (void * buf) { free (buf); }
141
- static inline bool heap_capable_dma (const void * ptr) { return true ; }
141
+ static inline bool heap_capable_dma (const void * ptr) { return false ; }
142
142
143
143
static inline void gpio_hi (uint32_t pin) { PORT->Group [pin >> samd51::PORT_SHIFT].OUTSET .reg = (1ul << (pin & samd51::PIN_MASK)); }
144
144
static inline void gpio_lo (uint32_t pin) { PORT->Group [pin >> samd51::PORT_SHIFT].OUTCLR .reg = (1ul << (pin & samd51::PIN_MASK)); }
You can’t perform that action at this time.
0 commit comments