Skip to content

Commit 0994e28

Browse files
committed
optimized for DMA and added more control over panel speed and clearing options
1 parent a546aba commit 0994e28

File tree

3 files changed

+104
-67
lines changed

3 files changed

+104
-67
lines changed

src/FastEPD.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,9 @@ int FASTEPD::setPanelSize(int width, int height, int flags) {
285285
return bbepSetPanelSize(&_state, width, height, flags);
286286
} /* setPanelSize() */
287287

288-
int FASTEPD::initPanel(int iPanel)
288+
int FASTEPD::initPanel(int iPanel, uint32_t u32Speed)
289289
{
290-
return bbepInitPanel(&_state, iPanel);
290+
return bbepInitPanel(&_state, iPanel, u32Speed);
291291
} /* initIO() */
292292

293293
int FASTEPD::einkPower(int bOn)
@@ -326,9 +326,9 @@ void FASTEPD::fillScreen(uint8_t u8Color)
326326
bbepFillScreen(&_state, u8Color);
327327
} /* fillScreen() */
328328

329-
int FASTEPD::fullUpdate(bool bFast, bool bKeepOn, BBEPRECT *pRect)
329+
int FASTEPD::fullUpdate(int iClearMode, bool bKeepOn, BBEPRECT *pRect)
330330
{
331-
return bbepFullUpdate(&_state, bFast, bKeepOn, pRect);
331+
return bbepFullUpdate(&_state, iClearMode, bKeepOn, pRect);
332332
} /* fullUpdate() */
333333

334334
int FASTEPD::partialUpdate(bool bKeepOn, int iStartLine, int iEndLine)

src/FastEPD.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@
3434
#define BB_NOT_USED 0xff
3535
#define BBEP_TRANSPARENT 255
3636

