|
1 | 1 | # Copilot Instructions for `pgpemu-esp32` |
2 | 2 |
|
3 | 3 | ## Project Overview |
4 | | -- **Purpose:** Emulates a Pokémon GO Plus device on ESP32-C3 hardware, providing BLE, button, LED, and WiFi captive portal functionality. |
5 | | -- **Structure:** |
6 | | - - All main logic is in `main/` (e.g., `pgp_gatts.c`, `pgp_gap.c`, `pgp_handshake.c`, `config_portal.c`). |
| 4 | + - All main logic is in `main/` (e.g., `pgp_gatts.c`, `pgp_gap.c`, `pgp_handshake.c`). |
| 5 | + **Purpose:** Emulates a Pokémon GO Plus device on ESP32-C3 hardware, providing BLE, button, and LED functionality. |
| 6 | + **Structure:** |
| 7 | + - All main logic is in `main/` (e.g., `pgp_gatts.c`, `pgp_gap.c`, `pgp_handshake.c`). |
7 | 8 | - Uses ESP-IDF build system (CMake/Makefile) and ESP-IDF APIs for BLE, WiFi, NVS, etc. |
8 | 9 | - `build/` is generated; do not edit. |
9 | 10 |
|
10 | 11 | ## Key Components |
11 | 12 | - **BLE GATT Server:** `pgp_gatts.c`, `pgp_gap.c`, `pgp_gatts_debug.c` handle BLE services and device advertising. |
12 | 13 | - **Button/LED:** `button_input.c`, `led_output.c`, `pgp_led_handler.c` manage hardware I/O. |
13 | | -- **WiFi Setup Portal:** `config_portal.c`, `captive_dns.c` provide a captive portal for device configuration. |
| 14 | + |
14 | 15 | - **Secrets/Settings:** `config_secrets.c`, `settings.c`, `nvs_helper.c` manage persistent storage in NVS. |
15 | 16 | - **Certificates:** `pgp_cert.c` and related files handle device certificates for authentication. |
16 | 17 | - **PC Test Harness:** `main/pc/` and `Makefile.test` allow building a test binary (`cert-test`) for handshake/cert logic on a PC. |
|
0 commit comments