X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fstmf0%2Fao_led_stmf0.c;fp=src%2Fstmf0%2Fao_led_stmf0.c;h=9448a15ab6873f4bea0383d3dd6ded1de2a6fd1f;hp=63593aff039c6153da468cc4bc154451621fc581;hb=c49bd3cb0c31a51fae79ddc92237cc309be9a242;hpb=d225adc3af9e5726d436cbbdbf8dcc5837e50804 diff --git a/src/stmf0/ao_led_stmf0.c b/src/stmf0/ao_led_stmf0.c index 63593aff..9448a15a 100644 --- a/src/stmf0/ao_led_stmf0.c +++ b/src/stmf0/ao_led_stmf0.c @@ -52,7 +52,7 @@ void ao_led_set(AO_LED_TYPE colors) { AO_LED_TYPE on = colors & LEDS_AVAILABLE; - AO_LED_TYPE off = ~colors & LEDS_AVAILABLE; + AO_LED_TYPE off = (AO_LED_TYPE) (~colors & LEDS_AVAILABLE); ao_led_off(off); ao_led_on(on); @@ -78,7 +78,7 @@ ao_led_init(void) #ifdef LED_PORT stm_rcc.ahbenr |= (1 << LED_PORT_ENABLE); - LED_PORT->odr &= ~LEDS_AVAILABLE; + LED_PORT->odr &= (uint32_t) ~LEDS_AVAILABLE; #else #ifdef LED_PORT_0 stm_rcc.ahbenr |= (1 << LED_PORT_0_ENABLE);