Knowledge Base

# SetRTCEvent({EventHandler}) hash function

Valid for use with hash command: HMI

Implemented on the following platforms: Android, Windows

This does two things:

  1. Generates the “under-the-hood” code that allows the SPLat board to receive Real Time Clock (RTC) date and time updates from an external SimpleHMI device, via serial or Bluetooth.
  2. Optionally lets you specify a handler to be run when the SimpleHMI device sends an RTC date and time update.

EventHandler is the name of your event handler. You don’t have to have an event handler, because the actual updating of the board’s RTC is automatic. If you have an event handler, it would be to do something like update the display. If you don’t want an event handler you must still have the SetRTCEvent, but without naming a handler, e.g.

# HMI SetRTCEvent()

SetRTCEvent only makes sense if the SPLat controller you are programming has a Real Time Clock (RTC). There’s a fully worked example online here.

See Also GetRTCOpen_Serial, User