if (!a)
return 0;
- m = rb.mask << rb.bit;
- avr_core_watch_write(avr, a, avr->data[a] | m);
- return (avr->data[a] >> rb.bit) & rb.mask;
+ m = (uint8_t)(rb.mask << rb.bit);
+ avr_core_watch_write(avr, a, (uint8_t)(avr->data[a] | m));
+ return (uint8_t)((avr->data[a] >> rb.bit) & rb.mask);
}
static inline uint8_t
if (!a)
return 0;
- m = rb.mask << rb.bit;
- avr_core_watch_write(avr, a, (avr->data[a] & ~(m)) | ((v << rb.bit) & m));
- return (avr->data[a] >> rb.bit) & rb.mask;
+ m = (uint8_t)(rb.mask << rb.bit);
+ avr_core_watch_write(avr, a,
+ (uint8_t)((avr->data[a] & ~(m)) |
+ ((v << rb.bit) & m)));
+ return (uint8_t)((avr->data[a] >> rb.bit) & rb.mask);
}
/*
if (!a)
return 0;
- m = rb.mask << rb.bit;
- avr_core_watch_write(avr, a, (avr->data[a] & ~(m)) | ((v) & m));
- return (avr->data[a]) & (rb.mask << rb.bit);
+ m = (uint8_t)(rb.mask << rb.bit);
+ avr_core_watch_write(avr, a,
+ (uint8_t)((avr->data[a] & ~(m)) | ((v) & m)));
+ return (uint8_t)((avr->data[a]) & (rb.mask << rb.bit));
}
static inline uint8_t
if (!a)
return 0;
//uint8_t m = rb.mask << rb.bit;
- return (avr->data[a] >> rb.bit) & rb.mask;
+ return (uint8_t)((avr->data[a] >> rb.bit) & rb.mask);
}
/*
uint16_t a = rb.reg;
if (!a)
return 0;
- return (value >> rb.bit) & rb.mask;
+ return (uint8_t)((value >> rb.bit) & rb.mask);
}
/*
if (!a)
return 0;
//uint8_t m = rb.mask << rb.bit;
- return (avr->data[a]) & (rb.mask << rb.bit);
+ return (uint8_t)((avr->data[a]) & (rb.mask << rb.bit));
}
static inline uint8_t
uint16_t a = rb.reg;
if (!a)
return 0;
- uint8_t m = rb.mask << rb.bit;
- avr_core_watch_write(avr, a, avr->data[a] & ~m);
+ uint8_t m = (uint8_t)(rb.mask << rb.bit);
+ avr_core_watch_write(avr, a, (uint8_t)(avr->data[a] & ~m));
return avr->data[a];
}
for (i = 0; i < count; i++, rb++) if (rb->reg) {
uint16_t a = rb->reg;
- res |= ((avr->data[a] >> rb->bit) & rb->mask) << i;
+ res |= (uint8_t)(((avr->data[a] >> rb->bit) & rb->mask) << i);
}
return res;
}