underclock CPU to 18MHz
This commit is contained in:
parent
8025f0d380
commit
3c06c31114
|
@ -1,11 +1,11 @@
|
|||
#include "btstack.h"
|
||||
#include "buttons.h"
|
||||
#include "hci_dump.h"
|
||||
#include "hci_dump_segger_rtt_stdout.h"
|
||||
#include "pico/btstack_cyw43.h"
|
||||
#include "pico/cyw43_arch.h"
|
||||
#include "pico/stdlib.h"
|
||||
#include "state.h"
|
||||
#include "buttons.h"
|
||||
#include "stdio_rtt.h"
|
||||
#include "vibe_bt.h"
|
||||
#include <stdio.h>
|
||||
|
@ -30,9 +30,10 @@ static void heartbeat_handler(struct btstack_timer_source* ts) {
|
|||
int main() {
|
||||
stdio_init_all();
|
||||
stdio_rtt_init();
|
||||
printf("Starting...\n");
|
||||
|
||||
if (cyw43_arch_init()) {
|
||||
printf("CYW43 init failed");
|
||||
printf("CYW43 init failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -61,6 +62,9 @@ int main() {
|
|||
// turn on bluetooth!
|
||||
hci_power_control(HCI_POWER_ON);
|
||||
|
||||
printf("Underclocking CPU...\n");
|
||||
set_sys_clock_khz(18000, true);
|
||||
|
||||
btstack_run_loop_execute();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue