|
PebbleOS
|
Tracks a firmware update pushed by the phone. More...
Enumerations | |
| enum | FirmwareUpdateStatus { FirmwareUpdateStopped = 0 , FirmwareUpdateRunning = 1 , FirmwareUpdateCancelled = 2 , FirmwareUpdateFailed = 3 } |
| State of the firmware update, also sent to the phone in the start response. More... | |
Functions | |
| void | firmware_update_init (void) |
| Initialize the firmware update service. | |
| unsigned int | firmware_update_get_percent_progress (void) |
| Get the progress of the running update. | |
| void | firmware_update_event_handler (PebbleSystemMessageEvent *event) |
| Handle a firmware update start, failure or completion system message. | |
| void | firmware_update_pb_event_handler (PebblePutBytesEvent *event) |
| Handle a put_bytes event during an update. | |
| FirmwareUpdateStatus | firmware_update_current_status (void) |
| Get the state of the firmware update. | |
| bool | firmware_update_is_in_progress (void) |
| Check whether a firmware update is running. | |
Tracks a firmware update pushed by the phone.
A firmware update start system message switches to the firmware update runlevel, launches the progress UI and waits for the phone to send the firmware over put_bytes. The update is refused when the battery is critically low. Progress is tracked from put_bytes events; on failure the normal runlevel is restored, on success the watch reboots into the new firmware.
| enum FirmwareUpdateStatus |
State of the firmware update, also sent to the phone in the start response.
| FirmwareUpdateStatus firmware_update_current_status | ( | void | ) |
Get the state of the firmware update.
| void firmware_update_event_handler | ( | PebbleSystemMessageEvent * | event | ) |
Handle a firmware update start, failure or completion system message.
Replies to the start message with the resulting FirmwareUpdateStatus.
| event | System message event; other message types are ignored. |
| unsigned int firmware_update_get_percent_progress | ( | void | ) |
Get the progress of the running update.
| void firmware_update_init | ( | void | ) |
Initialize the firmware update service.
| bool firmware_update_is_in_progress | ( | void | ) |
Check whether a firmware update is running.
| void firmware_update_pb_event_handler | ( | PebblePutBytesEvent * | event | ) |
Handle a put_bytes event during an update.
Ignored if no update is running.
| event | Put bytes event. |