Skip to content

Commit 2910b5c

Browse files
author
Christopher Friedt
committed
Merge branch '1-build-fails-due-to-incorrect-type-passed-to-hps_read_reg' into 'master'
used correct types. Should fix #1 Closes #1 See merge request pervices-open-source/server!11
1 parent 900b537 commit 2910b5c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hal/properties.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4550,7 +4550,7 @@ static int hdlr_fpga_about_cmp_time (const char* data, char* ret) {
45504550
}
45514551

45524552
static int hdlr_fpga_about_conf_info (const char* data, char* ret){
4553-
uint64_t old_val;
4553+
uint32_t old_val;
45544554
read_hps_reg ( "sys18", &old_val);
45554555

45564556
sprintf(ret, "config. info. 0x%02x \n", old_val);
@@ -4565,7 +4565,7 @@ static int hdlr_fpga_about_serial (const char* data, char* ret){
45654565
read_hps_reg ( "sys17", &old_val2);
45664566

45674567
//append values
4568-
old_val = (old_val2 << 32) | old_val1;
4568+
old_val = ((uint64_t)old_val2 << 32) | (uint64_t)old_val1;
45694569

45704570
sprintf(ret, "serial number 0x%02x%02x \n", old_val2, old_val1);
45714571
return RETURN_SUCCESS;
@@ -4601,7 +4601,7 @@ static int hdlr_fpga_about_fw_ver (const char* data, char* ret) {
46014601
old_val2 = old_val2 & 0xff;
46024602

46034603
//append values
4604-
old_val = (old_val2 << 32) | old_val1;
4604+
old_val = ((uint64_t)old_val2 << 32) | (uint64_t)old_val1;
46054605

46064606

46074607
sprintf(ret, "ver. 0x%02x%02x \n", old_val2, old_val1);

0 commit comments

Comments
 (0)