Compare commits
2 Commits
v0.2.0
...
c430a53755
| Author | SHA1 | Date | |
|---|---|---|---|
|
c430a53755
|
|||
|
2e9159cb57
|
@@ -15,7 +15,8 @@ You will need the following hardware to make the device:
|
|||||||
- Raspberry Pi Pico W
|
- Raspberry Pi Pico W
|
||||||
- USB extension cable
|
- USB extension cable
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
You will need to cut the USB extension in half and connect the wires from the
|
You will need to cut the USB extension in half and connect the wires from the
|
||||||
female end to the Raspberry Pi Pico W. The default configuration is to attach
|
female end to the Raspberry Pi Pico W. The default configuration is to attach
|
||||||
@@ -32,6 +33,8 @@ respectively. For the data wires, you can solder them to the two test points
|
|||||||
TP2 and TP3 on the back of the Raspberry Pi Pico. The white cable goes to TP2
|
TP2 and TP3 on the back of the Raspberry Pi Pico. The white cable goes to TP2
|
||||||
and the green cable to TP3.
|
and the green cable to TP3.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
The individual wires on the USB can be fragile, so hot glue or other strain
|
The individual wires on the USB can be fragile, so hot glue or other strain
|
||||||
relief is a good idea.
|
relief is a good idea.
|
||||||
|
|
||||||
|
|||||||
@@ -51,8 +51,6 @@ void btstack_main(void){
|
|||||||
bt_hid_setup();
|
bt_hid_setup();
|
||||||
|
|
||||||
init_report_buf();
|
init_report_buf();
|
||||||
|
|
||||||
hci_power_control(HCI_POWER_ON);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bt_hid_setup(void) {
|
static void bt_hid_setup(void) {
|
||||||
|
|||||||
@@ -16,9 +16,12 @@ static void usb_main(void);
|
|||||||
|
|
||||||
// main loop
|
// main loop
|
||||||
int main(void) {
|
int main(void) {
|
||||||
|
// for PIO USB, we want clock speed to be multiple of 12MHz
|
||||||
set_sys_clock_khz(144000, true);
|
set_sys_clock_khz(144000, true);
|
||||||
|
|
||||||
|
// need so BTstack can save pairing information to flash
|
||||||
|
flash_safe_execute_core_init();
|
||||||
|
|
||||||
sleep_ms(10);
|
sleep_ms(10);
|
||||||
|
|
||||||
// run BLE on core 1
|
// run BLE on core 1
|
||||||
|
|||||||
+14111
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 255 KiB |
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
host_state_t host_state;
|
host_state_t host_state;
|
||||||
static absolute_time_t request_time;
|
static absolute_time_t request_time;
|
||||||
static absolute_time_t last_report;
|
static absolute_time_t last_report;
|
||||||
static uint16_t host_poll_interval=8000;
|
static uint16_t host_poll_interval=HOST_POLL_INTERVAL;
|
||||||
|
|
||||||
// initialize usb host
|
// initialize usb host
|
||||||
void usb_host_init(void) {
|
void usb_host_init(void) {
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
#ifndef USB_HOST_H_
|
#ifndef USB_HOST_H_
|
||||||
#define USB_HOST_H_
|
#define USB_HOST_H_
|
||||||
|
|
||||||
#define HOST_POLL_INTERVAL 25000
|
#define HOST_POLL_INTERVAL 8000
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
HOST_INACTIVE=0,
|
HOST_INACTIVE=0,
|
||||||
|
|||||||
Reference in New Issue
Block a user