mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 11:10:14 +01:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user