Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
fwatch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
fwatch
Commits
75f2a8f8
Commit
75f2a8f8
authored
Oct 07, 2014
by
Projects
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lcd: Disable DMA transfers depending on the power saving mode.
parent
5cdb1169
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
lcd.c
sw/common/drivers/lcd.c
+1
-1
lcd.h
sw/common/drivers/lcd.h
+4
-3
lcd_dma.c
sw/common/drivers/lcd_dma.c
+1
-1
No files found.
sw/common/drivers/lcd.c
View file @
75f2a8f8
...
@@ -218,7 +218,7 @@ void lcd_clear(void)
...
@@ -218,7 +218,7 @@ void lcd_clear(void)
uint16_t
x
,
y
;
uint16_t
x
,
y
;
#ifdef FREERTOS
#ifdef FREERTOS
if
(
xSemaphoreTake
(
lcd_sem
,
LCD_SEM_TICKS
)
!=
pdTRUE
)
if
(
xSemaphoreTake
(
lcd_sem
,
portMAX_DELAY
)
!=
pdTRUE
)
return
;
return
;
#endif
/* FREERTOS */
#endif
/* FREERTOS */
...
...
sw/common/drivers/lcd.h
View file @
75f2a8f8
...
@@ -33,12 +33,13 @@
...
@@ -33,12 +33,13 @@
#ifdef FREERTOS
#ifdef FREERTOS
#include <FreeRTOS.h>
#include <FreeRTOS.h>
#include <semphr.h>
#include <semphr.h>
///> How long should we wait for the semaphore
#define LCD_SEM_TICKS 100
extern
xSemaphoreHandle
lcd_sem
;
extern
xSemaphoreHandle
lcd_sem
;
#endif
/* FREERTOS */
#endif
/* FREERTOS */
//#define LCD_NODMA
// DMA is broken when EM2 or deeper is enabled
#if configSLEEP_MODE > 1
#define LCD_NODMA
#endif
// Dimensions
// Dimensions
#define LCD_HEIGHT 128
#define LCD_HEIGHT 128
...
...
sw/common/drivers/lcd_dma.c
View file @
75f2a8f8
...
@@ -119,7 +119,7 @@ void lcd_dma_init(void)
...
@@ -119,7 +119,7 @@ void lcd_dma_init(void)
void
lcd_dma_send_frame
(
void
)
void
lcd_dma_send_frame
(
void
)
{
{
#ifdef FREERTOS
#ifdef FREERTOS
if
(
xSemaphoreTake
(
lcd_sem
,
LCD_SEM_TICKS
)
!=
pdTRUE
)
if
(
xSemaphoreTake
(
lcd_sem
,
portMAX_DELAY
)
!=
pdTRUE
)
return
;
return
;
#else
#else
while
(
dma_transfer_active
);
while
(
dma_transfer_active
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment