projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/attiny: Eliminate warnings from -Wconversion
[fw/altos]
/
src
/
attiny
/
ao_led_tiny.c
diff --git
a/src/attiny/ao_led_tiny.c
b/src/attiny/ao_led_tiny.c
index cd620f4672f80318dbcb3e685b64a2726faffaa7..dab74fee1851a5ee40b1f711380c8b8278da7f61 100644
(file)
--- a/
src/attiny/ao_led_tiny.c
+++ b/
src/attiny/ao_led_tiny.c
@@
-30,19
+30,19
@@
ao_led_on(uint8_t colors)
void
ao_led_off(uint8_t colors)
{
void
ao_led_off(uint8_t colors)
{
- LED_PORT &= ~colors;
+ LED_PORT &=
(uint8_t)
~colors;
}
void
ao_led_set(uint8_t colors)
{
}
void
ao_led_set(uint8_t colors)
{
- LED_PORT = (
LED_PORT & ~LEDS_AVAILABLE) | (colors & LEDS_AVAILABLE
);
+ LED_PORT = (
uint8_t) ((LED_PORT & ~LEDS_AVAILABLE) | (colors & LEDS_AVAILABLE)
);
}
void
ao_led_toggle(uint8_t colors)
{
}
void
ao_led_toggle(uint8_t colors)
{
- LED_PORT
^= (colors & LEDS_AVAILABLE
);
+ LED_PORT
= (uint8_t) (LED_PORT ^ (colors & LEDS_AVAILABLE)
);
}
void
}
void
@@
-56,6
+56,6
@@
ao_led_for(uint8_t colors, AO_TICK_TYPE ticks)
void
ao_led_init(void)
{
void
ao_led_init(void)
{
- LED_PORT &= ~LEDS_AVAILABLE;
+ LED_PORT &=
(uint8_t)
~LEDS_AVAILABLE;
LED_DDR |= LEDS_AVAILABLE;
}
LED_DDR |= LEDS_AVAILABLE;
}