Skip to content

Instantly share code, notes, and snippets.

@mws-rmain
mws-rmain / gatts_demo.c
Created April 17, 2019 12:12
ESP32 GATTS_DEMO (server) modified to illustrate failure to handle indicate/notify of long attributes
/*
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
/****************************************************************************
*
QueueHandle_t gMsgGPS = NULL;
#define RX_DATA_SZ 63
/*
---------------------------------------------------------------------------*/
static void gps_rx_task(void *arg)
{
struct ST_GPS_MSG msg;
static uint8_t data[RX_DATA_SZ+1];
uint8_t *pCh;
@mws-rmain
mws-rmain / i2c_restart_main.c
Created April 2, 2018 19:06
ESP32 I2C example using ESP32 as I2C master, and a I2C device with a registered interface (requires I2C restart to read register value)
/* i2c_restart - Example
For other examples please check:
https://github.com/espressif/esp-idf/tree/master/examples
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.