pw_transfer: Allow setting max chunk size

Change-Id: Ida32fd1a6d789c2a6d6d9b79cd8ccb351b0f0304
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/88740
Reviewed-by: Alexei Frolov <frolv@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
diff --git a/pw_transfer/public/pw_transfer/transfer.h b/pw_transfer/public/pw_transfer/transfer.h
index ef80c91..f6e71c3 100644
--- a/pw_transfer/public/pw_transfer/transfer.h
+++ b/pw_transfer/public/pw_transfer/transfer.h
@@ -93,6 +93,12 @@
     max_parameters_.set_pending_bytes(max_pending_bytes);
   }
 
+  // Sets the maximum size for the data in a pw_transfer chunk. Note that the
+  // max chunk size must always fit within the transfer thread's chunk buffer.
+  void set_max_chunk_size_bytes(uint32_t max_chunk_size_bytes) {
+    max_parameters_.set_max_chunk_size_bytes(max_chunk_size_bytes);
+  }
+
   void UnregisterHandler(internal::Handler& handler) {
     thread_.RemoveTransferHandler(handler);
   }