Merge pull request #2642 from openmv/update_openmv_ae3

ports/alif: Disable LEDs on soft-reboot.
This commit is contained in:
Ibrahim Abdelkader 2025-03-31 16:55:11 +02:00 committed by GitHub
commit f5764f1ab7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -1,4 +1,8 @@
// Pin Name, Port Number, Pin Number, AF, Input ON bit.
OMV_GPIO_DEFINE(LED_R, PORT_0, PIN_0, GPIO, false)
OMV_GPIO_DEFINE(LED_G, PORT_6, PIN_3, GPIO, false)
OMV_GPIO_DEFINE(LED_B, PORT_6, PIN_0, GPIO, false)
OMV_GPIO_DEFINE(I2C0_SDA, PORT_3, PIN_5, I2C0_SDA, true)
OMV_GPIO_DEFINE(I2C0_SCL, PORT_3, PIN_4, I2C0_SCL, true)

View File

@ -79,6 +79,7 @@
#include "alif_dma.h"
#include "py_audio.h"
#include "py_imu.h"
#include "omv_gpio.h"
NORETURN void __fatal_error(const char *msg);
@ -99,6 +100,12 @@ int main(void) {
#endif
soft_reset:
#if CORE_M55_HP
omv_gpio_write(&omv_pin_LED_R, 1);
omv_gpio_write(&omv_pin_LED_G, 1);
omv_gpio_write(&omv_pin_LED_B, 1);
#endif
// Initialise stack extents and GC heap.
extern uint8_t _estack, _sstack, _heap_start, _heap_end;
mp_init_gc_stack(&_sstack, &_estack, &_heap_start, &_heap_end, 1024);