#include <stdint.h>
#include "littlefs/lfs.h"
#include "littlefs/littlefs_helper.h"
Go to the source code of this file.
◆ COMMS_bulk_file_downlink_state_enum_t
Enumerator |
---|
COMMS_BULK_FILE_DOWNLINK_STATE_IDLE | |
COMMS_BULK_FILE_DOWNLINK_STATE_DOWNLINKING | |
COMMS_BULK_FILE_DOWNLINK_STATE_PAUSED | |
◆ COMMS_bulk_file_downlink_pause()
uint8_t COMMS_bulk_file_downlink_pause |
( |
void | | ) |
|
◆ COMMS_bulk_file_downlink_resume()
uint8_t COMMS_bulk_file_downlink_resume |
( |
void | | ) |
|
◆ COMMS_bulk_file_downlink_start()
int32_t COMMS_bulk_file_downlink_start |
( |
char * | file_path, |
|
|
uint32_t | start_offset, |
|
|
uint32_t | max_bytes ) |
Initiate a bulk file downlink over the UHF radio.
- Parameters
-
file_path | File name/path to downlink. |
start_offset | The byte offset in the file to start downlinking from (0 for start). |
max_bytes | The maximum number of bytes to downlink. Maximum value is 1000000 (1 MB, COMMS_bulk_file_downlink_total_bytes), for safety (to avoid a very very long-running downlink chain). Values >1 MB will be limited to 1 MB, and value 0 will be set to 1 MB. |
- Returns
- 0 on success. Negative LFS failure code on LFS failure. Positive error code on other (logical/request) errors.
- Note
- 1 MB takes about 15 minutes to downlink at 9600 baud.
-
This function is safe to call at any point (including mid-downlink, or mid-pause). It will close the previous file and start a new downlink.
◆ COMMS_bulk_file_downlink_absolute_start_offset
uint32_t COMMS_bulk_file_downlink_absolute_start_offset |
|
extern |
◆ COMMS_bulk_file_downlink_bytes_downlinked
uint32_t COMMS_bulk_file_downlink_bytes_downlinked |
|
extern |
◆ COMMS_bulk_file_downlink_file
◆ COMMS_bulk_file_downlink_file_path
◆ COMMS_bulk_file_downlink_next_seq_num
uint8_t COMMS_bulk_file_downlink_next_seq_num |
|
extern |
◆ COMMS_bulk_file_downlink_next_start_offset
uint32_t COMMS_bulk_file_downlink_next_start_offset |
|
extern |
◆ COMMS_bulk_file_downlink_state
◆ COMMS_bulk_file_downlink_total_bytes
uint32_t COMMS_bulk_file_downlink_total_bytes |
|
extern |
◆ COMMS_bulk_file_downlink_total_seq_num
uint8_t COMMS_bulk_file_downlink_total_seq_num |
|
extern |