Compare commits

...

1 commit

Author SHA1 Message Date
95dccdcc38
Fix: allow 80MHz clock speed 2024-08-20 13:12:32 +02:00
2 changed files with 560 additions and 561 deletions

View file

@ -306,7 +306,7 @@ struct HUB75_I2S_CFG
bool clkphase;
// Minimum refresh / scan rate needs to be configured on start due to LSBMSB_TRANSITION_BIT calculation in allocateDMAmemory()
uint8_t min_refresh_rate;
uint16_t min_refresh_rate;
// struct constructor
HUB75_I2S_CFG(
@ -498,7 +498,6 @@ public:
vlineDMA(x, y, h, r, g, b);
else
hlineDMA(x, y, w, r, g, b);
}
// rgb888 overload
virtual inline void drawFastVLine(int16_t x, int16_t y, int16_t h, uint8_t r, uint8_t g, uint8_t b)
@ -526,7 +525,6 @@ public:
vlineDMA(x, y, h, r, g, b);
else
hlineDMA(x, y, w, r, g, b);
}
// rgb888 overload
virtual inline void drawFastHLine(int16_t x, int16_t y, int16_t w, uint8_t r, uint8_t g, uint8_t b)
@ -550,7 +548,6 @@ public:
transform(x, y, w, h);
fillRectDMA(x, y, w, h, r, g, b);
}
// rgb888 overload
virtual inline void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint8_t r, uint8_t g, uint8_t b)
@ -558,7 +555,6 @@ public:
transform(x, y, w, h);
fillRectDMA(x, y, w, h, r, g, b);
}
#endif
@ -572,8 +568,8 @@ public:
#endif
#ifdef NO_GFX
inline int16_t width() const { return m_cfg.mx_width * m_cfg.chain_length; }
inline int16_t height() const { return m_cfg.mx_height; }
inline int16_t width() const { return m_cfg.mx_width * m_cfg.chain_length; }
inline int16_t height() const { return m_cfg.mx_height; }
#endif
void drawIcon(int *ico, int16_t x, int16_t y, int16_t cols, int16_t rows);
@ -603,12 +599,9 @@ public:
dma_bus.flip_dma_output_buffer(back_buffer_id);
//back_buffer_id ^= 1;
back_buffer_id = back_buffer_id^1;
// back_buffer_id ^= 1;
back_buffer_id = back_buffer_id ^ 1;
fb = &frame_buffer[back_buffer_id];
}
/**
@ -716,11 +709,11 @@ protected:
clearFrameBuffer(0);
brtCtrlOEv2(brightness, 0);
if (m_cfg.double_buff) {
if (m_cfg.double_buff)
{
clearFrameBuffer(1);
brtCtrlOEv2(brightness, 1);
}
}
@ -777,7 +770,7 @@ private:
/**
* @brief - DP3246-family chips initialization routine
*/
void dp3246init(const HUB75_I2S_CFG& _cfg);
void dp3246init(const HUB75_I2S_CFG &_cfg);
/**
* @brief - reset OE bits in DMA buffer in a way to control brightness
@ -841,7 +834,6 @@ protected:
Bus_Parallel16 dma_bus;
private:
// Matrix i2s settings
HUB75_I2S_CFG m_cfg;
@ -855,9 +847,9 @@ private:
frameStruct frame_buffer[2];
frameStruct *fb; // What framebuffer we are writing pixel changes to? (pointer to either frame_buffer[0] or frame_buffer[1] basically ) used within updateMatrixDMABuffer(...)
volatile int back_buffer_id = 0; // If using double buffer, which one is NOT active (ie. being displayed) to write too?
int brightness = 128; // If you get ghosting... reduce brightness level. ((60/64)*255) seems to be the limit before ghosting on a 64 pixel wide physical panel for some panels.
int lsbMsbTransitionBit = 0; // For colour depth calculations
volatile int back_buffer_id = 0; // If using double buffer, which one is NOT active (ie. being displayed) to write too?
int brightness = 128; // If you get ghosting... reduce brightness level. ((60/64)*255) seems to be the limit before ghosting on a 64 pixel wide physical panel for some panels.
int lsbMsbTransitionBit = 0; // For colour depth calculations
/* ESP32-HUB75-MatrixPanel-I2S-DMA functioning constants
* we should not those once object instance initialized it's DMA structs

File diff suppressed because it is too large Load diff