aboutsummaryrefslogtreecommitdiff
path: root/src/download.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/download.c')
-rw-r--r--src/download.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/download.c b/src/download.c
index 741e2e5..b810a91 100644
--- a/src/download.c
+++ b/src/download.c
@@ -16,8 +16,10 @@
*/
#include <stdlib.h>
+#include <stdint.h>
#include <string.h>
#include <endian.h>
+#include <sys/types.h>
#include "lg-downloader.h"
#include "hdlc.h"
@@ -51,7 +53,7 @@ static int download_response(struct context *context)
return 0;
}
-static int download_request(struct context *context, unsigned char command)
+static int download_request(struct context *context, uint8_t command)
{
struct download_request request;
int rc;
@@ -81,7 +83,7 @@ int download_start_flash_write(struct context *context)
return 0;
}
-int download_write(struct context *context, void *buffer, unsigned int address, unsigned int length)
+int download_write(struct context *context, void *buffer, off_t address, size_t length)
{
struct download_write_request request;
struct download_response response;
@@ -110,7 +112,7 @@ int download_write(struct context *context, void *buffer, unsigned int address,
return 0;
}
-int download_erase(struct context *context, unsigned int address, unsigned int length)
+int download_erase(struct context *context, off_t address, size_t length)
{
struct download_erase_request request;
int rc;
@@ -131,7 +133,7 @@ int download_erase(struct context *context, unsigned int address, unsigned int l
return 0;
}
-int download_read(struct context *context, void *buffer, unsigned int length)
+int download_read(struct context *context, void *buffer, size_t length)
{
struct download_read_request request;
int rc;
@@ -151,7 +153,7 @@ int download_read(struct context *context, void *buffer, unsigned int length)
return 0;
}
-int download_initialize_partition(struct context *context, unsigned int address, unsigned int length)
+int download_initialize_partition(struct context *context, off_t address, size_t length)
{
struct download_initialize_partition_request request;
int rc;
@@ -172,7 +174,7 @@ int download_initialize_partition(struct context *context, unsigned int address,
return 0;
}
-int download_ready_read(struct context *context, unsigned int address, unsigned int length)
+int download_ready_read(struct context *context, off_t address, size_t length)
{
struct download_ready_read_request request;
int rc;