| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <stdbool.h> |
| 7 |
#include "alsa.h" |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
int fcp_socket_connect(struct alsa_card *card); |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
int fcp_socket_send_command(int sock_fd, uint8_t command); |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
int fcp_socket_handle_response(int sock_fd, bool show_progress); |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
int fcp_socket_wait_for_disconnect(int sock_fd); |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
int fcp_socket_reboot_device(struct alsa_card *card); |
| 28 |
|
| 29 |
|
| 30 |
int fcp_socket_reboot_device_fd(int sock_fd); |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
int fcp_socket_reset_config( |
| 35 |
struct alsa_card *card, |
| 36 |
void (*progress_callback)(int percent, void *user_data), |
| 37 |
void *user_data |
| 38 |
); |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
int fcp_socket_erase_app_firmware( |
| 43 |
struct alsa_card *card, |
| 44 |
void (*progress_callback)(int percent, void *user_data), |
| 45 |
void *user_data |
| 46 |
); |
| 47 |
|
| 48 |
|
| 49 |
int fcp_socket_erase_app_firmware_fd( |
| 50 |
int sock_fd, |
| 51 |
void (*progress_callback)(int percent, void *user_data), |
| 52 |
void *user_data |
| 53 |
); |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
int fcp_socket_upload_firmware( |
| 60 |
struct alsa_card *card, |
| 61 |
uint8_t command, |
| 62 |
const uint8_t *firmware_data, |
| 63 |
uint32_t firmware_size, |
| 64 |
uint16_t usb_vid, |
| 65 |
uint16_t usb_pid, |
| 66 |
const uint8_t *sha256, |
| 67 |
const uint8_t *md5, |
| 68 |
void (*progress_callback)(int percent, void *user_data), |
| 69 |
void *user_data |
| 70 |
); |
| 71 |
|
| 72 |
|
| 73 |
int fcp_socket_upload_firmware_fd( |
| 74 |
int sock_fd, |
| 75 |
uint8_t command, |
| 76 |
const uint8_t *firmware_data, |
| 77 |
uint32_t firmware_size, |
| 78 |
uint16_t usb_vid, |
| 79 |
uint16_t usb_pid, |
| 80 |
const uint8_t *sha256, |
| 81 |
const uint8_t *md5, |
| 82 |
void (*progress_callback)(int percent, void *user_data), |
| 83 |
void *user_data |
| 84 |
); |