summaryrefslogtreecommitdiff
path: root/firmware/lib
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-02-06 17:10:55 -0800
committerChromeBot <chrome-bot@google.com>2013-02-11 15:34:45 -0800
commitfe510c06204c763e61aa36d2263c3b8b79c79879 (patch)
treee5cd5fbae9a39ef956beba8fdc5f062ea46b139e /firmware/lib
parent7f43669630cb42e40ca6ddc1128eefea8fd339d9 (diff)
downloadvboot-fe510c06204c763e61aa36d2263c3b8b79c79879.tar.gz
Add more display tests
BUG=chromium-os:38139 BRANCH=none TEST=make runtests && FEATURES=test emerge-daisy vboot_reference Change-Id: I28cd31f995f078d1715acaeaccce6e864930a986 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42846 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'firmware/lib')
-rw-r--r--firmware/lib/include/vboot_display.h16
-rw-r--r--firmware/lib/vboot_display.c15
2 files changed, 22 insertions, 9 deletions
diff --git a/firmware/lib/include/vboot_display.h b/firmware/lib/include/vboot_display.h
index d65d67c3..52730b9e 100644
--- a/firmware/lib/include/vboot_display.h
+++ b/firmware/lib/include/vboot_display.h
@@ -8,6 +8,7 @@
#ifndef VBOOT_REFERENCE_VBOOT_DISPLAY_H_
#define VBOOT_REFERENCE_VBOOT_DISPLAY_H_
+#include "bmpblk_font.h"
#include "vboot_api.h"
#include "vboot_nvstorage.h"
@@ -21,6 +22,21 @@ VbError_t VbCheckDisplayKey(VbCommonParams *cparams, uint32_t key,
/* Internal functions, for unit testing */
+typedef FontArrayHeader VbFont_t;
+
+VbFont_t *VbInternalizeFontData(FontArrayHeader *fonthdr);
+
+void VbDoneWithFontForNow(VbFont_t *ptr);
+
+ImageInfo *VbFindFontGlyph(VbFont_t *font, uint32_t ascii,
+ void **bufferptr, uint32_t *buffersize);
+
+/**
+ * Try to display the specified text at a particular position.
+ */
+void VbRenderTextAtPos(char *text, int right_to_left,
+ uint32_t x, uint32_t y, VbFont_t *font);
+
/**
* Return a description of the recovery reason code.
*/
diff --git a/firmware/lib/vboot_display.c b/firmware/lib/vboot_display.c
index bd86d654..7c916d01 100644
--- a/firmware/lib/vboot_display.c
+++ b/firmware/lib/vboot_display.c
@@ -68,19 +68,19 @@ char *VbHWID(VbCommonParams *cparams)
*/
typedef FontArrayHeader VbFont_t;
-static VbFont_t *VbInternalizeFontData(FontArrayHeader *fonthdr)
+VbFont_t *VbInternalizeFontData(FontArrayHeader *fonthdr)
{
/* Just return the raw data pointer for now. */
return (VbFont_t *)fonthdr;
}
-static void VbDoneWithFontForNow(VbFont_t *ptr)
+void VbDoneWithFontForNow(VbFont_t *ptr)
{
/* Nothing. */
}
-static ImageInfo *VbFindFontGlyph(VbFont_t *font, uint32_t ascii,
- void **bufferptr, uint32_t *buffersize)
+ImageInfo *VbFindFontGlyph(VbFont_t *font, uint32_t ascii,
+ void **bufferptr, uint32_t *buffersize)
{
uint8_t *ptr, *firstptr;
uint32_t max;
@@ -120,11 +120,8 @@ static ImageInfo *VbFindFontGlyph(VbFont_t *font, uint32_t ascii,
return &(entry->info);
}
-/**
- * Try to display the specified text at a particular position.
- */
-static void VbRenderTextAtPos(char *text, int right_to_left,
- uint32_t x, uint32_t y, VbFont_t *font)
+void VbRenderTextAtPos(char *text, int right_to_left,
+ uint32_t x, uint32_t y, VbFont_t *font)
{
int i;
ImageInfo *image_info = 0;