Fix it to work under FreeBSD

Add sp_drain() where needed. Without it FreeBSD won't pass the handshake
phase.
Also decreate max buffer size.
Tested with Pinecil v2 and it can write and check new firmware.
This commit is contained in:
porsolic
2023-02-15 20:21:47 +01:00
committed by Marek Kraus
parent 7fb2cc829c
commit 6424f9ddf8
3 changed files with 12 additions and 7 deletions
+1 -1
View File
@@ -331,7 +331,7 @@ int32_t blisp_easy_flash_write(struct blisp_device* device,
uint32_t data_size,
blisp_easy_progress_callback progress_callback) {
int32_t ret;
#ifdef __APPLE__
#if defined (__APPLE__) || defined (__FreeBSD__)
const uint16_t buffer_max_size = 372 * 1;
#else
const uint16_t buffer_max_size = 2052;