BSP430
20141115
Board Support Package for MSP430 microcontrollers
|
Declarations related to platform-specific u8glib support. More...
Go to the source code of this file.
Macros | |
#define | configBSP430_UTILITY_U8GLIB 0 |
#define | BSP430_UTILITY_U8GLIB include <bsp430/platform.h> |
#define | BSP430_U8GLIB_REFRESH_INTERVAL_MS 0 |
Functions | |
int | iBSP430u8gRefresh (u8g_t *u8g) |
hBSP430halSERIAL | hBSP430u8gSPI (void) |
Variables | |
u8g_dev_t | xBSP430u8gDevice |
Declarations related to platform-specific u8glib support.
Universal Graphics Library for 8 Bit Embedded Systems is portable library with text and graphical support for LCDs commonly used on microcontroller platforms.
u8glib is highly influenced by Arduino, and adding another target platform to the library itself would be messy; however, it's fairly easy to create bridge support in each platform to provide the interface from hardware to the library. This module defines the shared material related to the BSP430-provided interfaces.
The majority of the peripheral resource identifiers and constants are platform-specific; e.g. BSP430_PLATFORM_TRXEB_LCD_SPI_PERIPH_HANDLE. The interface for u8glib does not required that these be abstracted and made available generically.
Access to the platform-specific interface requires adding u8g_bsp430.c
to the set of source files compiled into the program, along with the necessary pieces of u8glib itself including any desired fonts. Also include $(PLATFORM_U8G_PB_C)
which is defined in the platform-specific Makefile.common
to select the correct low-level implementation based on the display orientation and color support.
#define BSP430_U8GLIB_REFRESH_INTERVAL_MS 0 |
Define to an interval, in milliseconds, at which iBSP430u8gRefresh() should be invoked to keep the display stable.
If the value is zero, there is no need to periodically refresh the display.
#define BSP430_UTILITY_U8GLIB include <bsp430/platform.h> |
Indicate that an U8GLIB LCD interface is available on the platform. This is set by the platform-specific header when configBSP430_UTILITY_U8GLIB is true and the platform supports an U8GLIB device.
If this define evaluates to false either the u8glib adaptation was not requested, or there is none provided by the platform.
See U8GLIB LCD Text and Graphics for an example of use.
#define configBSP430_UTILITY_U8GLIB 0 |
Define to request that platform enable its U8GLIB adaptation.
Some platforms have an on-board LCD for which a bridge to u8glib is available. Defining this macro in your <bsp430_config.h> will register a request for that device.
hBSP430halSERIAL hBSP430u8gSPI | ( | void | ) |
Provide access to the SPI device used to communicate with the u8glib device.
int iBSP430u8gRefresh | ( | u8g_t * | u8g | ) |
A function that should be invoked at BSP430_U8GLIB_REFRESH_INTERVAL_MS milliseconds to keep the display functioning.
For example, this is required for the Sharp Memory LCD to toggle VCOM so that DC bias does not build up within the display.
u8g | the u8glib handle for the display |
u8g_dev_t xBSP430u8gDevice |
The platform-provided device for the on-board LCD.