H753_CPP_SPI_BT817_EVE_02 1.0
STM32H753 draws its own touch screens on a Bridgetek BT817 (ME817EV + DP-0701-01A) over SPI with the STM32_Bridgetek_EVE_API library: a two-page widget tour
Loading...
Searching...
No Matches
widgetTour.h File Reference

BT817 "widget tour": page 1 has a button, a toggle with an LED and a slider that drives a gauge and a progress bar; page 2 has a keypad, an analog clock and a dial. All drawn in code with the Bridgetek EVE library (no EVE Screen Designer). More...

Go to the source code of this file.

Functions

void widgetTourInit (void)
 Starts the BT817 and prepares the widget tour.
 
void widgetTourRun (void)
 Runs the widget tour forever: read touch, redraw, short pause.
 

Detailed Description

BT817 "widget tour": page 1 has a button, a toggle with an LED and a slider that drives a gauge and a progress bar; page 2 has a keypad, an analog clock and a dial. All drawn in code with the Bridgetek EVE library (no EVE Screen Designer).

Two pages, switched with "Next >" and "< Back". Screen size comes from EVE_DISP_WIDTH / EVE_DISP_HEIGHT (800 x 480 for the DP-0701-01A panel). Touch input uses EVE tags:

  • tag 1: "Press me" button (counts presses)
  • tag 2: toggle (switches the LED)
  • tag 3: slider (tracked with CMD_TRACK, value 0..100)
  • tags 4 and 5: Next and Back
  • tag 6: Clear (page 2)
  • tag 7: dial (rotary CMD_TRACK)
  • tag 8: Done (page 2), shows the "Completed" pop-up, which stays until reset
  • '0'..'9': keypad keys (page 2), tag = the key's character
    Warning
    Not thread-safe or ISR-safe: the functions drive the BT817 over SPI and keep the screen state in static variables. Call them from one context only (here: main()).

Definition in file widgetTour.h.

Function Documentation

◆ widgetTourInit()

void widgetTourInit ( void )

Starts the BT817 and prepares the widget tour.

Initialises the EVE library (BT817 reset, clocks, panel timing), runs the touch calibration and registers the slider and dial trackers. Stops in Error_Handler() with a message if the BT817 is not found.

Note
Not thread-safe or ISR-safe (uses the SPI bus).

Definition at line 465 of file widgetTour.c.

References calibrateTouch(), and registerTrackers().

Referenced by main().

◆ widgetTourRun()

void widgetTourRun ( void )

Runs the widget tour forever: read touch, redraw, short pause.

Does not return.

Note
Not thread-safe or ISR-safe (uses the SPI bus and static state).

Definition at line 482 of file widgetTour.c.

References drawScreen(), FRAME_DELAY_MS, and readTouch().

Referenced by main().