37+
// 5 possible clearing options before an update
38+
enum {
39+
CLEAR_NONE = 0, // don't clear
40+
CLEAR_FAST, // 8 passes black/white
41+
CLEAR_SLOW, // 10 passes black/white/black/white
42+
CLEAR_WHITE, // 5 passes to white (may not be sufficient to clear old pixels)
43+
CLEAR_BLACK, // 5 passes to black (not recommended unless you know what you're doing)
44+
};
3745
// 5 possible font sizes: 8x8, 16x32, 6x8, 12x16 (stretched from 6x8 with smoothing), 16x16 (stretched from 8x8)
3846
enum {
3947
FONT_6x8 = 0,
@@ -210,7 +218,7 @@ class FASTEPD
210218
{
211219
public:
212220
FASTEPD() {memset(&_state, 0, sizeof(_state)); _state.iFont = FONT_8x8; _state.iFG = BBEP_BLACK;}
213-
int initPanel(int iPanelType);
221+
int initPanel(int iPanelType, uint32_t u32Speed = 0);
214222
void initLights(uint8_t led1, uint8_t led2 = 0xff);
215223
void setBrightness(uint8_t led1, uint8_t led2 = 0);
216224
int initCustomPanel(BBPANELDEF *pPanel, BBPANELPROCS *pProcs);
@@ -227,7 +235,7 @@ class FASTEPD
227235
uint8_t *currentBuffer(void) { return _state.pCurrent;}
228236
int einkPower(int bOn);
229237
void deInit(void) {if (_state.pfnIODeInit) (*_state.pfnIODeInit)(&_state);}
230-
int fullUpdate(bool bFast = false, bool bKeepOn = false, BBEPRECT *pRect = NULL);
238+
int fullUpdate(int iClearMode = CLEAR_SLOW, bool bKeepOn = false, BBEPRECT *pRect = NULL);
231239
int partialUpdate(bool bKeepOn, int iStartRow = 0, int iEndRow = 4095);
232240
int smoothUpdate(bool bKeepOn, uint8_t u8Color);
233241
void setPasses(uint8_t iPartialPasses, uint8_t iFullPasses = 5);

src/FastEPD.inl

Lines changed: 90 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,20 +1074,18 @@ void bbepRowControl(FASTEPDSTATE *pState, int iType)
10741074
return;
10751075
} /* bbepRowControl() */
10761076

1077-
void bbepWriteRow(FASTEPDSTATE *pState, uint8_t *pData, int iLen)
1077+
// The data needs to come from a DMA buffer or the Espressif DMA driver
1078+
// will allocate (and leak) an internal buffer each time
1079+
void bbepWriteRow(FASTEPDSTATE *pState, uint8_t *pData, int iLen, int bRowStep)
10781080
{
10791081
esp_err_t err;
10801082

1081-
if (pData != pState->dma_buf) {
1082-
// the transaction needs to come from a DMA buffer or the Espressif DMA driver
1083-
// will allocate (and leak) an internal buffer each time
1084-
memcpy(pState->dma_buf, pData, iLen);
1085-
pData = pState->dma_buf;
1086-
}
1087-
10881083
while (!dma_is_done) {
10891084
delayMicroseconds(1);
10901085
}
1086+
if (bRowStep) {
1087+
bbepRowControl(pState, ROW_STEP);
1088+
}
10911089
if (bSlowSPH) {
10921090
gpio_set_level(u8SPH, 0); // SPH/CS active
10931091
gpio_set_level(u8CKV, 1); // CKV on
@@ -1098,10 +1096,10 @@ void bbepWriteRow(FASTEPDSTATE *pState, uint8_t *pData, int iLen)
10981096
if (err != ESP_OK) {
10991097
// Serial.printf("Error %d sending LCD data\n", (int)err);
11001098
}
1101-
while (!dma_is_done) {
1102-
delayMicroseconds(1);
1103-
vTaskDelay(0);
1104-
}
1099+
// while (!dma_is_done) {
1100+
// delayMicroseconds(1);
1101+
// vTaskDelay(0);
1102+
// }
11051103
} /* bbepWriteRow() */
11061104

11071105
uint8_t TPS65185PowerGood(void)
@@ -1196,7 +1194,7 @@ int bbepSetPanelSize(FASTEPDSTATE *pState, int width, int height, int flags) {
11961194
return BBEP_ERROR_NO_MEMORY;
11971195
}
11981196
// Allocate memory for each line to transmit
1199-
pState->dma_buf = (uint8_t *)heap_caps_malloc((pState->width / 4) + pState->panelDef.iLinePadding + 16, MALLOC_CAP_DMA);
1197+
pState->dma_buf = (uint8_t *)heap_caps_malloc((pState->width / 2) + pState->panelDef.iLinePadding + 16, MALLOC_CAP_DMA);
12001198
iPasses = (pState->panelDef.iMatrixSize / 16); // number of passes
12011199
pGrayLower = (uint32_t *)malloc(256 * iPasses * sizeof(uint32_t));
12021200
if (!pGrayLower) return BBEP_ERROR_NO_MEMORY;
@@ -1278,14 +1276,15 @@ void bbepInitLights(FASTEPDSTATE *pState, uint8_t led1, uint8_t led2)
12781276
// Each name points to a configuration with info about the PCB and possibly a display
12791277
// e.g. BB_PANEL_M5PAPERs3 has both PCB and display info in a single configuration
12801278
//
1281-
int bbepInitPanel(FASTEPDSTATE *pState, int iPanel)
1279+
int bbepInitPanel(FASTEPDSTATE *pState, int iPanel, uint32_t u32Speed)
12821280
{
12831281
int rc;
12841282
if (iPanel > 0 && iPanel < BB_PANEL_COUNT) {
12851283
pState->iPanelType = iPanel;
12861284
pState->width = pState->native_width = panelDefs[iPanel].width;
12871285
pState->height = pState->native_height = panelDefs[iPanel].height;
12881286
memcpy(&pState->panelDef, &panelDefs[iPanel], sizeof(BBPANELDEF));
1287+
if (u32Speed) pState->panelDef.bus_speed = u32Speed; // custom speed
12891288
pState->iFlags = pState->panelDef.flags; // copy flags to main class structure
12901289
// get the 3 callback functions
12911290
pState->pfnEinkPower = panelProcs[iPanel].pfnEinkPower;
@@ -1447,9 +1446,8 @@ void bbepClear(FASTEPDSTATE *pState, uint8_t val, uint8_t count, BBEPRECT *pRect
14471446
} else { // mask the area we want to change
14481447
memcpy(pState->dma_buf, u8Cache, pState->native_width / 4);
14491448
}
1450-
bbepWriteRow(pState, pState->dma_buf, pState->native_width / 4);
1451-
// delayMicroseconds(15);
1452-
bbepRowControl(pState, ROW_STEP);
1449+
bbepWriteRow(pState, pState->dma_buf, pState->native_width / 4, (i!=0));
1450+
//bbepRowControl(pState, ROW_STEP);
14531451
}
14541452
delayMicroseconds(230);
14551453
}
@@ -1502,8 +1500,8 @@ int bbepSmoothUpdate(FASTEPDSTATE *pState, bool bKeepOn, uint8_t u8Color)
15021500
for (i = 0; i < pState->native_height; i++) {
15031501
s = &pState->pTemp[i * (pState->native_width / 4)];
15041502
// Send the data for the row
1505-
bbepWriteRow(pState, s, (pState->native_width / 4));
1506-
// delayMicroseconds(15);
1503+
memcpy(pState->dma_buf, s, pState->native_width/4);
1504+
bbepWriteRow(pState, pState->dma_buf, (pState->native_width / 4), 0);
15071505
bbepRowControl(pState, ROW_STEP);
15081506
}
15091507
delayMicroseconds(230);
@@ -1513,31 +1511,33 @@ int bbepSmoothUpdate(FASTEPDSTATE *pState, bool bKeepOn, uint8_t u8Color)
15131511
uint8_t u8Invert = (u8Color = BBEP_WHITE) ? 0x00 : 0xff;
15141512
for (pass = 0; pass < iPasses; pass++) { // number of passes to make 16 unique gray levels
15151513
uint8_t *s, *d = pState->dma_buf;
1514+
uint32_t *pGrayU, *pGrayL;
1515+
pGrayU = pGrayUpper + (pass * 256);
1516+
pGrayL = pGrayLower + (pass * 256);
15161517
bbepRowControl(pState, ROW_START);
15171518
for (i = 0; i < pState->native_height; i++) {
15181519
dy = (pState->iFlags & BB_PANEL_FLAG_MIRROR_Y) ? pState->native_height - 1 - i : i;
15191520
s = &pState->pCurrent[dy * (pState->native_width / 2)];
15201521
if (pState->iFlags & BB_PANEL_FLAG_MIRROR_X) {
15211522
s += (pState->native_width / 2) - 8;
15221523
for (n = 0; n < (pState->native_width / 4); n += 4) {
1523-
d[n + 0] = u8Invert ^ (pGrayUpper[pass * 256 + (s[7] ^ u8Invert)] | pGrayLower[pass * 256 + (s[6] ^ u8Invert)]);
1524-
d[n + 1] = u8Invert ^ (pGrayUpper[pass * 256 + (s[5] ^ u8Invert)] | pGrayLower[pass * 256 + (s[4] ^ u8Invert)]);
1525-
d[n + 2] = u8Invert ^ (pGrayUpper[pass * 256 + (s[3] ^ u8Invert)] | pGrayLower[pass * 256 + (s[2] ^ u8Invert)]);
1526-
d[n + 3] = u8Invert ^ (pGrayUpper[pass * 256 + (s[1] ^ u8Invert)] | pGrayLower[pass * 256 + (s[0] ^ u8Invert)]);
1524+
d[n + 0] = u8Invert ^ (pGrayU[(s[7] ^ u8Invert)] | pGrayL[(s[6] ^ u8Invert)]);
1525+
d[n + 1] = u8Invert ^ (pGrayU[(s[5] ^ u8Invert)] | pGrayL[(s[4] ^ u8Invert)]);
1526+
d[n + 2] = u8Invert ^ (pGrayU[(s[3] ^ u8Invert)] | pGrayL[(s[2] ^ u8Invert)]);
1527+
d[n + 3] = u8Invert ^ (pGrayU[(s[1] ^ u8Invert)] | pGrayL[(s[0] ^ u8Invert)]);
15271528
s -= 8;
15281529
} // for n
15291530
} else {
15301531
for (n = 0; n < (pState->native_width / 4); n += 4) {
1531-
d[n + 0] = u8Invert ^ (pGrayUpper[pass * 256 + (s[0] ^ u8Invert)] | pGrayLower[pass * 256 + (s[1] ^ u8Invert)]);
1532-
d[n + 1] = u8Invert ^ (pGrayUpper[pass * 256 + (s[2] ^ u8Invert)] | pGrayLower[pass * 256 + (s[3] ^ u8Invert)]);
1533-
d[n + 2] = u8Invert ^ (pGrayUpper[pass * 256 + (s[4] ^ u8Invert)] | pGrayLower[pass * 256 + (s[5] ^ u8Invert)]);
1534-
d[n + 3] = u8Invert ^ (pGrayUpper[pass * 256 + (s[6] ^ u8Invert)] | pGrayLower[pass * 256 + (s[7] ^ u8Invert)]);
1532+
d[n + 0] = u8Invert ^ (pGrayU[(s[0] ^ u8Invert)] | pGrayL[(s[1] ^ u8Invert)]);
1533+
d[n + 1] = u8Invert ^ (pGrayU[(s[2] ^ u8Invert)] | pGrayL[(s[3] ^ u8Invert)]);
1534+
d[n + 2] = u8Invert ^ (pGrayU[(s[4] ^ u8Invert)] | pGrayL[(s[5] ^ u8Invert)]);
1535+
d[n + 3] = u8Invert ^ (pGrayU[(s[6] ^ u8Invert)] | pGrayL[(s[7] ^ u8Invert)]);
15351536
s += 8;
15361537
} // for n
15371538
// vTaskDelay(0);
15381539
}
1539-
bbepWriteRow(pState, pState->dma_buf, (pState->native_width / 4));
1540-
// delayMicroseconds(15);
1540+
bbepWriteRow(pState, pState->dma_buf, (pState->native_width / 4), 0);
15411541
bbepRowControl(pState, ROW_STEP);
15421542
} // for i
15431543
delayMicroseconds(230);
@@ -1553,25 +1553,43 @@ int bbepSmoothUpdate(FASTEPDSTATE *pState, bool bKeepOn, uint8_t u8Color)
15531553
// The time to perform the update can vary greatly depending on the pixel mode
15541554
// and selected options
15551555
//
1556-
int bbepFullUpdate(FASTEPDSTATE *pState, bool bFast, bool bKeepOn, BBEPRECT *pRect)
1556+
int bbepFullUpdate(FASTEPDSTATE *pState, int iClearMode, bool bKeepOn, BBEPRECT *pRect)
15571557
{
1558-
int i, n, pass, passes;
1558+
int i, n, pass, iDMAOff = 0;
15591559
int iStartCol, iStartRow, iEndCol, iEndRow;
15601560
uint8_t u8;
15611561

15621562
#ifdef SHOW_TIME
15631563
long l = millis();
15641564
#endif
15651565
if (bbepEinkPower(pState, 1) != BBEP_SUCCESS) return BBEP_IO_ERROR;
1566-
// Fast mode ~= 600ms, normal mode ~=1000ms
1567-
passes = (bFast) ? 5:10;
1568-
if (!bFast) { // skip initial black phase for fast mode
1569-
bbepClear(pState, BB_CLEAR_DARKEN, passes, pRect);
1570-
bbepClear(pState, BB_CLEAR_NEUTRAL, 1, pRect);
1566+
switch (iClearMode) {
1567+
case CLEAR_SLOW:
1568+
bbepClear(pState, BB_CLEAR_DARKEN, 10, pRect);
1569+
bbepClear(pState, BB_CLEAR_LIGHTEN, 10, pRect);
1570+
bbepClear(pState, BB_CLEAR_DARKEN, 10, pRect);
1571+
bbepClear(pState, BB_CLEAR_LIGHTEN, 10, pRect);
1572+
break;
1573+
case CLEAR_FAST:
1574+
bbepClear(pState, BB_CLEAR_DARKEN, 8, pRect);
1575+
bbepClear(pState, BB_CLEAR_LIGHTEN, 8, pRect);
1576+
break;
1577+
case CLEAR_WHITE:
1578+
bbepClear(pState, BB_CLEAR_LIGHTEN, 5, pRect);
1579+
break;
1580+
case CLEAR_BLACK: // probably a mistake
1581+
bbepClear(pState, BB_CLEAR_DARKEN, 5, pRect);
1582+
break;
1583+
case CLEAR_NONE: // nothing to do
1584+
default:
1585+
break;
15711586
}
1572-
bbepClear(pState, BB_CLEAR_LIGHTEN, passes, pRect);
1573-
bbepClear(pState, BB_CLEAR_DARKEN, passes, pRect);
1574-
bbepClear(pState, BB_CLEAR_LIGHTEN, passes, pRect);
1587+
1588+
#ifdef SHOW_TIME
1589+
l = millis() - l;
1590+
Serial.printf("clear time = %dms\n", (int)l);
1591+
l = millis();
1592+
#endif // SHOW_TIME
15751593

15761594
if (pRect) {
15771595
if (bbepFixRect(pState, pRect, &iStartCol, &iEndCol, &iStartRow, &iEndRow)) return BBEP_ERROR_BAD_PARAMETER;
@@ -1638,39 +1656,46 @@ int bbepFullUpdate(FASTEPDSTATE *pState, bool bFast, bool bKeepOn, BBEPRECT *pRe
16381656
// Write N passes of the black data to the whole display
16391657
for (pass = 0; pass < pState->iFullPasses; pass++) {
16401658
bbepRowControl(pState, ROW_START);
1659+
iDMAOff = 0;
16411660
for (i = 0; i < pState->native_height; i++) {
1661+
d = &pState->dma_buf[iDMAOff];
16421662
s = &pState->pTemp[i * (pState->native_width / 4)];
16431663
// Send the data for the row
1644-
bbepWriteRow(pState, s, (pState->native_width / 4));
1645-
// delayMicroseconds(15);
1646-
bbepRowControl(pState, ROW_STEP);
1664+
memcpy(d, s, pState->native_width/4);
1665+
bbepWriteRow(pState, d, (pState->native_width / 4), (i!=0));
1666+
iDMAOff ^= (pState->native_width/4);
16471667
}
16481668
delayMicroseconds(230);
16491669
} // for pass
16501670
} else { // must be 4BPP mode
16511671
int dy, iPasses = (pState->panelDef.iMatrixSize / 16); // number of passes
16521672
for (pass = 0; pass < iPasses; pass++) { // number of passes to make 16 unique gray levels
1653-
uint8_t *s, *d = pState->dma_buf;
1673+
uint8_t *s, *d;
1674+
uint32_t *pGrayU, *pGrayL;
1675+
pGrayU = pGrayUpper + (pass * 256);
1676+
pGrayL = pGrayLower + (pass * 256);
16541677
bbepRowControl(pState, ROW_START);
1678+
iDMAOff = 0;
16551679
for (i = 0; i < pState->native_height; i++) {
1680+
d = &pState->dma_buf[iDMAOff];
16561681
dy = (pState->iFlags & BB_PANEL_FLAG_MIRROR_Y) ? pState->native_height - 1 - i : i;
16571682
if (dy >= iStartRow && dy <= iEndRow) { // within the clip rectangle
16581683
s = &pState->pCurrent[dy * (pState->native_width / 2)];
16591684
if (pState->iFlags & BB_PANEL_FLAG_MIRROR_X) {
16601685
s += (pState->native_width / 2) - 8;
16611686
for (n = 0; n < (pState->native_width / 4); n += 4) {
1662-
d[n + 0] = (pGrayUpper[pass * 256 + s[7]] | pGrayLower[pass * 256 + s[6]]);
1663-
d[n + 1] = (pGrayUpper[pass * 256 + s[5]] | pGrayLower[pass * 256 + s[4]]);
1664-
d[n + 2] = (pGrayUpper[pass * 256 + s[3]] | pGrayLower[pass * 256 + s[2]]);
1665-
d[n + 3] = (pGrayUpper[pass * 256 + s[1]] | pGrayLower[pass * 256 + s[0]]);
1687+
d[n + 0] = (pGrayU[s[7]] | pGrayL[s[6]]);
1688+
d[n + 1] = (pGrayU[s[5]] | pGrayL[s[4]]);
1689+
d[n + 2] = (pGrayU[s[3]] | pGrayL[s[2]]);
1690+
d[n + 3] = (pGrayU[s[1]] | pGrayL[s[0]]);
16661691
s -= 8;
16671692
} // for n
16681693
} else {
16691694
for (n = 0; n < (pState->native_width / 4); n += 4) {
1670-
d[n + 0] = (pGrayUpper[pass * 256 + s[0]] | pGrayLower[pass * 256 + s[1]]);
1671-
d[n + 1] = (pGrayUpper[pass * 256 + s[2]] | pGrayLower[pass * 256 + s[3]]);
1672-
d[n + 2] = (pGrayUpper[pass * 256 + s[4]] | pGrayLower[pass * 256 + s[5]]);
1673-
d[n + 3] = (pGrayUpper[pass * 256 + s[6]] | pGrayLower[pass * 256 + s[7]]);
1695+
d[n + 0] = (pGrayU[s[0]] | pGrayL[s[1]]);
1696+
d[n + 1] = (pGrayU[s[2]] | pGrayL[s[3]]);
1697+
d[n + 2] = (pGrayU[s[4]] | pGrayL[s[5]]);
1698+
d[n + 3] = (pGrayU[s[6]] | pGrayL[s[7]]);
16741699
s += 8;
16751700
} // for n
16761701
// vTaskDelay(0);
@@ -1684,11 +1709,11 @@ int bbepFullUpdate(FASTEPDSTATE *pState, bool bFast, bool bKeepOn, BBEPRECT *pRe
16841709
}
16851710
}
16861711
} else { // outside the clip rectangle
1687-
memset(pState->dma_buf, 0, pState->native_width/4);
1712+
memset(d, 0, pState->native_width/4);
16881713
}
1689-
bbepWriteRow(pState, pState->dma_buf, (pState->native_width / 4));
1690-
// delayMicroseconds(15);
1691-
bbepRowControl(pState, ROW_STEP);
1714+
bbepWriteRow(pState, d, (pState->native_width / 4), (i!=0));
1715+
iDMAOff ^= (pState->native_width / 4); // toggle offset
1716+
//bbepRowControl(pState, ROW_STEP);
16921717
} // for i
16931718
delayMicroseconds(230);
16941719
} // for pass
@@ -1710,7 +1735,7 @@ int bbepFullUpdate(FASTEPDSTATE *pState, bool bFast, bool bKeepOn, BBEPRECT *pRe
17101735

17111736
int bbepPartialUpdate(FASTEPDSTATE *pState, bool bKeepOn, int iStartLine, int iEndLine)
17121737
{
1713-
int i, n, pass;
1738+
int i, n, pass, iDMAOff;
17141739
#ifdef SHOW_TIME
17151740
long l = millis();
17161741
#endif
@@ -1770,34 +1795,38 @@ int bbepPartialUpdate(FASTEPDSTATE *pState, bool bKeepOn, int iStartLine, int iE
17701795
iEndLine = i;
17711796
}
17721797
for (pass = 0; pass < pState->iPartialPasses; pass++) { // each pass is about 32ms
1773-
uint8_t *dp = pState->pTemp;
1798+
uint8_t *d, *dp = pState->pTemp;
17741799
int iDelta = pState->native_width / 4; // 2 bits per pixel
17751800
int iSkipped = 0;
17761801
if (pState->iFlags & BB_PANEL_FLAG_MIRROR_Y) {
17771802
dp = &pState->pTemp[(pState->native_height-1) * iDelta]; // read the memory upside down
17781803
iDelta = -iDelta;
17791804
}
17801805
bbepRowControl(pState, ROW_START);
1806+
iDMAOff = 0;
17811807
for (i = 0; i < pState->native_height; i++) {
1808+
d = &pState->dma_buf[iDMAOff];
17821809
if (i >= iStartLine && i <= iEndLine) {
17831810
// Send the data
1784-
bbepWriteRow(pState, dp, (pState->native_width / 4));
1811+
memcpy(d, dp, pState->native_width/4);
1812+
bbepWriteRow(pState, d, (pState->native_width / 4), (i!=0));
17851813
iSkipped = 0;
17861814
} else {
17871815
if (iSkipped >= 2) {
17881816
gpio_set_level((gpio_num_t)pState->panelDef.ioCKV, 1); // CKV_SET;
17891817
delayMicroseconds(35);
1818+
bbepRowControl(pState, ROW_STEP);
17901819
} else {
17911820
// write 2 floating rows
17921821
if (iSkipped == 0) { // skip
1793-
memset((void *)pState->dma_buf, 0, pState->native_width/4);
1822+
memset((void *)d, 0, pState->native_width/4);
17941823
}
1795-
bbepWriteRow(pState, pState->dma_buf, (pState->native_width / 4));
1824+
bbepWriteRow(pState, d, (pState->native_width / 4), (i!=0));
17961825
}
17971826
iSkipped++;
17981827
}
1799-
bbepRowControl(pState, ROW_STEP);
18001828
dp += iDelta;
1829+
iDMAOff ^= (pState->native_width/4);
18011830
}
18021831
// delayMicroseconds(230);
18031832
} // for each pass

0 commit comments

Comments
 (0)