mirror of
https://github.com/NathanReeves/BlueCubeMod
synced 2024-11-24 01:52:20 -05:00
added firmware
This commit is contained in:
parent
289f08e2a3
commit
b999864762
BIN
Firmware/.DS_Store
vendored
Normal file
BIN
Firmware/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
Firmware/BlueCubeMod/.DS_Store
vendored
Normal file
BIN
Firmware/BlueCubeMod/.DS_Store
vendored
Normal file
Binary file not shown.
9
Firmware/BlueCubeMod/Makefile
Normal file
9
Firmware/BlueCubeMod/Makefile
Normal file
@ -0,0 +1,9 @@
|
||||
#
|
||||
# Bluetooth GameCube controller mod for ESP32 port
|
||||
#
|
||||
# Generated by Nathan Reeves
|
||||
#
|
||||
|
||||
PROJECT_NAME := BlueCubeMod
|
||||
|
||||
include $(IDF_PATH)/make/project.mk
|
BIN
Firmware/BlueCubeMod/main/.DS_Store
vendored
Normal file
BIN
Firmware/BlueCubeMod/main/.DS_Store
vendored
Normal file
Binary file not shown.
563
Firmware/BlueCubeMod/main/BlueCubeMod.c
Normal file
563
Firmware/BlueCubeMod/main/BlueCubeMod.c
Normal file
@ -0,0 +1,563 @@
|
||||
/*
|
||||
* Copyright (C) 2014 BlueKitchen GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holders nor the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* 4. Any redistribution, use, or modification is done solely for
|
||||
* personal benefit and not for any commercial purpose or for
|
||||
* monetary gain.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
|
||||
* RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* Please inquire about commercial licensing options at
|
||||
* contact@bluekitchen-gmbh.com
|
||||
*
|
||||
*/
|
||||
|
||||
#define __BTSTACK_FILE__ "BlueCubeMod.c"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "btstack.h"
|
||||
#include "btstack_event.h"
|
||||
#include "btstack_stdin.h"
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/queue.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "btstack_run_loop_freertos.h"
|
||||
#include "driver/gpio.h"
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "esp_log.h"
|
||||
#include "driver/rmt.h"
|
||||
#include "driver/periph_ctrl.h"
|
||||
#include "soc/rmt_reg.h"
|
||||
|
||||
/*
|
||||
GameCube controller advertises as a Dualshock 4 "Wireless Controller"
|
||||
Mac/PC/PS4 supported (tested using Dolphin Emulator on Mac)
|
||||
For Switch/RPi, use an 8Bitdo USB adapter
|
||||
*/
|
||||
|
||||
/*
|
||||
Wiring
|
||||
Connect the following pins together:
|
||||
-RMT_TX_GPIO_NUM (18)
|
||||
-RMT_RX_GPIO_NUM (23)
|
||||
-GameCube controller's data pin (Red)
|
||||
|
||||
Connect GND wires (Black)
|
||||
*/
|
||||
|
||||
#define RMT_TX_GPIO_NUM 18 // TX GPIO ----
|
||||
#define RMT_RX_GPIO_NUM 23 // RX GPIO ----
|
||||
|
||||
#define RMT_TX_CHANNEL 2 /*!< RMT channel for transmitter */
|
||||
#define RMT_RX_CHANNEL 3 /*!< RMT channel for receiver */
|
||||
#define RMT_CLK_DIV 80 /*!< RMT counter clock divider */
|
||||
#define RMT_TICK_10_US (80000000/RMT_CLK_DIV/100000) /*!< RMT counter value for 10 us.(Source clock is APB clock) */
|
||||
#define rmt_item32_tIMEOUT_US 9500 /*!< RMT receiver timeout value(us) */
|
||||
|
||||
|
||||
//HID Descriptor for GameCube Controller matching a DS4
|
||||
const uint8_t hid_descriptor_gamecube[] = {
|
||||
0x05, 0x01, // Usage Page (Generic Desktop Ctrls)
|
||||
0x09, 0x05, // Usage (Game Pad)
|
||||
0xA1, 0x01, // Collection (Application)
|
||||
//Padding
|
||||
0x95, 0x03, // REPORT_COUNT = 3
|
||||
0x75, 0x08, // REPORT_SIZE = 8
|
||||
0x81, 0x03, // INPUT = Cnst,Var,Abs
|
||||
//Sticks
|
||||
0x09, 0x30, // Usage (X)
|
||||
0x09, 0x31, // Usage (Y)
|
||||
0x09, 0x32, // Usage (Z)
|
||||
0x09, 0x35, // Usage (Rz)
|
||||
0x15, 0x00, // Logical Minimum (0)
|
||||
0x26, 0xFF, 0x00, // Logical Maximum (255)
|
||||
0x75, 0x08, // Report Size (8)
|
||||
0x95, 0x04, // Report Count (4)
|
||||
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
|
||||
//DPAD
|
||||
0x09, 0x39, // Usage (Hat switch)
|
||||
0x15, 0x00, // Logical Minimum (0)
|
||||
0x25, 0x07, // Logical Maximum (7)
|
||||
0x35, 0x00, // Physical Minimum (0)
|
||||
0x46, 0x3B, 0x01, // Physical Maximum (315)
|
||||
0x65, 0x14, // Unit (System: English Rotation, Length: Centimeter)
|
||||
0x75, 0x04, // Report Size (4)
|
||||
0x95, 0x01, // Report Count (1)
|
||||
0x81, 0x42, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,Null State)
|
||||
//Buttons
|
||||
0x65, 0x00, // Unit (None)
|
||||
0x05, 0x09, // Usage Page (Button)
|
||||
0x19, 0x01, // Usage Minimum (0x01)
|
||||
0x29, 0x0E, // Usage Maximum (0x0E)
|
||||
0x15, 0x00, // Logical Minimum (0)
|
||||
0x25, 0x01, // Logical Maximum (1)
|
||||
0x75, 0x01, // Report Size (1)
|
||||
0x95, 0x0E, // Report Count (14)
|
||||
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
|
||||
//Padding
|
||||
0x06, 0x00, 0xFF, // Usage Page (Vendor Defined 0xFF00)
|
||||
0x09, 0x20, // Usage (0x20)
|
||||
0x75, 0x06, // Report Size (6)
|
||||
0x95, 0x01, // Report Count (1)
|
||||
0x15, 0x00, // Logical Minimum (0)
|
||||
0x25, 0x7F, // Logical Maximum (127)
|
||||
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
|
||||
//Triggers
|
||||
0x05, 0x01, // Usage Page (Generic Desktop Ctrls)
|
||||
0x09, 0x33, // Usage (Rx)
|
||||
0x09, 0x34, // Usage (Ry)
|
||||
0x15, 0x00, // Logical Minimum (0)
|
||||
0x26, 0xFF, 0x00, // Logical Maximum (255)
|
||||
0x75, 0x08, // Report Size (8)
|
||||
0x95, 0x02, // Report Count (2)
|
||||
0x81, 0x02,
|
||||
0xc0
|
||||
};
|
||||
|
||||
//Based on https://www.psdevwiki.com/ps4/DS4-BT
|
||||
// - - - - Lx Ly Cx Cy B1 B2 0 LT RT
|
||||
static uint8_t send_report[] = { 0xa1, 0x11, 0xc0, 0x00, 0x7d, 0x7d, 0x7d, 0x7d, 0x08, 0, 0, 0, 0};
|
||||
|
||||
static uint8_t hid_service_buffer[400];
|
||||
static uint8_t device_id_sdp_service_buffer[400];
|
||||
static const char hid_device_name[] = "Wireless Controller";
|
||||
static btstack_packet_callback_registration_t hci_event_callback_registration;
|
||||
static uint16_t hid_cid = 0;
|
||||
|
||||
// Calibration
|
||||
static int lxcalib = 0;
|
||||
static int lycalib = 0;
|
||||
static int cxcalib = 0;
|
||||
static int cycalib = 0;
|
||||
static int lcalib = 0;
|
||||
static int rcalib = 0;
|
||||
//Buttons and sticks
|
||||
static uint8_t but1_send = 0;
|
||||
static uint8_t but2_send = 0;
|
||||
static uint8_t lx_send = 0;
|
||||
static uint8_t ly_send = 0;
|
||||
static uint8_t cx_send = 0;
|
||||
static uint8_t cy_send = 0;
|
||||
static uint8_t lt_send = 0;
|
||||
static uint8_t rt_send = 0;
|
||||
|
||||
//RMT Transmitter Init
|
||||
rmt_item32_t items[25];
|
||||
rmt_config_t rmt_tx;
|
||||
static void rmt_tx_init()
|
||||
{
|
||||
|
||||
rmt_tx.channel = RMT_TX_CHANNEL;
|
||||
rmt_tx.gpio_num = RMT_TX_GPIO_NUM;
|
||||
rmt_tx.mem_block_num = 1;
|
||||
rmt_tx.clk_div = RMT_CLK_DIV;
|
||||
rmt_tx.tx_config.loop_en = false;
|
||||
rmt_tx.tx_config.carrier_freq_hz = 24000000;
|
||||
rmt_tx.tx_config.carrier_level = 1;
|
||||
rmt_tx.tx_config.carrier_en = 0;
|
||||
rmt_tx.tx_config.idle_level = 1;
|
||||
rmt_tx.tx_config.idle_output_en = true;
|
||||
rmt_tx.rmt_mode = 0;
|
||||
rmt_config(&rmt_tx);
|
||||
rmt_driver_install(rmt_tx.channel, 0, 0);
|
||||
|
||||
//Fill items[] with console->controller command: 0100 0000 0000 0011 0000 0010
|
||||
|
||||
items[0].duration0 = 3;
|
||||
items[0].level0 = 0;
|
||||
items[0].duration1 = 1;
|
||||
items[0].level1 = 1;
|
||||
items[1].duration0 = 1;
|
||||
items[1].level0 = 0;
|
||||
items[1].duration1 = 3;
|
||||
items[1].level1 = 1;
|
||||
int j;
|
||||
for(j = 0; j < 12; j++) {
|
||||
items[j+2].duration0 = 3;
|
||||
items[j+2].level0 = 0;
|
||||
items[j+2].duration1 = 1;
|
||||
items[j+2].level1 = 1;
|
||||
}
|
||||
items[14].duration0 = 1;
|
||||
items[14].level0 = 0;
|
||||
items[14].duration1 = 3;
|
||||
items[14].level1 = 1;
|
||||
items[15].duration0 = 1;
|
||||
items[15].level0 = 0;
|
||||
items[15].duration1 = 3;
|
||||
items[15].level1 = 1;
|
||||
for(j = 0; j < 8; j++) {
|
||||
items[j+16].duration0 = 3;
|
||||
items[j+16].level0 = 0;
|
||||
items[j+16].duration1 = 1;
|
||||
items[j+16].level1 = 1;
|
||||
}
|
||||
items[24].duration0 = 1;
|
||||
items[24].level0 = 0;
|
||||
items[24].duration1 = 3;
|
||||
items[24].level1 = 1;
|
||||
|
||||
}
|
||||
|
||||
//RMT Receiver Init
|
||||
rmt_config_t rmt_rx;
|
||||
static void rmt_rx_init()
|
||||
{
|
||||
rmt_rx.channel = RMT_RX_CHANNEL;
|
||||
rmt_rx.gpio_num = RMT_RX_GPIO_NUM;
|
||||
rmt_rx.clk_div = RMT_CLK_DIV;
|
||||
rmt_rx.mem_block_num = 4;
|
||||
rmt_rx.rmt_mode = RMT_MODE_RX;
|
||||
rmt_rx.rx_config.idle_threshold = rmt_item32_tIMEOUT_US / 10 * (RMT_TICK_10_US);
|
||||
rmt_config(&rmt_rx);
|
||||
}
|
||||
|
||||
//Polls controller and formats response
|
||||
//GameCube Controller Protocol: http://www.int03.co.uk/crema/hardware/gamecube/gc-control.html
|
||||
static void get_buttons()
|
||||
{
|
||||
|
||||
uint8_t but1 = 0;
|
||||
uint8_t but2 = 0;
|
||||
uint8_t dpad = 0x08;//Released
|
||||
uint8_t lx = 0;
|
||||
uint8_t ly = 0;
|
||||
uint8_t cx = 0;
|
||||
uint8_t cy = 0;
|
||||
uint8_t lt = 0;
|
||||
uint8_t rt = 0;
|
||||
|
||||
//Sample and find calibration value for sticks
|
||||
int calib_loop = 0;
|
||||
int xsum = 0;
|
||||
int ysum = 0;
|
||||
int cxsum = 0;
|
||||
int cysum = 0;
|
||||
int lsum = 0;
|
||||
int rsum = 0;
|
||||
while(calib_loop < 5)
|
||||
{
|
||||
lx = 0;
|
||||
ly = 0;
|
||||
cx = 0;
|
||||
cy = 0;
|
||||
lt = 0;
|
||||
rt = 0;
|
||||
rmt_write_items(rmt_tx.channel, items, 25, 0);
|
||||
rmt_rx_start(rmt_rx.channel, 1);
|
||||
|
||||
vTaskDelay(10);
|
||||
|
||||
rmt_item32_t* item = (rmt_item32_t*) (RMT_CHANNEL_MEM(rmt_rx.channel));
|
||||
if(item[33].duration0 == 1 && item[27].duration0 == 1 && item[26].duration0 == 3 && item[25].duration0 == 3)
|
||||
{
|
||||
|
||||
//LEFT STICK X
|
||||
for(int x = 8; x > -1; x--)
|
||||
{
|
||||
if((item[x+41].duration0 == 1))
|
||||
{
|
||||
lx += pow(2, 8-x-1);
|
||||
}
|
||||
}
|
||||
|
||||
//LEFT STICK Y
|
||||
for(int x = 8; x > -1; x--)
|
||||
{
|
||||
if((item[x+49].duration0 == 1))
|
||||
{
|
||||
ly += pow(2, 8-x-1);
|
||||
}
|
||||
}
|
||||
//C STICK X
|
||||
for(int x = 8; x > -1; x--)
|
||||
{
|
||||
if((item[x+57].duration0 == 1))
|
||||
{
|
||||
cx += pow(2, 8-x-1);
|
||||
}
|
||||
}
|
||||
|
||||
//C STICK Y
|
||||
for(int x = 8; x > -1; x--)
|
||||
{
|
||||
if((item[x+65].duration0 == 1))
|
||||
{
|
||||
cy += pow(2, 8-x-1);
|
||||
}
|
||||
}
|
||||
|
||||
//R AN
|
||||
for(int x = 8; x > -1; x--)
|
||||
{
|
||||
if((item[x+73].duration0 == 1))
|
||||
{
|
||||
rt += pow(2, 8-x-1);
|
||||
}
|
||||
}
|
||||
|
||||
//L AN
|
||||
for(int x = 8; x > -1; x--)
|
||||
{
|
||||
if((item[x+81].duration0 == 1))
|
||||
{
|
||||
lt += pow(2, 8-x-1);
|
||||
}
|
||||
}
|
||||
|
||||
xsum += lx;
|
||||
ysum += ly;
|
||||
cxsum += cx;
|
||||
cysum += cy;
|
||||
lsum += lt;
|
||||
rsum += rt;
|
||||
calib_loop++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Set Stick Calibration
|
||||
lxcalib = 127-(xsum/5);
|
||||
lycalib = 127-(ysum/5);
|
||||
cxcalib = 127-(cxsum/5);
|
||||
cycalib = 127-(cysum/5);
|
||||
lcalib = 127-(lsum/5);
|
||||
rcalib = 127-(rsum/5);
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
but1 = 0;
|
||||
but2 = 0;
|
||||
dpad = 0x08;
|
||||
lx = 0;
|
||||
ly = 0;
|
||||
cx = 0;
|
||||
cy = 0;
|
||||
lt = 0;
|
||||
rt = 0;
|
||||
|
||||
//Write command to controller
|
||||
rmt_write_items(rmt_tx.channel, items, 25, 0);
|
||||
rmt_rx_start(rmt_rx.channel, 1);
|
||||
|
||||
vTaskDelay(6); //6ms between sample
|
||||
|
||||
rmt_item32_t* item = (rmt_item32_t*) (RMT_CHANNEL_MEM(rmt_rx.channel));
|
||||
|
||||
//Check first 3 bits and high bit at index 33
|
||||
if(item[33].duration0 == 1 && item[27].duration0 == 1 && item[26].duration0 == 3 && item[25].duration0 == 3)
|
||||
{
|
||||
|
||||
//Button report: first item is item[25]
|
||||
//0 0 1 S Y X B A
|
||||
//1 L R Z U D R L
|
||||
//Joystick X (8bit)
|
||||
//Joystick Y (8bit)
|
||||
//C-Stick X (8bit)
|
||||
//C-Stick Y (8bit)
|
||||
//L Trigger Analog (8/4bit)
|
||||
//R Trigger Analog (8/4bit)
|
||||
|
||||
//Buttons1
|
||||
if(item[32].duration0 == 1) but1 += 0x40;//A
|
||||
if(item[31].duration0 == 1) but1 += 0x20;//B
|
||||
if(item[30].duration0 == 1) but1 += 0x80;//X
|
||||
if(item[29].duration0 == 1) but1 += 0x10;//Y
|
||||
//DPAD
|
||||
if(item[40].duration0 == 1) dpad = 0x06;//L
|
||||
if(item[39].duration0 == 1) dpad = 0x02;//R
|
||||
if(item[38].duration0 == 1) dpad = 0x04;//D
|
||||
if(item[37].duration0 == 1) dpad = 0x00;//U
|
||||
|
||||
//Buttons2
|
||||
if(item[36].duration0 == 1) but2 += 0x02;//Z
|
||||
if(item[35].duration0 == 1) but2 += 0x08;//RB
|
||||
if(item[34].duration0 == 1) but2 += 0x04;//LB
|
||||
if(item[28].duration0 == 1) but2 += 0x20;//START/OPTIONS/+
|
||||
if(but2 == 0x22) but2 += 0x10;//Select = Z + Start
|
||||
|
||||
//LEFT STICK X
|
||||
for(int x = 8; x > -1; x--)
|
||||
{
|
||||
if(item[x+41].duration0 == 1)
|
||||
{
|
||||
lx += pow(2, 8-x-1);
|
||||
}
|
||||
}
|
||||
|
||||
//LEFT STICK Y
|
||||
for(int x = 8; x > -1; x--)
|
||||
{
|
||||
if(item[x+49].duration0 == 1)
|
||||
{
|
||||
ly += pow(2, 8-x-1);
|
||||
}
|
||||
}
|
||||
|
||||
//C STICK X
|
||||
for(int x = 8; x > -1; x--)
|
||||
{
|
||||
if(item[x+57].duration0 == 1)
|
||||
{
|
||||
cx += pow(2, 8-x-1);
|
||||
}
|
||||
}
|
||||
|
||||
//C STICK Y
|
||||
for(int x = 8; x > -1; x--)
|
||||
{
|
||||
if(item[x+65].duration0 == 1)
|
||||
{
|
||||
cy += pow(2, 8-x-1);
|
||||
}
|
||||
}
|
||||
|
||||
//R AN
|
||||
for(int x = 8; x > -1; x--)
|
||||
{
|
||||
if(item[x+73].duration0 == 1)
|
||||
{
|
||||
rt += pow(2, 8-x-1);
|
||||
}
|
||||
}
|
||||
|
||||
//L AN
|
||||
for(int x = 8; x > -1; x--)
|
||||
{
|
||||
if(item[x+81].duration0 == 1)
|
||||
{
|
||||
lt += pow(2, 8-x-1);
|
||||
}
|
||||
}
|
||||
|
||||
but1_send = but1 + dpad;
|
||||
but2_send = but2;
|
||||
lx_send = lx + lxcalib;
|
||||
ly_send = ly + lycalib;
|
||||
cx_send = cx + cxcalib;
|
||||
cy_send = cy + cycalib;
|
||||
lt_send = lt;
|
||||
rt_send = rt;
|
||||
|
||||
}else{
|
||||
//log_info("read fail");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t * packet, uint16_t packet_size){
|
||||
UNUSED(channel);
|
||||
UNUSED(packet_size);
|
||||
switch (packet_type){
|
||||
case HCI_EVENT_PACKET:
|
||||
switch (packet[0]){
|
||||
case HCI_EVENT_HID_META:
|
||||
switch (hci_event_hid_meta_get_subevent_code(packet)){
|
||||
case HID_SUBEVENT_CONNECTION_OPENED:
|
||||
if (hid_subevent_connection_opened_get_status(packet)) return;
|
||||
hid_cid = hid_subevent_connection_opened_get_hid_cid(packet);
|
||||
hid_device_request_can_send_now_event(hid_cid); //start loop
|
||||
log_info("HID Connected");
|
||||
break;
|
||||
case HID_SUBEVENT_CONNECTION_CLOSED:
|
||||
log_info("HID Disconnected");
|
||||
hid_cid = 0;
|
||||
break;
|
||||
case HID_SUBEVENT_CAN_SEND_NOW:
|
||||
send_report[4] = lx_send;
|
||||
send_report[5] = (0xff - ly_send);
|
||||
send_report[6] = cx_send;
|
||||
send_report[7] = (0xff - cy_send);
|
||||
send_report[8] = but1_send;
|
||||
send_report[9] = but2_send;
|
||||
send_report[11] = lt_send;
|
||||
send_report[12] = rt_send;
|
||||
hid_device_send_interrupt_message(hid_cid, &send_report[0], sizeof(send_report));
|
||||
hid_device_request_can_send_now_event(hid_cid);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Main */
|
||||
int btstack_main(int argc, const char * argv[]);
|
||||
int btstack_main(int argc, const char * argv[]){
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
//RMT init
|
||||
rmt_tx_init();
|
||||
rmt_rx_init();
|
||||
|
||||
//format button report from controller
|
||||
xTaskCreate(get_buttons, "get_buttons", 2048, NULL, 1, NULL);
|
||||
|
||||
// Wait for stick calibration
|
||||
vTaskDelay(200);
|
||||
|
||||
hci_event_callback_registration.callback = &packet_handler;
|
||||
hci_add_event_handler(&hci_event_callback_registration);
|
||||
hci_register_sco_packet_handler(&packet_handler);
|
||||
gap_discoverable_control(1);
|
||||
gap_set_class_of_device(0x2508);
|
||||
gap_set_local_name("Wireless Controller");
|
||||
|
||||
l2cap_init();
|
||||
sdp_init();
|
||||
memset(hid_service_buffer, 0, sizeof(hid_service_buffer));
|
||||
hid_create_sdp_record(hid_service_buffer, 0x10001, 0x2508, 33, 0, 0, 0, hid_descriptor_gamecube, sizeof(hid_descriptor_gamecube), hid_device_name);
|
||||
sdp_register_service(hid_service_buffer);
|
||||
device_id_create_sdp_record(device_id_sdp_service_buffer, 0x10003, DEVICE_ID_VENDOR_ID_SOURCE_BLUETOOTH, BLUETOOTH_COMPANY_ID_BLUEKITCHEN_GMBH, 1, 1);
|
||||
sdp_register_service(device_id_sdp_service_buffer);
|
||||
hid_device_init(1, sizeof(hid_descriptor_gamecube), hid_descriptor_gamecube);
|
||||
hid_device_register_packet_handler(&packet_handler);
|
||||
|
||||
hci_power_control(HCI_POWER_ON);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
10
Firmware/BlueCubeMod/main/component.mk
Normal file
10
Firmware/BlueCubeMod/main/component.mk
Normal file
@ -0,0 +1,10 @@
|
||||
#
|
||||
# Main component makefile.
|
||||
#
|
||||
# This Makefile can be left empty. By default, it will take the sources in the
|
||||
# src/ directory, compile them and link them into lib(subdirectory_name).a
|
||||
# in the build directory. This behaviour is entirely configurable,
|
||||
# please read the ESP-IDF documents if you need to do this.
|
||||
#
|
||||
CFLAGS += -Wno-format
|
||||
|
516
Firmware/BlueCubeMod/sdkconfig
Normal file
516
Firmware/BlueCubeMod/sdkconfig
Normal file
@ -0,0 +1,516 @@
|
||||
#
|
||||
# Automatically generated file. DO NOT EDIT.
|
||||
# Espressif IoT Development Framework (ESP-IDF) Project Configuration
|
||||
#
|
||||
CONFIG_IDF_TARGET="esp32"
|
||||
|
||||
#
|
||||
# SDK tool configuration
|
||||
#
|
||||
CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-"
|
||||
CONFIG_SDK_PYTHON="python"
|
||||
CONFIG_SDK_MAKE_WARN_UNDEFINED_VARIABLES=y
|
||||
CONFIG_APP_COMPILE_TIME_DATE=y
|
||||
# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set
|
||||
# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set
|
||||
# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set
|
||||
# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL_WARN=y
|
||||
# CONFIG_LOG_BOOTLOADER_LEVEL_INFO is not set
|
||||
# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set
|
||||
# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL=2
|
||||
# CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set
|
||||
CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y
|
||||
# CONFIG_BOOTLOADER_FACTORY_RESET is not set
|
||||
# CONFIG_BOOTLOADER_APP_TEST is not set
|
||||
CONFIG_BOOTLOADER_WDT_ENABLE=y
|
||||
# CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set
|
||||
CONFIG_BOOTLOADER_WDT_TIME_MS=9000
|
||||
# CONFIG_APP_ROLLBACK_ENABLE is not set
|
||||
# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set
|
||||
# CONFIG_SECURE_BOOT_ENABLED is not set
|
||||
# CONFIG_FLASH_ENCRYPTION_ENABLED is not set
|
||||
CONFIG_ESPTOOLPY_PORT="/dev/cu.usbserial-DO01EXOV"
|
||||
# CONFIG_ESPTOOLPY_BAUD_115200B is not set
|
||||
# CONFIG_ESPTOOLPY_BAUD_230400B is not set
|
||||
CONFIG_ESPTOOLPY_BAUD_921600B=y
|
||||
# CONFIG_ESPTOOLPY_BAUD_2MB is not set
|
||||
# CONFIG_ESPTOOLPY_BAUD_OTHER is not set
|
||||
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
|
||||
CONFIG_ESPTOOLPY_BAUD=921600
|
||||
# CONFIG_ESPTOOLPY_COMPRESSED is not set
|
||||
# CONFIG_FLASHMODE_QIO is not set
|
||||
# CONFIG_FLASHMODE_QOUT is not set
|
||||
CONFIG_FLASHMODE_DIO=y
|
||||
# CONFIG_FLASHMODE_DOUT is not set
|
||||
CONFIG_ESPTOOLPY_FLASHMODE="dio"
|
||||
# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
|
||||
# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
|
||||
CONFIG_ESPTOOLPY_BEFORE_RESET=y
|
||||
# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
|
||||
CONFIG_ESPTOOLPY_BEFORE="default_reset"
|
||||
CONFIG_ESPTOOLPY_AFTER_RESET=y
|
||||
# CONFIG_ESPTOOLPY_AFTER_NORESET is not set
|
||||
CONFIG_ESPTOOLPY_AFTER="hard_reset"
|
||||
# CONFIG_MONITOR_BAUD_9600B is not set
|
||||
# CONFIG_MONITOR_BAUD_57600B is not set
|
||||
CONFIG_MONITOR_BAUD_115200B=y
|
||||
# CONFIG_MONITOR_BAUD_230400B is not set
|
||||
# CONFIG_MONITOR_BAUD_921600B is not set
|
||||
# CONFIG_MONITOR_BAUD_2MB is not set
|
||||
# CONFIG_MONITOR_BAUD_OTHER is not set
|
||||
CONFIG_MONITOR_BAUD_OTHER_VAL=115200
|
||||
CONFIG_MONITOR_BAUD=115200
|
||||
CONFIG_PARTITION_TABLE_SINGLE_APP=y
|
||||
# CONFIG_PARTITION_TABLE_TWO_OTA is not set
|
||||
# CONFIG_PARTITION_TABLE_CUSTOM is not set
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
|
||||
CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv"
|
||||
CONFIG_PARTITION_TABLE_OFFSET=0x8000
|
||||
CONFIG_PARTITION_TABLE_MD5=y
|
||||
CONFIG_OPTIMIZATION_LEVEL_DEBUG=y
|
||||
# CONFIG_OPTIMIZATION_LEVEL_RELEASE is not set
|
||||
CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y
|
||||
# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set
|
||||
# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set
|
||||
# CONFIG_CXX_EXCEPTIONS is not set
|
||||
CONFIG_STACK_CHECK_NONE=y
|
||||
# CONFIG_STACK_CHECK_NORM is not set
|
||||
# CONFIG_STACK_CHECK_STRONG is not set
|
||||
# CONFIG_STACK_CHECK_ALL is not set
|
||||
# CONFIG_STACK_CHECK is not set
|
||||
# CONFIG_WARN_WRITE_STRINGS is not set
|
||||
# CONFIG_DISABLE_GCC8_WARNINGS is not set
|
||||
# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set
|
||||
CONFIG_ESP32_APPTRACE_DEST_NONE=y
|
||||
# CONFIG_ESP32_APPTRACE_ENABLE is not set
|
||||
CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y
|
||||
CONFIG_BT_ENABLED=y
|
||||
# CONFIG_BTDM_CONTROLLER_MODE_BLE_ONLY is not set
|
||||
# CONFIG_BTDM_CONTROLLER_MODE_BR_EDR_ONLY is not set
|
||||
CONFIG_BTDM_CONTROLLER_MODE_BTDM=y
|
||||
CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN=3
|
||||
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN=2
|
||||
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN=0
|
||||
CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=3
|
||||
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=2
|
||||
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0
|
||||
CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_0=y
|
||||
# CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_1 is not set
|
||||
CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0
|
||||
CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI=y
|
||||
# CONFIG_BTDM_CONTROLLER_HCI_MODE_UART_H4 is not set
|
||||
# CONFIG_BTDM_CONTROLLER_MODEM_SLEEP is not set
|
||||
CONFIG_BLE_SCAN_DUPLICATE=y
|
||||
CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR=y
|
||||
# CONFIG_SCAN_DUPLICATE_BY_ADV_DATA is not set
|
||||
# CONFIG_SCAN_DUPLICATE_BY_ADV_DATA_AND_DEVICE_ADDR is not set
|
||||
CONFIG_SCAN_DUPLICATE_TYPE=0
|
||||
CONFIG_DUPLICATE_SCAN_CACHE_SIZE=20
|
||||
# CONFIG_BLE_MESH_SCAN_DUPLICATE_EN is not set
|
||||
CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_SUPPORTED=y
|
||||
CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_NUM=100
|
||||
CONFIG_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
|
||||
# CONFIG_BLUEDROID_ENABLED is not set
|
||||
CONFIG_BT_RESERVE_DRAM=0xdb5c
|
||||
# CONFIG_ADC_FORCE_XPD_FSM is not set
|
||||
CONFIG_ADC2_DISABLE_DAC=y
|
||||
# CONFIG_SPI_MASTER_IN_IRAM is not set
|
||||
CONFIG_SPI_MASTER_ISR_IN_IRAM=y
|
||||
# CONFIG_SPI_SLAVE_IN_IRAM is not set
|
||||
CONFIG_SPI_SLAVE_ISR_IN_IRAM=y
|
||||
# CONFIG_EFUSE_CUSTOM_TABLE is not set
|
||||
# CONFIG_EFUSE_VIRTUAL is not set
|
||||
# CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set
|
||||
CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y
|
||||
# CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set
|
||||
CONFIG_EFUSE_MAX_BLK_LEN=192
|
||||
CONFIG_IDF_TARGET_ESP32=y
|
||||
# CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set
|
||||
CONFIG_ESP32_DEFAULT_CPU_FREQ_160=y
|
||||
# CONFIG_ESP32_DEFAULT_CPU_FREQ_240 is not set
|
||||
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160
|
||||
# CONFIG_SPIRAM_SUPPORT is not set
|
||||
# CONFIG_MEMMAP_TRACEMEM is not set
|
||||
# CONFIG_MEMMAP_TRACEMEM_TWOBANKS is not set
|
||||
# CONFIG_ESP32_TRAX is not set
|
||||
CONFIG_TRACEMEM_RESERVE_DRAM=0x0
|
||||
# CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set
|
||||
CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y
|
||||
CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4
|
||||
CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32
|
||||
CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2048
|
||||
CONFIG_MAIN_TASK_STACK_SIZE=4096
|
||||
CONFIG_IPC_TASK_STACK_SIZE=1024
|
||||
CONFIG_TIMER_TASK_STACK_SIZE=4096
|
||||
CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y
|
||||
# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set
|
||||
# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set
|
||||
# CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set
|
||||
# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set
|
||||
CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y
|
||||
# CONFIG_NEWLIB_NANO_FORMAT is not set
|
||||
CONFIG_CONSOLE_UART_DEFAULT=y
|
||||
# CONFIG_CONSOLE_UART_CUSTOM is not set
|
||||
# CONFIG_CONSOLE_UART_NONE is not set
|
||||
CONFIG_CONSOLE_UART_NUM=0
|
||||
CONFIG_CONSOLE_UART_BAUDRATE=115200
|
||||
# CONFIG_ULP_COPROC_ENABLED is not set
|
||||
CONFIG_ULP_COPROC_RESERVE_MEM=0
|
||||
CONFIG_ESP32_PANIC_PRINT_HALT=y
|
||||
# CONFIG_ESP32_PANIC_PRINT_REBOOT is not set
|
||||
# CONFIG_ESP32_PANIC_SILENT_REBOOT is not set
|
||||
# CONFIG_ESP32_PANIC_GDBSTUB is not set
|
||||
CONFIG_ESP32_DEBUG_OCDAWARE=y
|
||||
CONFIG_ESP32_DEBUG_STUBS_ENABLE=y
|
||||
# CONFIG_INT_WDT is not set
|
||||
# CONFIG_TASK_WDT is not set
|
||||
CONFIG_BROWNOUT_DET=y
|
||||
CONFIG_BROWNOUT_DET_LVL_SEL_0=y
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set
|
||||
CONFIG_BROWNOUT_DET_LVL=0
|
||||
CONFIG_REDUCE_PHY_TX_POWER=y
|
||||
CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y
|
||||
# CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set
|
||||
# CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set
|
||||
# CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set
|
||||
CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y
|
||||
# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL is not set
|
||||
# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC is not set
|
||||
# CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set
|
||||
CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024
|
||||
CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=0
|
||||
# CONFIG_ESP32_XTAL_FREQ_40 is not set
|
||||
# CONFIG_ESP32_XTAL_FREQ_26 is not set
|
||||
CONFIG_ESP32_XTAL_FREQ_AUTO=y
|
||||
CONFIG_ESP32_XTAL_FREQ=0
|
||||
# CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set
|
||||
# CONFIG_ESP_TIMER_PROFILING is not set
|
||||
# CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set
|
||||
CONFIG_ESP_ERR_TO_NAME_LOOKUP=y
|
||||
# CONFIG_PM_ENABLE is not set
|
||||
CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y
|
||||
CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y
|
||||
CONFIG_ADC_CAL_LUT_ENABLE=y
|
||||
# CONFIG_EVENT_LOOP_PROFILING is not set
|
||||
CONFIG_POST_EVENTS_FROM_ISR=y
|
||||
CONFIG_POST_EVENTS_FROM_IRAM_ISR=y
|
||||
CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y
|
||||
CONFIG_HTTPD_MAX_REQ_HDR_LEN=512
|
||||
CONFIG_HTTPD_MAX_URI_LEN=512
|
||||
CONFIG_HTTPD_ERR_RESP_NO_DELAY=y
|
||||
# CONFIG_OTA_ALLOW_HTTP is not set
|
||||
# CONFIG_SW_COEXIST_ENABLE is not set
|
||||
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10
|
||||
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32
|
||||
# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set
|
||||
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y
|
||||
CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1
|
||||
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32
|
||||
# CONFIG_ESP32_WIFI_CSI_ENABLED is not set
|
||||
CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y
|
||||
CONFIG_ESP32_WIFI_TX_BA_WIN=6
|
||||
CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y
|
||||
CONFIG_ESP32_WIFI_RX_BA_WIN=6
|
||||
CONFIG_ESP32_WIFI_NVS_ENABLED=y
|
||||
CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y
|
||||
# CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set
|
||||
CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752
|
||||
CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32
|
||||
# CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE is not set
|
||||
CONFIG_ESP32_WIFI_IRAM_OPT=y
|
||||
CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y
|
||||
# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set
|
||||
CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20
|
||||
CONFIG_ESP32_PHY_MAX_TX_POWER=20
|
||||
# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set
|
||||
CONFIG_ESP32_ENABLE_COREDUMP_TO_UART=y
|
||||
# CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE is not set
|
||||
CONFIG_ESP32_ENABLE_COREDUMP=y
|
||||
CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM=64
|
||||
CONFIG_ESP32_CORE_DUMP_UART_DELAY=0
|
||||
CONFIG_DMA_RX_BUF_NUM=10
|
||||
CONFIG_DMA_TX_BUF_NUM=10
|
||||
# CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE is not set
|
||||
CONFIG_EMAC_CHECK_LINK_PERIOD_MS=2000
|
||||
CONFIG_EMAC_TASK_PRIORITY=20
|
||||
CONFIG_EMAC_TASK_STACK_SIZE=3072
|
||||
# CONFIG_FATFS_CODEPAGE_DYNAMIC is not set
|
||||
CONFIG_FATFS_CODEPAGE_437=y
|
||||
# CONFIG_FATFS_CODEPAGE_720 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_737 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_771 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_775 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_850 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_852 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_855 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_857 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_860 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_861 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_862 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_863 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_864 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_865 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_866 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_869 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_932 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_936 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_949 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_950 is not set
|
||||
CONFIG_FATFS_CODEPAGE=437
|
||||
CONFIG_FATFS_LFN_NONE=y
|
||||
# CONFIG_FATFS_LFN_HEAP is not set
|
||||
# CONFIG_FATFS_LFN_STACK is not set
|
||||
CONFIG_FATFS_FS_LOCK=0
|
||||
CONFIG_FATFS_TIMEOUT_MS=10000
|
||||
CONFIG_FATFS_PER_FILE_CACHE=y
|
||||
CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150
|
||||
CONFIG_MB_MASTER_DELAY_MS_CONVERT=200
|
||||
CONFIG_MB_QUEUE_LENGTH=20
|
||||
CONFIG_MB_SERIAL_TASK_STACK_SIZE=2048
|
||||
CONFIG_MB_SERIAL_BUF_SIZE=256
|
||||
CONFIG_MB_SERIAL_TASK_PRIO=10
|
||||
# CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT is not set
|
||||
CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20
|
||||
CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20
|
||||
CONFIG_MB_CONTROLLER_STACK_SIZE=4096
|
||||
CONFIG_MB_EVENT_QUEUE_TIMEOUT=20
|
||||
CONFIG_MB_TIMER_PORT_ENABLED=y
|
||||
CONFIG_MB_TIMER_GROUP=0
|
||||
CONFIG_MB_TIMER_INDEX=0
|
||||
# CONFIG_FREERTOS_UNICORE is not set
|
||||
CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF
|
||||
CONFIG_FREERTOS_CORETIMER_0=y
|
||||
# CONFIG_FREERTOS_CORETIMER_1 is not set
|
||||
CONFIG_FREERTOS_HZ=1000
|
||||
# CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION is not set
|
||||
# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set
|
||||
# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set
|
||||
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y
|
||||
# CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set
|
||||
CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y
|
||||
CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=3
|
||||
CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y
|
||||
# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set
|
||||
# CONFIG_FREERTOS_ASSERT_DISABLE is not set
|
||||
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1024
|
||||
CONFIG_FREERTOS_ISR_STACKSIZE=1536
|
||||
# CONFIG_FREERTOS_LEGACY_HOOKS is not set
|
||||
CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16
|
||||
CONFIG_SUPPORT_STATIC_ALLOCATION=y
|
||||
# CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set
|
||||
CONFIG_TIMER_TASK_PRIORITY=4
|
||||
CONFIG_TIMER_TASK_STACK_DEPTH=2048
|
||||
CONFIG_TIMER_QUEUE_LENGTH=10
|
||||
CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0
|
||||
# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set
|
||||
# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set
|
||||
# CONFIG_FREERTOS_DEBUG_INTERNALS is not set
|
||||
CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y
|
||||
CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y
|
||||
CONFIG_HEAP_POISONING_DISABLED=y
|
||||
# CONFIG_HEAP_POISONING_LIGHT is not set
|
||||
# CONFIG_HEAP_POISONING_COMPREHENSIVE is not set
|
||||
CONFIG_HEAP_TRACING_OFF=y
|
||||
# CONFIG_HEAP_TRACING_STANDALONE is not set
|
||||
# CONFIG_HEAP_TRACING_TOHOST is not set
|
||||
# CONFIG_HEAP_TRACING is not set
|
||||
# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set
|
||||
CONFIG_LOG_DEFAULT_LEVEL_ERROR=y
|
||||
# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set
|
||||
# CONFIG_LOG_DEFAULT_LEVEL_INFO is not set
|
||||
# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set
|
||||
# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set
|
||||
CONFIG_LOG_DEFAULT_LEVEL=1
|
||||
CONFIG_LOG_COLORS=y
|
||||
# CONFIG_L2_TO_L3_COPY is not set
|
||||
# CONFIG_LWIP_IRAM_OPTIMIZATION is not set
|
||||
CONFIG_LWIP_MAX_SOCKETS=4
|
||||
# CONFIG_USE_ONLY_LWIP_SELECT is not set
|
||||
# CONFIG_LWIP_SO_REUSE is not set
|
||||
# CONFIG_LWIP_SO_RCVBUF is not set
|
||||
CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1
|
||||
# CONFIG_LWIP_IP_FRAG is not set
|
||||
# CONFIG_LWIP_IP_REASSEMBLY is not set
|
||||
# CONFIG_LWIP_STATS is not set
|
||||
CONFIG_LWIP_ETHARP_TRUST_IP_MAC=y
|
||||
CONFIG_ESP_GRATUITOUS_ARP=y
|
||||
CONFIG_GARP_TMR_INTERVAL=60
|
||||
CONFIG_TCPIP_RECVMBOX_SIZE=32
|
||||
# CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set
|
||||
# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set
|
||||
CONFIG_LWIP_DHCPS_LEASE_UNIT=60
|
||||
CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8
|
||||
# CONFIG_LWIP_AUTOIP is not set
|
||||
CONFIG_LWIP_NETIF_LOOPBACK=y
|
||||
CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8
|
||||
CONFIG_LWIP_MAX_ACTIVE_TCP=16
|
||||
CONFIG_LWIP_MAX_LISTENING_TCP=16
|
||||
CONFIG_TCP_MAXRTX=12
|
||||
CONFIG_TCP_SYNMAXRTX=6
|
||||
CONFIG_TCP_MSS=1436
|
||||
CONFIG_TCP_MSL=60000
|
||||
CONFIG_TCP_SND_BUF_DEFAULT=5744
|
||||
CONFIG_TCP_WND_DEFAULT=5744
|
||||
CONFIG_TCP_RECVMBOX_SIZE=6
|
||||
CONFIG_TCP_QUEUE_OOSEQ=y
|
||||
# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set
|
||||
CONFIG_TCP_OVERSIZE_MSS=y
|
||||
# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set
|
||||
# CONFIG_TCP_OVERSIZE_DISABLE is not set
|
||||
CONFIG_LWIP_MAX_UDP_PCBS=16
|
||||
CONFIG_UDP_RECVMBOX_SIZE=6
|
||||
CONFIG_TCPIP_TASK_STACK_SIZE=2560
|
||||
CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y
|
||||
# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set
|
||||
# CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set
|
||||
CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF
|
||||
# CONFIG_PPP_SUPPORT is not set
|
||||
# CONFIG_LWIP_MULTICAST_PING is not set
|
||||
# CONFIG_LWIP_BROADCAST_PING is not set
|
||||
CONFIG_LWIP_MAX_RAW_PCBS=16
|
||||
CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
|
||||
# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set
|
||||
# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set
|
||||
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384
|
||||
# CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN is not set
|
||||
# CONFIG_MBEDTLS_DEBUG is not set
|
||||
CONFIG_MBEDTLS_HARDWARE_AES=y
|
||||
CONFIG_MBEDTLS_HARDWARE_MPI=y
|
||||
CONFIG_MBEDTLS_MPI_USE_INTERRUPT=y
|
||||
CONFIG_MBEDTLS_HARDWARE_SHA=y
|
||||
CONFIG_MBEDTLS_HAVE_TIME=y
|
||||
# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set
|
||||
CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y
|
||||
# CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set
|
||||
# CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set
|
||||
# CONFIG_MBEDTLS_TLS_DISABLED is not set
|
||||
CONFIG_MBEDTLS_TLS_SERVER=y
|
||||
CONFIG_MBEDTLS_TLS_CLIENT=y
|
||||
CONFIG_MBEDTLS_TLS_ENABLED=y
|
||||
# CONFIG_MBEDTLS_PSK_MODES is not set
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y
|
||||
CONFIG_MBEDTLS_SSL_RENEGOTIATION=y
|
||||
# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set
|
||||
CONFIG_MBEDTLS_SSL_PROTO_TLS1=y
|
||||
CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y
|
||||
CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y
|
||||
# CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set
|
||||
CONFIG_MBEDTLS_SSL_ALPN=y
|
||||
CONFIG_MBEDTLS_SSL_SESSION_TICKETS=y
|
||||
CONFIG_MBEDTLS_AES_C=y
|
||||
# CONFIG_MBEDTLS_CAMELLIA_C is not set
|
||||
# CONFIG_MBEDTLS_DES_C is not set
|
||||
CONFIG_MBEDTLS_RC4_DISABLED=y
|
||||
# CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set
|
||||
# CONFIG_MBEDTLS_RC4_ENABLED is not set
|
||||
# CONFIG_MBEDTLS_BLOWFISH_C is not set
|
||||
# CONFIG_MBEDTLS_XTEA_C is not set
|
||||
CONFIG_MBEDTLS_CCM_C=y
|
||||
CONFIG_MBEDTLS_GCM_C=y
|
||||
# CONFIG_MBEDTLS_RIPEMD160_C is not set
|
||||
CONFIG_MBEDTLS_PEM_PARSE_C=y
|
||||
CONFIG_MBEDTLS_PEM_WRITE_C=y
|
||||
CONFIG_MBEDTLS_X509_CRL_PARSE_C=y
|
||||
CONFIG_MBEDTLS_X509_CSR_PARSE_C=y
|
||||
CONFIG_MBEDTLS_ECP_C=y
|
||||
CONFIG_MBEDTLS_ECDH_C=y
|
||||
CONFIG_MBEDTLS_ECDSA_C=y
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y
|
||||
CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y
|
||||
CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y
|
||||
CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y
|
||||
CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y
|
||||
CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y
|
||||
CONFIG_MBEDTLS_ECP_NIST_OPTIM=y
|
||||
CONFIG_MDNS_MAX_SERVICES=10
|
||||
CONFIG_MQTT_PROTOCOL_311=y
|
||||
CONFIG_MQTT_TRANSPORT_SSL=y
|
||||
CONFIG_MQTT_TRANSPORT_WEBSOCKET=y
|
||||
CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y
|
||||
# CONFIG_MQTT_USE_CUSTOM_CONFIG is not set
|
||||
# CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set
|
||||
# CONFIG_MQTT_CUSTOM_OUTBOX is not set
|
||||
# CONFIG_OPENSSL_DEBUG is not set
|
||||
CONFIG_OPENSSL_ASSERT_DO_NOTHING=y
|
||||
# CONFIG_OPENSSL_ASSERT_EXIT is not set
|
||||
CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5
|
||||
CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=2048
|
||||
CONFIG_PTHREAD_STACK_MIN=768
|
||||
CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y
|
||||
# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set
|
||||
# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set
|
||||
CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1
|
||||
CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread"
|
||||
# CONFIG_SPI_FLASH_VERIFY_WRITE is not set
|
||||
# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set
|
||||
CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y
|
||||
CONFIG_SPIFFS_MAX_PARTITIONS=3
|
||||
CONFIG_SPIFFS_CACHE=y
|
||||
CONFIG_SPIFFS_CACHE_WR=y
|
||||
# CONFIG_SPIFFS_CACHE_STATS is not set
|
||||
CONFIG_SPIFFS_PAGE_CHECK=y
|
||||
CONFIG_SPIFFS_GC_MAX_RUNS=10
|
||||
# CONFIG_SPIFFS_GC_STATS is not set
|
||||
CONFIG_SPIFFS_PAGE_SIZE=256
|
||||
CONFIG_SPIFFS_OBJ_NAME_LEN=32
|
||||
CONFIG_SPIFFS_USE_MAGIC=y
|
||||
CONFIG_SPIFFS_USE_MAGIC_LENGTH=y
|
||||
CONFIG_SPIFFS_META_LENGTH=4
|
||||
CONFIG_SPIFFS_USE_MTIME=y
|
||||
# CONFIG_SPIFFS_DBG is not set
|
||||
# CONFIG_SPIFFS_API_DBG is not set
|
||||
# CONFIG_SPIFFS_GC_DBG is not set
|
||||
# CONFIG_SPIFFS_CACHE_DBG is not set
|
||||
# CONFIG_SPIFFS_CHECK_DBG is not set
|
||||
# CONFIG_SPIFFS_TEST_VISUALISATION is not set
|
||||
CONFIG_IP_LOST_TIMER_INTERVAL=120
|
||||
CONFIG_TCPIP_LWIP=y
|
||||
CONFIG_UNITY_ENABLE_FLOAT=y
|
||||
CONFIG_UNITY_ENABLE_DOUBLE=y
|
||||
# CONFIG_UNITY_ENABLE_COLOR is not set
|
||||
CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y
|
||||
# CONFIG_UNITY_ENABLE_FIXTURE is not set
|
||||
CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y
|
||||
CONFIG_SUPPORT_TERMIOS=y
|
||||
CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1
|
||||
CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128
|
||||
# CONFIG_WL_SECTOR_SIZE_512 is not set
|
||||
CONFIG_WL_SECTOR_SIZE_4096=y
|
||||
CONFIG_WL_SECTOR_SIZE=4096
|
||||
# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set
|
||||
|
||||
# Deprecated options for backward compatibility
|
||||
CONFIG_TOOLPREFIX="xtensa-esp32-elf-"
|
||||
CONFIG_PYTHON="python"
|
||||
CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y
|
||||
# End of deprecated options
|
3
Firmware/BlueCubeMod/set_port.sh
Executable file
3
Firmware/BlueCubeMod/set_port.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
PORT=$1
|
||||
sed -i "/CONFIG_ESPTOOLPY_PORT/c\CONFIG_ESPTOOLPY_PORT=\"$PORT\"" sdkconfig
|
Loading…
Reference in New Issue
Block a user