|
PebbleOS
|
Transfer of firmware, resources, apps and files from the phone to the watch. More...
Modules | |
| Put bytes storage | |
| Backends storing received objects. | |
Data Structures | |
| struct | PbInstallStatus |
| Progress of a partially written object. More... | |
Typedefs | |
| typedef struct PebbleCommSessionEvent | PebbleCommSessionEvent |
Communication session event, see PebbleCommSessionEvent. | |
Enumerations | |
| enum | PutBytesObjectType { ObjectUnknown = 0x00 , ObjectFirmware = 0x01 , ObjectRecovery = 0x02 , ObjectSysResources = 0x03 , ObjectAppResources = 0x04 , ObjectWatchApp = 0x05 , ObjectFile = 0x06 , ObjectWatchWorker = 0x07 , NumObjects } |
| Object types. More... | |
Functions | |
| void | put_bytes_init (void) |
| Initialize put bytes. | |
| void | put_bytes_cancel (void) |
| Cancel an ongoing app, app resources or worker transfer. | |
| void | put_bytes_deinit (void) |
| Reset all put bytes state, for unit tests only. | |
| void | put_bytes_expect_init (uint32_t timeout_ms) |
| Expect an Init request within a timeout. | |
| void | put_bytes_handle_comm_session_event (const PebbleCommSessionEvent *app_event) |
| Handle a communication session event. | |
Transfer of firmware, resources, apps and files from the phone to the watch.
A Pebble Protocol endpoint driven by the phone. Every request is answered with an ack or nack carrying the transfer token; multi-byte fields are big-endian. One transfer runs at a time and is cleaned up after 30 s without requests, or when the system session disconnects.
Abort(token) cancels a transfer. Firmware, recovery and system resources are only accepted during a firmware update, are written raw to flash and can resume an interrupted transfer from an append offset in the Init request (see pb_storage_get_status()). Other objects are written to PFS files.
| struct PbInstallStatus |
| typedef struct PebbleCommSessionEvent PebbleCommSessionEvent |
Communication session event, see PebbleCommSessionEvent.
| enum PutBytesObjectType |
Object types.
| void put_bytes_cancel | ( | void | ) |
Cancel an ongoing app, app resources or worker transfer.
Does nothing when idle or for other object types. The phone's next requests are nacked. Must be called from KernelBG.
| void put_bytes_deinit | ( | void | ) |
Reset all put bytes state, for unit tests only.
| void put_bytes_expect_init | ( | uint32_t | timeout_ms | ) |
Expect an Init request within a timeout.
If none arrives in time, a put bytes init timeout event is raised. Does nothing if a transfer is in progress.
| timeout_ms | Timeout in milliseconds. |
| void put_bytes_handle_comm_session_event | ( | const PebbleCommSessionEvent * | app_event | ) |
Handle a communication session event.
Cancels the ongoing transfer when the system session closes.
| app_event | Session event. |
| void put_bytes_init | ( | void | ) |
Initialize put bytes.