RP2: Add bluetooth and nimble support.

This commit is contained in:
iabdalkader 2021-07-10 19:54:23 +02:00
parent 90550fe1b0
commit e49dc22b33
3 changed files with 15 additions and 3 deletions

@ -1 +1 @@
Subproject commit 2a5a27d3f720c9640d841bcfc310733b74322353
Subproject commit 7759d448509d7481e3a747107f1a77ecc5aa2c60

View File

@ -31,7 +31,7 @@ extern unsigned char *OMV_UNIQUE_ID_ADDR;
#define OMV_XCLK_FREQUENCY (12500000)
// RAW buffer size
#define OMV_RAW_BUF_SIZE (151*1024)
#define OMV_RAW_BUF_SIZE (136*1024)
// Enable hardware JPEG
#define OMV_HARDWARE_JPEG (0)
@ -97,7 +97,7 @@ void pico_reset_to_bootloader(void);
#define OMV_MAIN_MEMORY RAM // data, bss and heap memory
#define OMV_STACK_MEMORY RAM // stack memory
#define OMV_FB_SIZE (151K) // FB memory: header + QVGA/GS image
#define OMV_FB_SIZE (136K) // FB memory: header + QVGA/GS image
#define OMV_FB_ALLOC_SIZE (12K) // minimum fb alloc size
#define OMV_STACK_SIZE (8K)
#define OMV_HEAP_SIZE (32 * 1024) // MicroPython's heap

View File

@ -42,6 +42,11 @@
#include "genhdr/mpversion.h"
#include "pendsv.h"
#if MICROPY_PY_BLUETOOTH
#include "extmod/modbluetooth.h"
#include "mpbthciport.h"
#endif
#include "pico/stdlib.h"
#include "pico/binary_info.h"
#include "hardware/rtc.h"
@ -174,6 +179,10 @@ soft_reset:
machine_pin_init();
rp2_pio_init();
#if MICROPY_PY_BLUETOOTH
mp_bluetooth_hci_init();
#endif
pendsv_init();
usbdbg_init();
@ -245,6 +254,9 @@ soft_reset:
#if MICROPY_PY_AUDIO
py_audio_deinit();
#endif
#if MICROPY_PY_BLUETOOTH
mp_bluetooth_deinit();
#endif
rp2_pio_deinit();
machine_pin_deinit();
gc_sweep_all();