Lines Matching refs:len_to_send
608 static int fw_upload_write_hdr_and_payload(uint16_t len_to_send, uint8_t *buffer, bool new_speed) in fw_upload_write_hdr_and_payload() argument
621 if (sending_len == len_to_send) { in fw_upload_write_hdr_and_payload()
649 if ((len_to_send & 0x01) == 0x01) { in fw_upload_write_hdr_and_payload()
650 if (len_to_send == (CMD_HDR_LEN + 1)) { in fw_upload_write_hdr_and_payload()
652 fw_upload_write_data(buffer, len_to_send - 1); in fw_upload_write_hdr_and_payload()
655 } else if (len_to_send == (payload_len + 1)) { in fw_upload_write_hdr_and_payload()
657 fw_upload_write_data(&buffer[CMD_HDR_LEN], len_to_send - 1); in fw_upload_write_hdr_and_payload()
661 } else if (len_to_send == CMD_HDR_LEN) { in fw_upload_write_hdr_and_payload()
663 fw_upload_write_data(buffer, len_to_send); in fw_upload_write_hdr_and_payload()
666 } else if (len_to_send == payload_len) { in fw_upload_write_hdr_and_payload()
668 fw_upload_write_data(&buffer[CMD_HDR_LEN], len_to_send); in fw_upload_write_hdr_and_payload()
680 if (fw_upload_len_valid(fw_upload.last_5bytes_buffer, &len_to_send) == 0) { in fw_upload_write_hdr_and_payload()
685 return len_to_send; in fw_upload_write_hdr_and_payload()
714 uint16_t len_to_send; in fw_upload_change_speed() local
770 len_to_send = fw_upload_wait_length(0); in fw_upload_change_speed()
771 if (len_to_send == V1_START_INDICATION) { in fw_upload_change_speed()
773 } else if (len_to_send == 0) { in fw_upload_change_speed()
775 } else if (len_to_send == CMD_HDR_LEN) { in fw_upload_change_speed()
780 err = fw_upload_write_hdr_and_payload(len_to_send, in fw_upload_change_speed()
925 uint16_t len_to_send; in fw_uploading() local
966 len_to_send = fw_upload_wait_length(true); in fw_uploading()
968 if (len_to_send == V1_START_INDICATION) { in fw_uploading()
971 while (len_to_send > 0) { in fw_uploading()
972 len_to_send = fw_upload_v1_send_data(len_to_send); in fw_uploading()
979 return len_to_send; in fw_uploading()