mirror of
https://github.com/Polprzewodnikowy/SummerCart64.git
synced 2024-11-22 14:09:16 +01:00
fixes
This commit is contained in:
parent
a72996dffb
commit
bd5391a03f
@ -55,7 +55,7 @@ static uint32_t update_checksum (uint32_t address, uint32_t length) {
|
||||
|
||||
static uint32_t update_write_token (uint32_t *address) {
|
||||
uint32_t length = sizeof(update_token);
|
||||
fpga_mem_write(*address, sizeof(update_token), update_token);
|
||||
fpga_mem_write(*address, sizeof(update_token), (uint8_t *) (update_token));
|
||||
*address += length;
|
||||
return length;
|
||||
}
|
||||
@ -91,11 +91,11 @@ static bool update_check_token (uint32_t *address) {
|
||||
static bool update_get_chunk (uint32_t *address, chunk_id_t *chunk_id, uint32_t *data_address, uint32_t *data_length) {
|
||||
uint32_t id;
|
||||
uint32_t checksum;
|
||||
fpga_mem_read(*address, sizeof(id), (uint8_t *) (id));
|
||||
fpga_mem_read(*address, sizeof(id), (uint8_t *) (&id));
|
||||
*address += sizeof(id);
|
||||
fpga_mem_read(*address, sizeof(*data_length), (uint8_t *) (data_length));
|
||||
*address += sizeof(*data_length);
|
||||
fpga_mem_read(*address, sizeof(checksum), (uint8_t *) (checksum));
|
||||
fpga_mem_read(*address, sizeof(checksum), (uint8_t *) (&checksum));
|
||||
*address += sizeof(checksum);
|
||||
*data_address = *address;
|
||||
*address += *data_length;
|
||||
|
Loading…
Reference in New Issue
Block a user