主权项 |
1. A peripheral device for an electronic device, the peripheral device comprising: a memory having at least two memory blocks each configured to store a respective set of instructions, one of the memory blocks being changeably designated as an active memory block; and electrical circuitry configured to: receive an update notification from the electronic device, the update notification identifying one of the at least two memory blocks for receiving updated instructions; upon determination that the identified one memory block is not the active memory block: transmit a response to the electronic device acknowledging the update notification, receive, from the electronic device, the updated instructions targeted for the identified memory block, and write the received updated instructions to the identified one memory block; upon determination that the identified one memory block is the active memory block: transmit a response to the electronic device indicating an error, receive another update notification from the electronic device that identifies a different one of the at least two memory blocks for receiving the updated instructions, receive, from the electronic device, the updated instructions targeted for the identified different memory block, and write the received updated instructions to the identified different memory block; and designate the memory block to which the received updated instructions were written as the active memory block in response to a command from the electronic device; and a battery configured, based on the instructions in the active memory block, at least to provide power to a device other than the peripheral device. |