Skip to content
Snippets Groups Projects
Select Git revision
  • 1a32b8a72d88530133bc31eb19632f0b353408f8
  • master default
  • test
  • rahix/hw-lock-new-mutex
  • dx/somewhat-more-dynamic-config
  • schneider/sdk-0.2.1-7
  • schneider/bsec
  • dx/meh-bdf-to-stm
  • dx/flatten-config-module
  • genofire/ble-follow-py
  • schneider/ble-stability
  • schneider/ble-stability-new-phy
  • add_menu_vibration
  • plaetzchen/ios-workaround
  • blinkisync-as-preload
  • schneider/max30001-pycardium
  • schneider/max30001-epicaridum
  • schneider/max30001
  • schneider/stream-locks
  • schneider/fundamental-test
  • schneider/ble-buffers
  • v1.12
  • v1.11
  • v1.10
  • v1.9
  • v1.8
  • v1.7
  • v1.6
  • v1.5
  • v1.4
  • v1.3
  • v1.2
  • v1.1
  • v1.0
  • release-1
  • bootloader-v1
  • v0.0
37 results

bootloader-display.c

Blame
  • Forked from card10 / firmware
    1400 commits behind, 2 commits ahead of the upstream repository.
    bootloader-display.c 1.01 KiB
    #include "bootloader.h"
    /* Autogenerated */
    #include "splash-screen.h"
    #include "card10-version.h"
    
    #include "gfx.h"
    #include "display.h"
    
    static void bootloader_display_splash(void)
    {
    	gfx_copy_region(&display_screen, 0, 0, 160, 80, GFX_RLE_MONO,
    			     sizeof(splash), (const void *)(splash));
    	gfx_update(&display_screen);
    }
    
    /*
     * Initialize the display.
     */
    void bootloader_display_init(void)
    {
    	bootloader_display_splash();
    }
    
    /*
     * Show the bootloader version on the display.
     */
    void bootloader_display_header(void)
    {
    	gfx_clear(&display_screen);
    
    	Color white = gfx_color(&display_screen, WHITE);
    	bootloader_display_line(0, "Bootloader", white);
    	bootloader_display_line(1, __DATE__, white);
    	bootloader_display_line(2, CARD10_VERSION, white);
    }
    
    /*
     * Display a line of text on the display.
     */
    void bootloader_display_line(int line, char *string, uint16_t color)
    {
    	Color black = gfx_color(&display_screen, BLACK);
    	gfx_puts(&Font16, &display_screen, 0, 16 * line, string, color, black);
    	gfx_update(&display_screen);
    }