Skip to content

Instantly share code, notes, and snippets.

@chegewara
chegewara / main.c
Created December 11, 2021 12:36
usb host test app
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
#include "usb/usb_host.h"
usb_host_client_handle_t client_hdl;
uint8_t dev_addr = 2;
usb_device_handle_t dev_hdl;
TaskHandle_t async_task_handle;
@chegewara
chegewara / io_demo_afr.c
Created June 28, 2019 20:38
heap test in afr
/**
* @file iot_demo_afr.c
* @brief Generic demo runner for C SDK libraries on Amazon FreeRTOS.
*/
/* The config header is always included first. */
#include "iot_config.h"
#include <string.h>
#include "aws_clientcredential.h"
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 6 columns, instead of 2. in line 1.
# Name, Type, SubType, Offset, Size, Flags
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 3M
/*
* BLEScan.cpp
*
* Created on: Jul 1, 2017
* Author: kolban
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
/**
* A BLE client example that is rich in capabilities.
*/
#include "BLEDevice.h"
//#include "BLEScan.h"
// The remote service we wish to connect to.
static BLEUUID serviceUUID("91bad492-b950-4226-aa2b-4ede9fa42f59");
// The characteristic of the remote service we are interested in.
@chegewara
chegewara / HID_mouse.ino
Last active July 30, 2022 04:43
ESP32 arduino library with new HID class
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
#include "BLE2902.h"
#include "BLEHIDDevice.h"
#include "HIDTypes.h"
#include <driver/adc.h>
static BLEHIDDevice* hid;
#
# Automatically generated file; DO NOT EDIT.
# Espressif IoT Development Framework Configuration
#
#
# SDK tool configuration
#
CONFIG_TOOLPREFIX="xtensa-esp32-elf-"
CONFIG_PYTHON="python"
#
# Automatically generated file; DO NOT EDIT.
# Espressif IoT Development Framework Configuration
#
#
# SDK tool configuration
#
CONFIG_TOOLPREFIX="xtensa-esp32-elf-"
CONFIG_PYTHON="python"