Unverified Commit a8e99bae authored by Me No Dev's avatar Me No Dev Committed by GitHub

Merge branch 'master' into idf-release/v3.3

parents 7494c4e7 b6cc108d
......@@ -88,7 +88,7 @@
#define bitRead(value, bit) (((value) >> (bit)) & 0x01)
#define bitSet(value, bit) ((value) |= (1UL << (bit)))
#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit))
#define bitWrite(value, bit, bitvalue) ((bitvalue) ? bitSet(value, bit) : bitClear(value, bit))
// avr-libc defines _NOP() since 1.6.2
#ifndef _NOP
......
......@@ -53,6 +53,8 @@ typedef unsigned long prog_uint32_t;
*(void * const *)(_addr); \
})
#define pgm_get_far_address(x) ((uint32_t)(&(x)))
#define pgm_read_byte_near(addr) pgm_read_byte(addr)
#define pgm_read_word_near(addr) pgm_read_word(addr)
#define pgm_read_dword_near(addr) pgm_read_dword(addr)
......
......@@ -194,6 +194,7 @@ BLECharacteristic* BLEHIDDevice::protocolMode() {
void BLEHIDDevice::setBatteryLevel(uint8_t level) {
m_batteryLevelCharacteristic->setValue(&level, 1);
m_batteryLevelCharacteristic->notify();
}
/*
* @brief Returns battery level characteristic
......
......@@ -607,8 +607,9 @@ DRESULT ff_sd_write(uint8_t pdrv, const uint8_t* buffer, DWORD sector, UINT coun
if (count > 1) {
res = sdWriteSectors(pdrv, (const char*)buffer, sector, count) ? RES_OK : RES_ERROR;
} else {
res = sdWriteSector(pdrv, (const char*)buffer, sector) ? RES_OK : RES_ERROR;
}
res = sdWriteSector(pdrv, (const char*)buffer, sector) ? RES_OK : RES_ERROR;
return res;
}
......
......@@ -33,9 +33,10 @@
#undef IPADDR_NONE
#include "WiFi.h"
wifi_prov_mgr_config_t config;
scheme_t prov_scheme;
extern esp_err_t postToSysQueue(system_prov_event_t *);
static wifi_prov_mgr_config_t config;
static scheme_t prov_scheme;
static const uint8_t custom_service_uuid[16] = { 0xb4, 0xdf, 0x5a, 0x1c, 0x3f, 0x6b, 0xf4, 0xbf,
0xea, 0x4a, 0x82, 0x03, 0x04, 0x90, 0x1a, 0x02, };
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = -1;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
#define MTDO 15
#define MTDI 12
......
......@@ -14,6 +14,7 @@
static const uint8_t LED_BUILTIN = 2;
static const uint8_t LED_BUILTINB = 4;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
#define BUILTIN_LED2 LED_BUILTINB
static const uint8_t TX = 1;
......
......@@ -15,6 +15,7 @@
static const uint8_t LED_BUILTIN = 23;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 1;
static const uint8_t RX = 3;
......
......@@ -6,6 +6,7 @@
static const uint8_t LED_BUILTIN = 2;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t _VBAT = 35; // battery voltage
#define PIN_WIRE_SDA SDA // backward compatibility
......
......@@ -6,6 +6,7 @@
static const uint8_t LED_BUILTIN = 5;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t _VBAT = 35; // battery voltage
#endif /* Pins_Arduino_h */
......@@ -6,6 +6,7 @@
static const uint8_t LED_BUILTIN = 5;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t _VBAT = 35; // battery voltage
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 2;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 1;
static const uint8_t RX = 3;
......
......@@ -18,6 +18,7 @@
static const uint8_t LED_BUILTIN = 33;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 34;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 5;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 1;
static const uint8_t RX = 3;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 5;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 13;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 17;
static const uint8_t RX = 16;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 5;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -17,6 +17,7 @@
static const uint8_t LED_BUILTIN = 15;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 1;
static const uint8_t RX = 3;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 16;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t BUILTIN_KEY = 0;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 13;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 17;
static const uint8_t RX = 16;
......
......@@ -15,6 +15,7 @@ typedef unsigned char uint8_t;
static const uint8_t LED_BUILTIN = 2;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
......
......@@ -24,6 +24,7 @@
static const uint8_t LED_BUILTIN = 0; // ->2812 RGB !!!
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
#define ANT_SELECT 21 // GPIO21 - WiFi external / internal antenna switch
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 15;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 17;
......
......@@ -17,6 +17,7 @@
static const uint8_t LED_BUILTIN = 25;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -17,6 +17,7 @@
static const uint8_t LED_BUILTIN = 25;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -17,6 +17,7 @@
static const uint8_t LED_BUILTIN = 25;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -17,6 +17,7 @@
static const uint8_t LED_BUILTIN = 25;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 2;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t BUILTIN_KEY = 0;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 13;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -23,6 +23,7 @@
/* LED_BUILTIN is kept for compatibility reason; mapped to LED2 on the LogSens V1.1 Board */
static const uint8_t LED_BUILTIN = 33;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
/* UART0: Serial Port for Programming and Debugging on the LogSens V1.1 Board */
static const uint8_t TX = 1;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 4;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t RGB_R_BUILTIN = 27;
static const uint8_t RGB_G_BUILTIN = 21;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 5;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
......
......@@ -24,6 +24,7 @@
static const uint8_t LED_BUILTIN = 0; // ->2812 RGB !!!
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
#define ANT_SELECT 16 // GPIO16 - External Antenna Switch
......
......@@ -24,6 +24,7 @@
static const uint8_t LED_BUILTIN = 0; // ->2812 RGB !!!
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
#define ANT_SELECT 21 // GPIO21 - External Antenna Switch
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 2;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 4;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 1;
static const uint8_t RX = 3;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 18;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
// IR receiver
static const uint8_t IR = 27;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 2;
#define BUILTIN_LED LED_BUILTIN
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 1;
static const uint8_t RX = 3;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 2;
#define BUILTIN_LED LED_BUILTIN
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 1;
static const uint8_t RX = 3;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 16;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t BUILTIN_KEY = 0;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 2;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 2;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 2;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 1;
static const uint8_t RX = 3;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 5;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 16;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 1;
static const uint8_t RX = 3;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 13;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 17;
static const uint8_t RX = 16;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 2;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 16;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
......
......@@ -26,6 +26,7 @@ static const uint8_t KEY_BUILTIN = 39;
static const uint8_t LED_BUILTIN = 14;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 1;
static const uint8_t RX = 3;
......
......@@ -26,6 +26,7 @@
static const uint8_t LED_BUILTIN = 2;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -32,6 +32,7 @@
static const uint8_t LED_BUILTIN = 22;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -40,6 +40,7 @@
static const uint8_t LED_BUILTIN = 25 ;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -16,6 +16,7 @@ static const uint8_t RX = 3;
static const uint8_t LED_BUILTIN = 22;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t SDA = 21;
// Despite the many diagrams from TTGO showing SCL on pin 22, due to the on-board LED
......
......@@ -14,6 +14,7 @@
// LED
static const uint8_t LED_BUILTIN = 13;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
// UART
static const uint8_t TX = 10;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 2;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 1;
static const uint8_t RX = 3;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 25;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 2;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t KEY_BUILTIN = 0;
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 0; // ->2812 RGB !!!
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
#define ANT_SELECT 21 // GPIO21 - External Antenna Switch
......
......@@ -13,6 +13,7 @@
static const uint8_t LED_BUILTIN = 27;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
static const uint8_t TX = 1;
static const uint8_t RX = 3;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment