-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix examples compilation fail in T3, T5 (#27)
* fix: Stop build when t2 in drawin * fix: t2 build wifi examples fail * feat: Supports calling the vendor interface * fix: Replace the vendor api with the tal api * fix: all station info list memory is not freed * feat: Add file system * fix: Spell error * fix: Spell error * feat: add upload speed options and update upload tool configuration * fix: update WiFiAP and WiFiSTA to include necessary headers and improve IP configuration handling * fix: ensure setSDA and setSCL methods return true * feat: Support T3 SPI * Update package.json * Update package_cn.json * fix: update CMakeLists.txt for board configuration and library inclusion --------- Co-authored-by: YangJie <[email protected]>
- Loading branch information
1 parent
89be820
commit b8aa6e3
Showing
36 changed files
with
1,484 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#include "Arduino.h" | ||
#include "tkl_pwm.h" | ||
|
||
void tone(uint8_t _pin, unsigned int frequency, unsigned long duration) | ||
{ | ||
OPERATE_RET rt = OPRT_OK; | ||
static uint8_t is_init = 0; | ||
|
||
TUYA_PWM_NUM_E pwmNum = pwmPinToNum(_pin); | ||
if (TUYA_PWM_NUM_MAX == pwmNum) { | ||
return; | ||
} | ||
|
||
TUYA_PWM_BASE_CFG_T pwmCfg = pwmCfgGet(_pin); | ||
pwmCfg.frequency = frequency; | ||
|
||
pwmCfg.duty = 5000; // duty 0-10000, 5000 is 50% | ||
|
||
if (0 == is_init) { | ||
rt = tkl_pwm_init(pwmNum, &pwmCfg); | ||
if (OPRT_OK != rt) { | ||
return; | ||
} | ||
is_init = 1; | ||
} | ||
|
||
tkl_pwm_start(pwmNum); | ||
|
||
return; | ||
} | ||
|
||
void noTone(uint8_t _pin) | ||
{ | ||
tkl_pwm_stop(pwmPinToNum(_pin)); | ||
|
||
return; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name=FS | ||
version=2.0.0 | ||
author=tuya | ||
maintainer=tuya | ||
sentence=tuya | ||
paragraph= | ||
category=Data Storage | ||
url= | ||
architectures=* |
Oops, something went wrong.