stm32/mboot: Remove unnecessary test for led being 1 in led_state.

The "led" argument is always a pointer to the GPIO port, or'd with the pin
that the LED is on, so testing that it is "1" is unnecessary.  The type of
"led" is also changed to uint32_t so it can properly hold a 32-bit pointer.
This commit is contained in:
Damien George 2020-03-25 00:10:32 +11:00
parent 9dd470b768
commit 40255aff23
1 changed files with 1 additions and 4 deletions

View File

@ -441,10 +441,7 @@ MP_WEAK void led_init(void) {
led0_cur_state = LED0_STATE_OFF;
}
MP_WEAK void led_state(int led, int val) {
if (led == 1) {
led = LED0;
}
MP_WEAK void led_state(uint32_t led, int val) {
if (val) {
MICROPY_HW_LED_ON(led);
} else {