72 lines
1.9 KiB
Plaintext
72 lines
1.9 KiB
Plaintext
P7_BACKUP_ROM(3)
|
|
================
|
|
Thomas "Cakeisalie5" Touhey
|
|
:Email: thomas@touhey.fr
|
|
:man source: libp7
|
|
:man manual: libp7 manual
|
|
|
|
NAME
|
|
----
|
|
p7_backup_rom, p7_backup_romfile, p7_backup_boot, p7_backup_bootfile, p7_backup_casiowin_entry - backup software element of the calculator
|
|
|
|
SYNOPSIS
|
|
--------
|
|
[source,c]
|
|
----
|
|
#include <libp7.h>
|
|
|
|
int p7_backup_rom(p7_handle_t *handle, const p7_buffer_t *buffer,
|
|
void (*disp)());
|
|
int p7_backup_romfile(p7_handle_t *handle, FILE *file,
|
|
void (*disp)());
|
|
int p7_backup_boot(p7_handle_t *handle, const p7_buffer_t *buffer,
|
|
void (*disp)());
|
|
int p7_backup_bootfile(p7_handle_t *handle, FILE *file,
|
|
void (*disp)());
|
|
int p7_backup_casiowin_entry(p7_handle_t *handle, p7_casiowin_entry_t *entry);
|
|
|
|
p7_casiowin_entry_t cwe;
|
|
p7_backup_romfile(handle, stdout, NULL);
|
|
p7_backup_bootfile(handle, stdout, NULL);
|
|
p7_backup_casiowin_entry(handle, &cwe);
|
|
----
|
|
|
|
DESCRIPTION
|
|
-----------
|
|
These functions backup software elements from the calculator using Protocol 7:
|
|
|
|
* *p7_backup_rom* backups the flash ROM (0x400000 bytes)
|
|
* *p7_backup_romfile* does the same that the previous function, but with
|
|
a *FILE* buffer;
|
|
* *p7_backup_boot* backups the boot code (0x100000 bytes)
|
|
* *p7_backup_bootfile* does the same that the previous function, but with
|
|
a *FILE* buffer;
|
|
* *p7_backup_casiowin_entry* backups the CASIOWIN entry (0x80 bytes)
|
|
|
|
*p7_backup_rom* and *p7_backup_boot* make use of the libp7 buffer interface;
|
|
to read more about it, see *p7_buffer*(3).
|
|
|
|
The *disp* parameter is only there if you want to display a loading bar. It
|
|
should have this prototype:
|
|
|
|
[source,c]
|
|
----
|
|
void my_display(p7ushort_t id, p7ushort_t total);
|
|
----
|
|
|
|
If it is non-null, it is first called with *id* > *total* to initialize display.
|
|
|
|
RETURN VALUE
|
|
------------
|
|
This function returns zero if everything went well, and the error code
|
|
otherwise.
|
|
|
|
ERRORS
|
|
------
|
|
See *p7_error*(3).
|
|
|
|
SEE ALSO
|
|
--------
|
|
*libp7*(3),
|
|
*p7_error*(3)
|