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:
parent
9dd470b768
commit
40255aff23
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue