mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/disp_dev: add help functions for backlight
This commit is contained in:
parent
bad9d6c93f
commit
1498a7ada2
@ -27,6 +27,16 @@ extern "C" {
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "board.h"
|
||||
|
||||
#ifndef BACKLIGHT_ON
|
||||
#define BACKLIGHT_ON
|
||||
#endif
|
||||
|
||||
#ifndef BACKLIGHT_OFF
|
||||
#define BACKLIGHT_OFF
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Forward declaration for display device struct
|
||||
*/
|
||||
@ -133,11 +143,27 @@ uint8_t disp_dev_color_depth(disp_dev_t *dev);
|
||||
/**
|
||||
* @brief Invert the display device colors
|
||||
*
|
||||
* @param[in] dev Network device descriptor
|
||||
* @param[in] dev Pointer to the display device
|
||||
* @param[in] invert Invert mode (true if invert, false otherwise)
|
||||
*/
|
||||
void disp_dev_set_invert(disp_dev_t *dev, bool invert);
|
||||
|
||||
/**
|
||||
* @brief Enable the backlight pin
|
||||
*/
|
||||
static inline void disp_dev_backlight_on(void)
|
||||
{
|
||||
BACKLIGHT_ON;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Disable the backlight pin
|
||||
*/
|
||||
static inline void disp_dev_backlight_off(void)
|
||||
{
|
||||
BACKLIGHT_OFF;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user