TDISP fixes
This commit is contained in:
parent
4ba223030d
commit
11a71cb080
4 changed files with 341 additions and 325 deletions
|
@ -112,7 +112,7 @@ bool_t tdisp_lld_init(void) {
|
||||||
// write_cmd(0x38);
|
// write_cmd(0x38);
|
||||||
// chThdSleepMilliseconds(64);
|
// chThdSleepMilliseconds(64);
|
||||||
//
|
//
|
||||||
// displaycontrol = DISPLAY_ON | CURSOR_ON | CURSOR_BLINK; // The default displaycontrol
|
// displaycontrol = TDISP_DISPLAY_ON | TDISP_CURSOR_ON | TDISP_CURSOR_BLINK; // The default displaycontrol
|
||||||
// write_cmd(0x08 | displaycontrol);
|
// write_cmd(0x08 | displaycontrol);
|
||||||
// chThdSleepMicroseconds(50);
|
// chThdSleepMicroseconds(50);
|
||||||
//
|
//
|
||||||
|
@ -171,26 +171,26 @@ void tdisp_lld_control(uint16_t what, uint16_t value) {
|
||||||
switch(what) {
|
switch(what) {
|
||||||
case TDISP_CTRL_BACKLIGHT:
|
case TDISP_CTRL_BACKLIGHT:
|
||||||
if ((uint8_t)value)
|
if ((uint8_t)value)
|
||||||
displaycontrol |= DISPLAY_ON;
|
displaycontrol |= TDISP_DISPLAY_ON;
|
||||||
else
|
else
|
||||||
displaycontrol &= ~DISPLAY_ON;
|
displaycontrol &= ~TDISP_DISPLAY_ON;
|
||||||
write_cmd(0x08 | displaycontrol);
|
write_cmd(0x08 | displaycontrol);
|
||||||
break;
|
break;
|
||||||
case TDISP_CTRL_CURSOR:
|
case TDISP_CTRL_CURSOR:
|
||||||
switch((uint8_t)value) {
|
switch((uint8_t)value) {
|
||||||
case cursorOff:
|
case cursorOff:
|
||||||
displaycontrol &= ~CURSOR_ON;
|
displaycontrol &= ~TDISP_CURSOR_ON;
|
||||||
break;
|
break;
|
||||||
case cursorBlock:
|
case cursorBlock:
|
||||||
case cursorUnderline:
|
case cursorUnderline:
|
||||||
case cursorBar:
|
case cursorBar:
|
||||||
displaycontrol = (displaycontrol | CURSOR_ON) & ~CURSOR_BLINK;
|
displaycontrol = (displaycontrol | TDISP_CURSOR_ON) & ~TDISP_CURSOR_BLINK;
|
||||||
break;
|
break;
|
||||||
case cursorBlinkingBlock:
|
case cursorBlinkingBlock:
|
||||||
case cursorBlinkingUnderline:
|
case cursorBlinkingUnderline:
|
||||||
case cursorBlinkingBar:
|
case cursorBlinkingBar:
|
||||||
default:
|
default:
|
||||||
displaycontrol |= (CURSOR_ON | CURSOR_BLINK);
|
displaycontrol |= (TDISP_CURSOR_ON | TDISP_CURSOR_BLINK);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
write_cmd(0x08 | displaycontrol);
|
write_cmd(0x08 | displaycontrol);
|
||||||
|
|
|
@ -4,37 +4,37 @@
|
||||||
*
|
*
|
||||||
* http://chibios-gfx.com/license.html
|
* http://chibios-gfx.com/license.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file include/tdisp/lld/tdisp_lld.h
|
* @file include/tdisp/lld/tdisp_lld.h
|
||||||
* @brief TDISP driver subsystem low level driver header.
|
* @brief TDISP driver subsystem low level driver header.
|
||||||
*
|
*
|
||||||
* @addtogroup TDISP
|
* @addtogroup TDISP
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _TDISP_LLD_H
|
#ifndef _TDISP_LLD_H
|
||||||
#define _TDISP_LLD_H
|
#define _TDISP_LLD_H
|
||||||
|
|
||||||
#if GFX_USE_TDISP || defined(__DOXYGEN__)
|
#if GFX_USE_TDISP || defined(__DOXYGEN__)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool_t tdisp_lld_init(void);
|
bool_t tdisp_lld_init(void);
|
||||||
void tdisp_lld_clear(void);
|
void tdisp_lld_clear(void);
|
||||||
void tdisp_lld_draw_char(char c);
|
void tdisp_lld_draw_char(char c);
|
||||||
void tdisp_lld_set_cursor(coord_t col, coord_t row);
|
void tdisp_lld_set_cursor(coord_t col, coord_t row);
|
||||||
void tdisp_lld_create_char(uint8_t address, uint8_t *charmap);
|
void tdisp_lld_create_char(uint8_t address, uint8_t *charmap);
|
||||||
void tdisp_lld_control(uint16_t what, void *value);
|
void tdisp_lld_control(uint16_t what, void *value);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* GFX_USE_TDISP */
|
#endif /* GFX_USE_TDISP */
|
||||||
|
|
||||||
#endif /* _TDISP_LLD_H */
|
#endif /* _TDISP_LLD_H */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
|
@ -4,190 +4,201 @@
|
||||||
*
|
*
|
||||||
* http://chibios-gfx.com/license.html
|
* http://chibios-gfx.com/license.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file include/tdisp/tdisp.h
|
* @file include/tdisp/tdisp.h
|
||||||
* @brief TDISP Graphic Driver subsystem header file.
|
* @brief TDISP Graphic Driver subsystem header file.
|
||||||
*
|
*
|
||||||
* @addtogroup TDISP
|
* @addtogroup TDISP
|
||||||
*
|
*
|
||||||
* @details The TDISP module provides high level abstraction to interface pixel oriented graphic displays.
|
* @details The TDISP module provides high level abstraction to interface pixel oriented graphic displays.
|
||||||
* Due the TDISP module is completely encapsulated from the other modules, it's very fast and lightweight.
|
* Due the TDISP module is completely encapsulated from the other modules, it's very fast and lightweight.
|
||||||
*
|
*
|
||||||
* @pre GFX_USE_TDISP must be set to TRUE in gfxconf.h
|
* @pre GFX_USE_TDISP must be set to TRUE in gfxconf.h
|
||||||
*
|
*
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _TDISP_H
|
#ifndef _TDISP_H
|
||||||
#define _TDISP_H
|
#define _TDISP_H
|
||||||
|
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
|
|
||||||
#if GFX_USE_TDISP || defined(__DOXYGEN__)
|
#if GFX_USE_TDISP || defined(__DOXYGEN__)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief TDISP cursor shape definitions
|
* @brief TDISP cursor shape definitions
|
||||||
*/
|
*/
|
||||||
typedef enum cursorshape_e {
|
typedef enum cursorshape_e {
|
||||||
cursorOff,
|
cursorOff,
|
||||||
cursorBlock,
|
cursorBlock,
|
||||||
cursorBlinkingBlock,
|
cursorBlinkingBlock,
|
||||||
cursorUnderline,
|
cursorUnderline,
|
||||||
cursorBlinkingUnderline,
|
cursorBlinkingUnderline,
|
||||||
cursorBar,
|
cursorBar,
|
||||||
cursorBlinkingBar,
|
cursorBlinkingBar,
|
||||||
} cursorshape;
|
} cursorshape;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name TDISP control values
|
* @name TDISP control values
|
||||||
* @note The low level driver may define extra control values
|
* @note The low level driver may define extra control values
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#define TDISP_CTRL_BACKLIGHT 0x0000
|
#define TDISP_CTRL_BACKLIGHT 0x0000
|
||||||
#define TDISP_CTRL_CURSOR 0x0001
|
#define TDISP_CTRL_CURSOR 0x0001
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The TDISP structure definition
|
* @brief The TDISP structure definition
|
||||||
*/
|
*/
|
||||||
typedef struct tdispStruct_t {
|
typedef struct tdispStruct_t {
|
||||||
coord_t columns, rows;
|
coord_t columns, rows;
|
||||||
coord_t charBitsX, charBitsY;
|
coord_t charBitsX, charBitsY;
|
||||||
uint16_t maxCustomChars;
|
uint16_t maxCustomChars;
|
||||||
} tdispStruct;
|
} tdispStruct;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The TDISP structure
|
* @brief The TDISP structure
|
||||||
*/
|
*/
|
||||||
extern tdispStruct TDISP;
|
extern tdispStruct TDISP;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief TDISP driver initialisation
|
* @brief TDISP driver initialisation
|
||||||
* @note This function is not implicitly invoked by @p halInit().
|
* @note This function is not implicitly invoked by @p halInit().
|
||||||
* It must be called manually.
|
* It must be called manually.
|
||||||
*
|
*
|
||||||
* @return TRUE if success, FALSE otherwise
|
* @return TRUE if success, FALSE otherwise
|
||||||
*
|
*
|
||||||
* @init
|
* @init
|
||||||
*/
|
*/
|
||||||
bool_t tdispInit(void);
|
bool_t tdispInit(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Clears the display
|
* @brief Clears the display
|
||||||
*/
|
*/
|
||||||
void tdispClear(void);
|
void tdispClear(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets the cursor to it's home position ( 0, 0 )
|
* @brief Sets the cursor to it's home position ( 0, 0 )
|
||||||
*/
|
*/
|
||||||
void tdispHome(void);
|
void tdispHome(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set cursor to a specified position
|
* @brief Set cursor to a specified position
|
||||||
*
|
*
|
||||||
* @param[in] col The column (x)
|
* @param[in] col The column (x)
|
||||||
* @param[in] row The row (y)
|
* @param[in] row The row (y)
|
||||||
*/
|
*/
|
||||||
void tdispSetCursor(coord_t col, coord_t row);
|
void tdispSetCursor(coord_t col, coord_t row);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Store a custom character into the display
|
* @brief Store a custom character into the display
|
||||||
*
|
*
|
||||||
* @note This usually must be done after each power-up since most
|
* @note This usually must be done after each power-up since most
|
||||||
* LCDs lose their RAM content.
|
* LCDs lose their RAM content.
|
||||||
*
|
*
|
||||||
* @param[in] address On which address to store the character from 0 up to (@p tdispGetNumCustomChars() - 1)
|
* @param[in] address On which address to store the character from 0 up to (@p tdispGetNumCustomChars() - 1)
|
||||||
* @param[in] charmap The character to be stored.
|
* @param[in] charmap The character to be stored.
|
||||||
*
|
*
|
||||||
* @note The charmap is made up of @p tdispGetCharBitHieght() data values. Each data value is
|
* @note The charmap is made up of @p tdispGetCharBitHieght() data values. Each data value is
|
||||||
* made up of @p tdispGetCharBitWidth() bits of data. Note that bits in multiple rows are not
|
* made up of @p tdispGetCharBitWidth() bits of data. Note that bits in multiple rows are not
|
||||||
* packed.
|
* packed.
|
||||||
*/
|
*/
|
||||||
void tdispCreateChar(uint8_t address, uint8_t *charmap);
|
void tdispCreateChar(uint8_t address, uint8_t *charmap);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Draws a single character at the current cursor position and advances the cursor
|
* @brief Draws a single character at the current cursor position and advances the cursor
|
||||||
*
|
*
|
||||||
* @param[in] c The character to be drawn
|
* @param[in] c The character to be drawn
|
||||||
*
|
*
|
||||||
* @note Writing past the end of a row leaves the cursor in an undefined position.
|
* @note Writing past the end of a row leaves the cursor in an undefined position.
|
||||||
*/
|
*/
|
||||||
void tdispDrawChar(char c);
|
void tdispDrawChar(char c);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Draws a string at the current cursor position and advances the cursor
|
* @brief Draws a string at the current cursor position and advances the cursor
|
||||||
*
|
*
|
||||||
* @param[in] s The string to be drawn
|
* @param[in] s The string to be drawn
|
||||||
*
|
*
|
||||||
* @note Any characters written past the end of a row may or may not be displayed on
|
* @note Any characters written past the end of a row may or may not be displayed on
|
||||||
* the next row. The cursor is also left in an undefined position.
|
* the next row. The cursor is also left in an undefined position.
|
||||||
*/
|
*/
|
||||||
void tdispDrawString(char *s);
|
void tdispDrawString(char *s);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Control different display properties
|
* @brief Draws a string at a specific position
|
||||||
* @note A wrapper macro exists for each option, please use them
|
*
|
||||||
* instead of this function manually unless calling a low
|
* @param[in] col The column (x)
|
||||||
* level driver specific value.
|
* @param[in] row The row (y)
|
||||||
*
|
* @param[in] s The string to be drawin
|
||||||
* @param[in] what What you want to control
|
*
|
||||||
* @param[in] value The value to be assigned
|
* @note The cursor position after this call is not the same as before.
|
||||||
*/
|
*/
|
||||||
void tdispControl(uint16_t what, void *value);
|
void tdispDrawStringLocation(coord_t col, coord_t row, char *s);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the backlight level
|
* @brief Control different display properties
|
||||||
*
|
* @note A wrapper macro exists for each option, please use them
|
||||||
* @param[in] percent A percentage from 0 to 100%. 0% will turn off the display
|
* instead of this function manually unless calling a low
|
||||||
*/
|
* level driver specific value.
|
||||||
#define tdispSetBacklight(percent) tdispControl(TDISP_CTRL_BACKLIGHT, (void *)((uint8_t)(percent)))
|
*
|
||||||
|
* @param[in] what What you want to control
|
||||||
/**
|
* @param[in] value The value to be assigned
|
||||||
* @brief Set the cursor shape
|
*/
|
||||||
*
|
void tdispControl(uint16_t what, void *value);
|
||||||
* @param[in] shape The shape to set the cursor.
|
|
||||||
*
|
/**
|
||||||
* @note Not all shapes are necessarily supported. The driver will make a similar
|
* @brief Set the backlight level
|
||||||
* choice if the one specified is not available.
|
*
|
||||||
*/
|
* @param[in] percent A percentage from 0 to 100%. 0% will turn off the display
|
||||||
#define tdispSetCursorShape(shape) tdispControl(TDISP_CTRL_CURSOR, (void *)((cursorshape)(shape)))
|
*/
|
||||||
|
#define tdispSetBacklight(percent) tdispControl(TDISP_CTRL_BACKLIGHT, (void *)((uint8_t)(percent)))
|
||||||
/**
|
|
||||||
* @brief Get the number of columns (width) in the display
|
/**
|
||||||
*/
|
* @brief Set the cursor shape
|
||||||
#define tdispGetColumns() (TDISP.columns)
|
*
|
||||||
|
* @param[in] shape The shape to set the cursor.
|
||||||
/**
|
*
|
||||||
* @brief Get the number of rows (height) in the display
|
* @note Not all shapes are necessarily supported. The driver will make a similar
|
||||||
*/
|
* choice if the one specified is not available.
|
||||||
#define tdispGetRows() (TDISP.columns)
|
*/
|
||||||
|
#define tdispSetCursorShape(shape) tdispControl(TDISP_CTRL_CURSOR, (void *)((cursorshape)(shape)))
|
||||||
/**
|
|
||||||
* @brief Get the number of bits in width of a character
|
/**
|
||||||
*/
|
* @brief Get the number of columns (width) in the display
|
||||||
#define tdispGetCharBitWidth() (TDISP.charBitsX)
|
*/
|
||||||
|
#define tdispGetColumns() (TDISP.columns)
|
||||||
/**
|
|
||||||
* @brief Get the number of bits in height of a character
|
/**
|
||||||
*/
|
* @brief Get the number of rows (height) in the display
|
||||||
#define tdispGetCharBitHeight() (TDISP.charBitsY)
|
*/
|
||||||
|
#define tdispGetRows() (TDISP.columns)
|
||||||
/**
|
|
||||||
* @brief Get the number of custom characters
|
/**
|
||||||
*/
|
* @brief Get the number of bits in width of a character
|
||||||
#define tdispGetNumCustomChars() (TDISP.maxCustomChars)
|
*/
|
||||||
|
#define tdispGetCharBitWidth() (TDISP.charBitsX)
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
/**
|
||||||
#endif
|
* @brief Get the number of bits in height of a character
|
||||||
|
*/
|
||||||
#endif /* GFX_USE_TDISP */
|
#define tdispGetCharBitHeight() (TDISP.charBitsY)
|
||||||
|
|
||||||
#endif /* _TDISP_H */
|
/**
|
||||||
/** @} */
|
* @brief Get the number of custom characters
|
||||||
|
*/
|
||||||
|
#define tdispGetNumCustomChars() (TDISP.maxCustomChars)
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* GFX_USE_TDISP */
|
||||||
|
|
||||||
|
#endif /* _TDISP_H */
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
|
|
@ -4,101 +4,106 @@
|
||||||
*
|
*
|
||||||
* http://chibios-gfx.com/license.html
|
* http://chibios-gfx.com/license.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file src/tdisp/tdisp.c
|
* @file src/tdisp/tdisp.c
|
||||||
* @brief TDISP Driver code.
|
* @brief TDISP Driver code.
|
||||||
*
|
*
|
||||||
* @addtogroup TDISP
|
* @addtogroup TDISP
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#include "ch.h"
|
#include "ch.h"
|
||||||
#include "hal.h"
|
#include "hal.h"
|
||||||
#include "gfx.h"
|
#include "gfx.h"
|
||||||
|
|
||||||
#if GFX_USE_TDISP || defined(__DOXYGEN__)
|
#if GFX_USE_TDISP || defined(__DOXYGEN__)
|
||||||
|
|
||||||
#include "tdisp/lld/tdisp_lld.h"
|
#include "tdisp/lld/tdisp_lld.h"
|
||||||
|
|
||||||
#if TDISP_NEED_MULTITHREAD
|
#if TDISP_NEED_MULTITHREAD
|
||||||
#if !CH_USE_MUTEXES
|
#if !CH_USE_MUTEXES
|
||||||
#error "TDISP: CH_USE_MUTEXES must be defined in chconf.h because TDISP_NEED_MULTITHREAD is defined"
|
#error "TDISP: CH_USE_MUTEXES must be defined in chconf.h because TDISP_NEED_MULTITHREAD is defined"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static Mutex tdispMutex;
|
static Mutex tdispMutex;
|
||||||
|
|
||||||
#define MUTEX_INIT() chMtxInit(&tdispMutex)
|
#define MUTEX_INIT() chMtxInit(&tdispMutex)
|
||||||
#define MUTEX_ENTER() chMtxLock(&tdispMutex)
|
#define MUTEX_ENTER() chMtxLock(&tdispMutex)
|
||||||
#define MUTEX_LEAVE() chMtxUnlock()
|
#define MUTEX_LEAVE() chMtxUnlock()
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define MUTEX_INIT()
|
#define MUTEX_INIT()
|
||||||
#define MUTEX_ENTER()
|
#define MUTEX_ENTER()
|
||||||
#define MUTEX_LEAVE()
|
#define MUTEX_LEAVE()
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool_t tdispInit(void) {
|
bool_t tdispInit(void) {
|
||||||
bool_t res;
|
bool_t res;
|
||||||
|
|
||||||
MUTEX_INIT();
|
MUTEX_INIT();
|
||||||
|
|
||||||
MUTEX_ENTER();
|
MUTEX_ENTER();
|
||||||
res = tdisp_lld_init();
|
res = tdisp_lld_init();
|
||||||
MUTEX_LEAVE();
|
MUTEX_LEAVE();
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tdispClear(void) {
|
void tdispClear(void) {
|
||||||
MUTEX_ENTER();
|
MUTEX_ENTER();
|
||||||
tdisp_lld_clear();
|
tdisp_lld_clear();
|
||||||
MUTEX_LEAVE();
|
MUTEX_LEAVE();
|
||||||
}
|
}
|
||||||
|
|
||||||
void tdispHome(void) {
|
void tdispHome(void) {
|
||||||
MUTEX_ENTER();
|
MUTEX_ENTER();
|
||||||
tdisp_lld_set_cursor(0, 0);
|
tdisp_lld_set_cursor(0, 0);
|
||||||
MUTEX_LEAVE();
|
MUTEX_LEAVE();
|
||||||
}
|
}
|
||||||
|
|
||||||
void tdispSetCursor(coord_t col, coord_t row) {
|
void tdispSetCursor(coord_t col, coord_t row) {
|
||||||
/* Keep the input range valid */
|
/* Keep the input range valid */
|
||||||
if (row >= TDISP.rows)
|
if (row >= TDISP.rows)
|
||||||
row = TDISP.rows - 1;
|
row = TDISP.rows - 1;
|
||||||
MUTEX_ENTER();
|
MUTEX_ENTER();
|
||||||
tdisp_lld_set_cursor(col, row);
|
tdisp_lld_set_cursor(col, row);
|
||||||
MUTEX_LEAVE();
|
MUTEX_LEAVE();
|
||||||
}
|
}
|
||||||
|
|
||||||
void tdispCreateChar(uint8_t address, uint8_t *charmap) {
|
void tdispCreateChar(uint8_t address, uint8_t *charmap) {
|
||||||
/* make sure we don't write somewhere we're not supposed to */
|
/* make sure we don't write somewhere we're not supposed to */
|
||||||
if (address < TDISP.maxCustomChars) {
|
if (address < TDISP.maxCustomChars) {
|
||||||
MUTEX_ENTER();
|
MUTEX_ENTER();
|
||||||
tdisp_lld_create_char(address, charmap);
|
tdisp_lld_create_char(address, charmap);
|
||||||
MUTEX_LEAVE();
|
MUTEX_LEAVE();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void tdispDrawChar(char c) {
|
void tdispDrawChar(char c) {
|
||||||
MUTEX_ENTER();
|
MUTEX_ENTER();
|
||||||
tdisp_lld_draw_char(c);
|
tdisp_lld_draw_char(c);
|
||||||
MUTEX_LEAVE();
|
MUTEX_LEAVE();
|
||||||
}
|
}
|
||||||
|
|
||||||
void tdispDrawString(char *s) {
|
void tdispDrawString(char *s) {
|
||||||
MUTEX_ENTER();
|
MUTEX_ENTER();
|
||||||
while(*s)
|
while(*s)
|
||||||
tdisp_lld_draw_char(*s++);
|
tdisp_lld_draw_char(*s++);
|
||||||
MUTEX_LEAVE();
|
MUTEX_LEAVE();
|
||||||
}
|
}
|
||||||
|
|
||||||
void tdispControl(uint16_t what, void *value) {
|
void tdispDrawStringLocation(coord_t col, coord_t row, char *s) {
|
||||||
MUTEX_ENTER();
|
tdispSetCursor(col, row);
|
||||||
tdisp_lld_control(what, value);
|
tdispSDrawString(s);
|
||||||
MUTEX_LEAVE();
|
}
|
||||||
}
|
|
||||||
|
void tdispControl(uint16_t what, void *value) {
|
||||||
#endif /* GFX_USE_TDISP */
|
MUTEX_ENTER();
|
||||||
/** @} */
|
tdisp_lld_control(what, value);
|
||||||
|
MUTEX_LEAVE();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* GFX_USE_TDISP */
|
||||||
|
/** @} */
|
||||||
|
|
Loading…
Add table
Reference in a new issue