Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
努力学习的小马
arduino-esp32
提交
d40dfa27
A
arduino-esp32
项目概览
努力学习的小马
/
arduino-esp32
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
arduino-esp32
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
d40dfa27
编写于
6月 10, 2021
作者:
M
Me No Dev
提交者:
GitHub
6月 10, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into feature/ftm_support
上级
1f4f99b3
5ae3e836
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
138 addition
and
25 deletion
+138
-25
boards.txt
boards.txt
+57
-0
cores/esp32/esp32-hal-adc.c
cores/esp32/esp32-hal-adc.c
+3
-19
libraries/WiFi/src/WiFiAP.cpp
libraries/WiFi/src/WiFiAP.cpp
+7
-0
libraries/WiFi/src/WiFiMulti.cpp
libraries/WiFi/src/WiFiMulti.cpp
+2
-2
libraries/Wire/src/Wire.h
libraries/Wire/src/Wire.h
+3
-1
platform.txt
platform.txt
+14
-3
variants/esp32-trueverit-iot-driver-mkii/pins_arduino.h
variants/esp32-trueverit-iot-driver-mkii/pins_arduino.h
+52
-0
未找到文件。
boards.txt
浏览文件 @
d40dfa27
...
...
@@ -8795,3 +8795,60 @@ esp32-trueverit-iot-driver.menu.DebugLevel.verbose=Verbose
esp32-trueverit-iot-driver.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
esp32-trueverit-iot-driver-mkii.name=Trueverit ESP32 Universal IoT Driver MK II
esp32-trueverit-iot-driver-mkii.upload.tool=esptool_py
esp32-trueverit-iot-driver-mkii.upload.maximum_size=1310720
esp32-trueverit-iot-driver-mkii.upload.maximum_data_size=327680
esp32-trueverit-iot-driver-mkii.upload.flags=
esp32-trueverit-iot-driver-mkii.upload.extra_flags=
esp32-trueverit-iot-driver-mkii.serial.disableDTR=true
esp32-trueverit-iot-driver-mkii.serial.disableRTS=true
esp32-trueverit-iot-driver-mkii.build.tarch=xtensa
esp32-trueverit-iot-driver-mkii.build.bootloader_addr=0x1000
esp32-trueverit-iot-driver-mkii.build.target=esp32
esp32-trueverit-iot-driver-mkii.build.mcu=esp32
esp32-trueverit-iot-driver-mkii.build.core=esp32
esp32-trueverit-iot-driver-mkii.build.variant=esp32-trueverit-iot-driver-mkii
esp32-trueverit-iot-driver-mkii.build.board=Trueverit_ESP32_Universal_IoT_Driver_MK_II
esp32-trueverit-iot-driver-mkii.build.f_cpu=240000000L
esp32-trueverit-iot-driver-mkii.build.flash_mode=dio
esp32-trueverit-iot-driver-mkii.build.flash_size=4MB
esp32-trueverit-iot-driver-mkii.build.boot=dio
esp32-trueverit-iot-driver-mkii.build.partitions=default
esp32-trueverit-iot-driver-mkii.build.defines=
esp32-trueverit-iot-driver-mkii.menu.FlashFreq.80=80MHz
esp32-trueverit-iot-driver-mkii.menu.FlashFreq.80.build.flash_freq=80m
esp32-trueverit-iot-driver-mkii.menu.FlashFreq.40=40MHz
esp32-trueverit-iot-driver-mkii.menu.FlashFreq.40.build.flash_freq=40m
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.115200=115200
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.115200.upload.speed=115200
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.256000.windows=256000
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.256000.upload.speed=256000
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.230400.windows.upload.speed=256000
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.230400=230400
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.230400.upload.speed=230400
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.460800.linux=460800
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.460800.macosx=460800
esp32-trueverit-iot-driver-mkii.menu.UploadSpeed.460800.upload.speed=460800
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.none=None
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.none.build.code_debug=0
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.error=Error
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.error.build.code_debug=1
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.warn=Warn
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.warn.build.code_debug=2
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.info=Info
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.info.build.code_debug=3
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.debug=Debug
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.debug.build.code_debug=4
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.verbose=Verbose
esp32-trueverit-iot-driver-mkii.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
\ No newline at end of file
cores/esp32/esp32-hal-adc.c
浏览文件 @
d40dfa27
...
...
@@ -245,28 +245,12 @@ void __analogSetVRefPin(uint8_t pin){
__analogVRefPin
=
pin
;
}
int
__hallRead
()
//hall sensor
without LNA
int
__hallRead
()
//hall sensor
using idf read
{
int
Sens_Vp0
;
int
Sens_Vn0
;
int
Sens_Vp1
;
int
Sens_Vn1
;
pinMode
(
36
,
ANALOG
);
pinMode
(
39
,
ANALOG
);
SET_PERI_REG_MASK
(
SENS_SAR_TOUCH_CTRL1_REG
,
SENS_XPD_HALL_FORCE_M
);
// hall sens force enable
SET_PERI_REG_MASK
(
RTC_IO_HALL_SENS_REG
,
RTC_IO_XPD_HALL
);
// xpd hall
SET_PERI_REG_MASK
(
SENS_SAR_TOUCH_CTRL1_REG
,
SENS_HALL_PHASE_FORCE_M
);
// phase force
CLEAR_PERI_REG_MASK
(
RTC_IO_HALL_SENS_REG
,
RTC_IO_HALL_PHASE
);
// hall phase
Sens_Vp0
=
__analogRead
(
36
);
Sens_Vn0
=
__analogRead
(
39
);
SET_PERI_REG_MASK
(
RTC_IO_HALL_SENS_REG
,
RTC_IO_HALL_PHASE
);
Sens_Vp1
=
__analogRead
(
36
);
Sens_Vn1
=
__analogRead
(
39
);
SET_PERI_REG_BITS
(
SENS_SAR_MEAS_WAIT2_REG
,
SENS_FORCE_XPD_SAR
,
0
,
SENS_FORCE_XPD_SAR_S
);
CLEAR_PERI_REG_MASK
(
SENS_SAR_TOUCH_CTRL1_REG
,
SENS_XPD_HALL_FORCE
);
CLEAR_PERI_REG_MASK
(
SENS_SAR_TOUCH_CTRL1_REG
,
SENS_HALL_PHASE_FORCE
);
return
(
Sens_Vp1
-
Sens_Vp0
)
-
(
Sens_Vn1
-
Sens_Vn0
);
__analogSetWidth
(
12
);
return
hall_sensor_read
();
}
#endif
...
...
libraries/WiFi/src/WiFiAP.cpp
浏览文件 @
d40dfa27
...
...
@@ -69,12 +69,18 @@ static bool softap_config_equal(const wifi_config_t& lhs, const wifi_config_t& r
if
(
lhs
.
ap
.
channel
!=
rhs
.
ap
.
channel
)
{
return
false
;
}
if
(
lhs
.
ap
.
authmode
!=
rhs
.
ap
.
authmode
)
{
return
false
;
}
if
(
lhs
.
ap
.
ssid_hidden
!=
rhs
.
ap
.
ssid_hidden
)
{
return
false
;
}
if
(
lhs
.
ap
.
max_connection
!=
rhs
.
ap
.
max_connection
)
{
return
false
;
}
if
(
lhs
.
ap
.
pairwise_cipher
!=
rhs
.
ap
.
pairwise_cipher
)
{
return
false
;
}
if
(
lhs
.
ap
.
ftm_responder
!=
rhs
.
ap
.
ftm_responder
)
{
return
false
;
}
...
...
@@ -96,6 +102,7 @@ void wifi_softap_config(wifi_config_t *wifi_config, const char * ssid=NULL, cons
wifi_config
->
ap
.
ssid_len
=
strlen
(
ssid
);
if
(
password
!=
NULL
&&
password
[
0
]
!=
0
){
wifi_config
->
ap
.
authmode
=
authmode
;
wifi_config
->
ap
.
pairwise_cipher
=
WIFI_CIPHER_TYPE_CCMP
;
// Disable by default enabled insecure TKIP and use just CCMP.
snprintf
((
char
*
)
wifi_config
->
ap
.
password
,
64
,
password
);
}
}
...
...
libraries/WiFi/src/WiFiMulti.cpp
浏览文件 @
d40dfa27
...
...
@@ -128,8 +128,8 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout)
WiFi
.
getNetworkInfo
(
i
,
ssid_scan
,
sec_scan
,
rssi_scan
,
BSSID_scan
,
chan_scan
);
bool
known
=
false
;
for
(
uint32_t
x
=
0
;
x
<
APlist
.
size
();
x
++
)
{
WifiAPlist_t
entry
=
APlist
[
x
];
for
(
uint32_t
x
=
APlist
.
size
()
;
x
>
0
;
x
--
)
{
WifiAPlist_t
entry
=
APlist
[
x
-
1
];
if
(
ssid_scan
==
entry
.
ssid
)
{
// SSID match
known
=
true
;
...
...
libraries/Wire/src/Wire.h
浏览文件 @
d40dfa27
...
...
@@ -31,7 +31,9 @@
#include "Stream.h"
#define STICKBREAKER 'V1.1.0'
#define I2C_BUFFER_LENGTH 128
#ifndef I2C_BUFFER_LENGTH
#define I2C_BUFFER_LENGTH 128
#endif
typedef
void
(
*
user_onRequest
)(
void
);
typedef
void
(
*
user_onReceive
)(
uint8_t
*
,
int
);
...
...
platform.txt
浏览文件 @
d40dfa27
...
...
@@ -111,6 +111,10 @@ build.loop_core=
build.event_core=
build.extra_flags=-DESP32 -DCORE_DEBUG_LEVEL={build.code_debug} {build.loop_core} {build.event_core} {build.defines} {build.extra_flags.{build.mcu}}
# Custom build options
build.opt.name=build_opt.h
build.opt.path={build.path}/{build.opt.name}
# Check if custom partitions exist: source > variant > build.partitions
recipe.hooks.prebuild.1.pattern=bash -c "[ ! -f "{build.source.path}"/partitions.csv ] || cp -f "{build.source.path}"/partitions.csv "{build.path}"/partitions.csv"
recipe.hooks.prebuild.2.pattern=bash -c "[ -f "{build.path}"/partitions.csv ] || [ ! -f "{build.variant.path}"/partitions.csv ] || cp "{build.variant.path}"/partitions.csv "{build.path}"/partitions.csv"
...
...
@@ -124,14 +128,21 @@ recipe.hooks.prebuild.3.pattern.windows=cmd /c if not exist "{build.path}\partit
recipe.hooks.prebuild.4.pattern=bash -c "[ -f "{build.source.path}"/bootloader.bin ] && cp -f "{build.source.path}"/bootloader.bin "{build.path}"/{build.project_name}.bootloader.bin || ( [ -f "{build.variant.path}"/bootloader.bin ] && cp "{build.variant.path}"/bootloader.bin "{build.path}"/{build.project_name}.bootloader.bin || cp -f "{runtime.platform.path}"/tools/sdk/{build.mcu}/bin/bootloader_{build.boot}_{build.flash_freq}.bin "{build.path}"/{build.project_name}.bootloader.bin )"
recipe.hooks.prebuild.4.pattern.windows=cmd /c IF EXIST "{build.source.path}\bootloader.bin" ( COPY /y "{build.source.path}\bootloader.bin" "{build.path}\{build.project_name}.bootloader.bin" ) ELSE ( IF EXIST "{build.variant.path}\bootloader.bin" ( COPY "{build.variant.path}\bootloader.bin" "{build.path}\{build.project_name}.bootloader.bin" ) ELSE ( COPY /y "{runtime.platform.path}\tools\sdk\{build.mcu}\bin\bootloader_{build.boot}_{build.flash_freq}.bin" "{build.path}\{build.project_name}.bootloader.bin" ) )
# Check if custom build options exist in the sketch folder
recipe.hooks.prebuild.5.pattern=bash -c "[ ! -f "{build.source.path}"/build_opt.h ] || cp -f "{build.source.path}"/build_opt.h "{build.path}"/build_opt.h"
recipe.hooks.prebuild.6.pattern=bash -c "[ -f "{build.path}"/build_opt.h ] || touch "{build.path}"/build_opt.h"
recipe.hooks.prebuild.5.pattern.windows=cmd /c if exist "{build.source.path}\build_opt.h" COPY /y "{build.source.path}\build_opt.h" "{build.path}\build_opt.h"
recipe.hooks.prebuild.6.pattern.windows=cmd /c if not exist "{build.path}\build_opt.h" type nul > "{build.path}\build_opt.h"
## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" -DARDUINO_VARIANT="{build.variant}" {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" -DARDUINO_VARIANT="{build.variant}" {compiler.c.extra_flags} {build.extra_flags}
"@{build.opt.path}"
{includes} "{source_file}" -o "{object_file}"
## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpreprocessor.flags} {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" -DARDUINO_VARIANT="{build.variant}" {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpreprocessor.flags} {compiler.cpp.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" -DARDUINO_VARIANT="{build.variant}" {compiler.cpp.extra_flags} {build.extra_flags}
"@{build.opt.path}"
{includes} "{source_file}" -o "{object_file}"
## Compile S files
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" -DARDUINO_VARIANT="{build.variant}" {compiler.S.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" -DARDUINO_VARIANT="{build.variant}" {compiler.S.extra_flags} {build.extra_flags}
"@{build.opt.path}"
{includes} "{source_file}" -o "{object_file}"
## Create archives
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
...
...
variants/esp32-trueverit-iot-driver-mkii/pins_arduino.h
0 → 100644
浏览文件 @
d40dfa27
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <stdint.h>
static
const
uint8_t
LED_BUILTIN
=
18
;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define EXTERNAL_NUM_INTERRUPTS 16
#define NUM_DIGITAL_PINS 40
#define NUM_ANALOG_INPUTS 16
#define analogInputToDigitalPin(p) (((p) < 20) ? (esp32_adc2gpio[(p)]) : -1)
#define digitalPinToInterrupt(p) (((p) < 40) ? (p) : -1)
#define digitalPinHasPWM(p) (p < 34)
#define TX1 12
#define RX1 13
#define TX2 33
#define RX2 39
static
const
uint8_t
TX
=
1
;
static
const
uint8_t
RX
=
3
;
static
const
uint8_t
SCL
=
4
;
static
const
uint8_t
SDA
=
15
;
static
const
uint8_t
SS
=
5
;
static
const
uint8_t
MOSI
=
23
;
static
const
uint8_t
MISO
=
32
;
static
const
uint8_t
SCK
=
18
;
static
const
uint8_t
A0
=
36
;
static
const
uint8_t
A3
=
39
;
static
const
uint8_t
A4
=
32
;
static
const
uint8_t
A5
=
33
;
static
const
uint8_t
A6
=
34
;
static
const
uint8_t
A7
=
35
;
static
const
uint8_t
T0
=
4
;
static
const
uint8_t
T2
=
2
;
static
const
uint8_t
T8
=
33
;
static
const
uint8_t
T9
=
32
;
#define ETH_PHY_ADDR 1
#define ETH_PHY_POWER 2
#define ETH_PHY_MDC 16
#define ETH_PHY_MDIO 14
#define ETH_PHY_TYPE ETH_PHY_DP83848
#define ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT
#endif
/* Pins_Arduino_h */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录