|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The card's side of the servo programmer's files. More...
Functions | |
| static uint8_t | type_no (kst_type_t type) |
| The servo type as the number the screen prints. | |
| unsigned | kst_card_type (const kst_image_t *img) |
| The servo type of an image as a number the screen prints behind a "V": 6 or 8. | |
| static uint8_t | store_result (kst_store_t r, bool save) |
| A result of the store as kst_prog.h names it. | |
| static void | base_of (const char *file, char *out) |
| The base name of a file name the store lists. | |
| static void | save (const kst_store_io_t *io, const kst_prog_card_req_t *req, kst_prog_card_done_t *done) |
| Carries out a save request. | |
| static uint8_t | type_of (const kst_store_io_t *io, const char *name) |
The servo type the file name states; 0 for none and for a file that does not read as a servo file. | |
| static void | list (const kst_store_io_t *io, const kst_prog_card_req_t *req, kst_prog_card_done_t *done) |
| Carries out a list request. | |
| static unsigned | lowest (kst_rules_t set) |
| The lowest rule in a set of rules. | |
| static void | load (const kst_store_io_t *io, const kst_prog_card_req_t *req, kst_prog_card_done_t *done) |
| Carries out a load request. | |
| void | kst_card_run (const kst_store_io_t *io, const kst_prog_card_req_t *req, kst_prog_card_done_t *done) |
Carry out req on the card behind io and write the answer to done. | |
Variables | |
| static char | s_text [KST_FILE_MAX] |
| static kst_file_t | s_file |
| static kst_file_load_t | s_load |
| static kst_store_entry_t | s_list [KST_CARD_LIST_MAX] |
|
static |
The base name of a file name the store lists.
| file | The file name the store lists. |
| out | Receives the base name, at most KST_PROG_NAME_MAX - 1 characters. |
| void kst_card_run | ( | const kst_store_io_t * | io, |
| const kst_prog_card_req_t * | req, | ||
| kst_prog_card_done_t * | done ) |
Carry out req on the card behind io and write the answer to done.
Every request gets an answer.
KST_PROG_CARD_SAVE writes the text of req->image to a new file: named by kst_store_preset() for a preset save, else req->name. No file is replaced.
KST_PROG_CARD_LIST gives the base names of up to KST_PROG_FILES_MAX files from req->first on in the order of kst_store_list(), the latest proposed name first among the proposed ones, each with the servo type its text states, and the next preset name. done->total is the number of servo files in the directory, 65535 for that many or more.
KST_PROG_CARD_LOAD reads the file of req->name and holds it against req->image with kst_file_load(): done->image is the servo's image with the editable fields of the file.
| io | The store the request is carried out on. |
| req | The request. |
| done | Receives the answer. |
| unsigned kst_card_type | ( | const kst_image_t * | img | ) |
The servo type of an image as a number the screen prints behind a "V": 6 or 8.
0 for NULL.
| img | The image to read. |
|
static |
Carries out a list request.
| io | The card store. |
| req | The request. |
| done | Receives the answer. |
|
static |
Carries out a load request.
| io | The card store. |
| req | The request. |
| done | Receives the answer. |
|
static |
The lowest rule in a set of rules.
| set | The set of rules, one bit each. |
|
static |
Carries out a save request.
| io | The card store. |
| req | The request. |
| done | Receives the answer. |
|
static |
A result of the store as kst_prog.h names it.
| r | The store result. |
| save | true for a save, false for a list or a load. |
|
static |
The servo type as the number the screen prints.
| type | The servo type. |
|
static |
The servo type the file name states; 0 for none and for a file that does not read as a servo file.
| io | The card store. |
| name | The file name. |