Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/hal/drivers/mesa-hostmot2/hostmot2.h b/src/hal/drivers/mesa-hostmot2/hostmot2.h
- index 63093c9..57b057f 100644
- --- a/src/hal/drivers/mesa-hostmot2/hostmot2.h
- +++ b/src/hal/drivers/mesa-hostmot2/hostmot2.h
- @@ -354,9 +354,9 @@ typedef struct {
- } hal;
- - long long accum;
- - long long offset;
- - u32 old_reg;
- + __s64 accum;
- + __s64 offset;
- + __u32 old_reg;
- u32 index_cnts;
- } hm2_resolver_instance_t;
- diff --git a/src/hal/drivers/mesa-hostmot2/resolver.c b/src/hal/drivers/mesa-hostmot2/resolver.c
- index b52d4d4..f678c62 100644
- --- a/src/hal/drivers/mesa-hostmot2/resolver.c
- +++ b/src/hal/drivers/mesa-hostmot2/resolver.c
- @@ -320,7 +320,7 @@ void hm2_resolver_process_tram_read(hostmot2_t *hm2, long period) {
- // PROCESS THE REGISTERS, SET THE PINS
- - res->accum += (signed long)(hm2->resolver.position_reg[i] - res->old_reg );
- + res->accum += (__s32)(hm2->resolver.position_reg[i] - res->old_reg );
- if ((res->old_reg ^ hm2->resolver.position_reg[i]) & 0x80000000){
- if (++(res->index_cnts) >= res->hal.param.index_div){
- res->index_cnts = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement