mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-03-29 18:57:26 +00:00
fix warnings p1
This commit is contained in:
@ -25,9 +25,9 @@ float realVoltage, realCurrent, realPower;
|
||||
|
||||
int BL0942_TryToGetNextBL0942Packet() {
|
||||
int cs;
|
||||
int len, i;
|
||||
int i;
|
||||
int c_garbage_consumed = 0;
|
||||
byte a, b, version, command, lena, lenb;
|
||||
byte a;
|
||||
float newPower, newCurrent, newVoltage;
|
||||
byte checksum;
|
||||
int BL0942_PACKET_LEN = 23;
|
||||
|
||||
@ -2,4 +2,7 @@
|
||||
|
||||
|
||||
void DRV_I2C_Init();
|
||||
void DRV_I2C_EverySecond();
|
||||
void DRV_I2C_EverySecond();
|
||||
void I2C_OnChannelChanged(int channel,int iVal);
|
||||
|
||||
|
||||
|
||||
7
src/drv_public.h
Normal file
7
src/drv_public.h
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
|
||||
void DRV_Generic_Init();
|
||||
#include "httpserver/new_http.h"
|
||||
void DRV_AppendInformationToHTTPIndexPage(http_request_t *request);
|
||||
void DRV_OnEverySecond();
|
||||
@ -6,6 +6,8 @@
|
||||
#include "drv_tuyaMCU.h"
|
||||
#include "drv_uart.h"
|
||||
#include <time.h>
|
||||
#include "ntp_time.h"
|
||||
#include "new_tokenizer.h"
|
||||
|
||||
|
||||
#define TUYA_CMD_HEARTBEAT 0x00
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
|
||||
void UART_InitReceiveRingBuffer(int size);
|
||||
int UART_GetDataSize();
|
||||
byte UART_GetNextByte(int index);
|
||||
void UART_ConsumeBytes(int idx);
|
||||
void UART_AppendByteToCircularBuffer(int rc);
|
||||
void UART_SendByte(byte b);
|
||||
void UART_InitUART(int baud);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -56,8 +56,17 @@ void DRV_I2C_Write(byte addr, byte data);
|
||||
void DRV_I2C_Read(byte addr, byte *data);
|
||||
int DRV_I2C_Begin(int dev_adr, int busID);
|
||||
void DRV_I2C_Close();
|
||||
|
||||
i2cBusType_t DRV_I2C_ParseBusType(const char *s);
|
||||
i2cDevice_t *DRV_I2C_FindDevice(int busType,int address);
|
||||
i2cDevice_t *DRV_I2C_FindDeviceExt(int busType,int address, int devType);
|
||||
|
||||
|
||||
// drv_i2c_mcp23017.c
|
||||
void DRV_I2C_MCP23017_RunDevice(i2cDevice_t *dev);
|
||||
int DRV_I2C_MCP23017_MapPinToChannel(const void *context, const char *cmd, const char *args);
|
||||
|
||||
// drv_i2c_tc74.c
|
||||
void DRV_I2C_TC74_RunDevice(i2cDevice_t *dev);
|
||||
|
||||
#endif // __DRV_I2C_LOCAL_H__
|
||||
@ -4,6 +4,8 @@
|
||||
#include "../new_cmd.h"
|
||||
#include "../logging/logging.h"
|
||||
#include "drv_i2c_local.h"
|
||||
#include "../drv_i2c_public.h"
|
||||
#include "../new_tokenizer.h"
|
||||
|
||||
|
||||
#if PLATFORM_BK7231T
|
||||
@ -96,7 +98,7 @@ void DRV_I2C_AddDevice_MCP23017_Internal(int busType,int address) {
|
||||
dev->base.next = 0;
|
||||
memset(dev->pinMapping,0xff,sizeof(dev->pinMapping));
|
||||
|
||||
DRV_I2C_AddNextDevice(dev);
|
||||
DRV_I2C_AddNextDevice((i2cDevice_t*)dev);
|
||||
}
|
||||
i2cDevice_t *DRV_I2C_FindDevice(int busType,int address) {
|
||||
i2cDevice_t *dev;
|
||||
@ -131,7 +133,7 @@ void DRV_I2C_AddDevice_TC74_Internal(int busType,int address, int targetChannel)
|
||||
dev->base.next = 0;
|
||||
dev->targetChannel = targetChannel;
|
||||
|
||||
DRV_I2C_AddNextDevice(dev);
|
||||
DRV_I2C_AddNextDevice((i2cDevice_t*)dev);
|
||||
}
|
||||
int DRV_I2C_AddDevice_TC74(const void *context, const char *cmd, const char *args) {
|
||||
const char *i2cModuleStr;
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
#include "../new_pins.h"
|
||||
#include "../new_cfg.h"
|
||||
#include "../new_cmd.h"
|
||||
#include "../logging/logging.h"
|
||||
#include "../logging/logging.h"
|
||||
#include "../new_tokenizer.h"
|
||||
#include "drv_i2c_local.h"
|
||||
// addresses, banks, etc, defines
|
||||
#include "drv_i2c_mcp23017.h"
|
||||
@ -129,7 +130,7 @@ int DRV_I2C_MCP23017_MapPinToChannel(const void *context, const char *cmd, const
|
||||
|
||||
busType = DRV_I2C_ParseBusType(i2cModuleStr);
|
||||
|
||||
mcp = DRV_I2C_FindDeviceExt( busType, address,I2CDEV_MCP23017);
|
||||
mcp = (i2cDevice_MCP23017_t *)DRV_I2C_FindDeviceExt( busType, address,I2CDEV_MCP23017);
|
||||
if(mcp == 0) {
|
||||
addLogAdv(LOG_INFO, LOG_FEATURE_I2C,"DRV_I2C_MCP23017_MapPinToChannel: no such device exists\n" );
|
||||
return 0;
|
||||
@ -138,7 +139,7 @@ int DRV_I2C_MCP23017_MapPinToChannel(const void *context, const char *cmd, const
|
||||
mcp->pinMapping[targetPin] = targetChannel;
|
||||
|
||||
// send refresh
|
||||
DRV_I2C_MCP23017_OnChannelChanged(mcp, targetChannel, CHANNEL_Get(targetChannel));
|
||||
DRV_I2C_MCP23017_OnChannelChanged((i2cDevice_t*)mcp, targetChannel, CHANNEL_Get(targetChannel));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
277
src/new_pins.c
277
src/new_pins.c
@ -6,6 +6,8 @@
|
||||
#include "httpserver/new_http.h"
|
||||
#include "logging/logging.h"
|
||||
#include "new_cmd.h"
|
||||
#include "new_tokenizer.h"
|
||||
#include "drv_i2c_public.h"
|
||||
|
||||
|
||||
//According to your need to modify the constants.
|
||||
@ -77,282 +79,7 @@ typedef struct item_pins_config
|
||||
}ITEM_PINS_CONFIG,*ITEM_PINS_CONFIG_PTR;
|
||||
|
||||
|
||||
void testI2C()
|
||||
{
|
||||
bk_i2c_device_t def;
|
||||
|
||||
def.address = 0xAA;
|
||||
def.address_width = I2C_ADDRESS_WIDTH_7BIT;
|
||||
def.speed_mode = I2C_STANDARD_SPEED_MODE;
|
||||
|
||||
BkI2cInitialize(&def);
|
||||
|
||||
|
||||
}
|
||||
int TC74_readTemp_method1(int adr)
|
||||
{
|
||||
bk_i2c_device_t def;
|
||||
byte buffer[9];
|
||||
int t;
|
||||
|
||||
|
||||
def.address = adr;
|
||||
def.address_width = I2C_ADDRESS_WIDTH_7BIT;
|
||||
def.speed_mode = I2C_STANDARD_SPEED_MODE;
|
||||
|
||||
BkI2cInitialize(&def);
|
||||
|
||||
// I2C1_start();
|
||||
//I2C1_Wr(adr); // Status = 0 if got an ACK
|
||||
// I2C1_Wr(0x00); // Status = 0 if got an ACK
|
||||
//I2C1_Repeated_Start(); // issue I2C signal repeated start
|
||||
// I2C1_Wr(adr+1); // Status = 0 if got an ACK
|
||||
// delay_ms(10);
|
||||
// t = I2C1_Rd(1);
|
||||
// I2C1_stop();
|
||||
|
||||
return t;
|
||||
|
||||
}
|
||||
|
||||
|
||||
///*/*/*int TC74_readTemp_method2(int adr)
|
||||
//{
|
||||
// byte buffer[9];
|
||||
// int t;
|
||||
// uint32_t status;
|
||||
// uint32_t oflag;
|
||||
// oflag = I2C_DEF_DIV;
|
||||
//
|
||||
// //i2c1_init();
|
||||
// i2c_hdl = ddev_open("i2c1", &status, oflag);
|
||||
// if(DD_HANDLE_UNVALID == i2c_hdl){
|
||||
// addLogAdv(LOG_INFO, LOG_FEATURE_I2C,"TC74_readTemp_method2 ddev_open failed, status %i!\n",status);
|
||||
// return -1;
|
||||
// }
|
||||
//
|
||||
// addLogAdv(LOG_INFO, LOG_FEATURE_I2C,"TC74_readTemp_method2 ddev_open OK!\n");
|
||||
//
|
||||
// //I2C1_start();
|
||||
// //i2c1_open(0);
|
||||
// //I2C1_Wr(adr); // Status = 0 if got an ACK
|
||||
// //I2C1_Wr(0x00); // Status = 0 if got an ACK
|
||||
// buffer[0] = adr;
|
||||
// buffer[1] = 0x00;
|
||||
// camera_intf_sccb_write(adr,0x00);
|
||||
// //ddev_write(i2c_hdl,buffer,2,0);
|
||||
// //i2c1_write((char*)buffer, 2, 0);
|
||||
// //I2C1_Repeated_Start(); // issue I2C signal repeated start
|
||||
// // ????
|
||||
// //I2C1_Wr(adr+1); // Status = 0 if got an ACK
|
||||
// buffer[0] = adr+1;
|
||||
// //ddev_write(i2c_hdl,buffer,1,0);
|
||||
// //delay_ms(10);
|
||||
// //t = I2C1_Rd(1);
|
||||
// //ddev_read(i2c_hdl,buffer,1,0);
|
||||
// //i2c1_read((char*)buffer, 1, 0);
|
||||
// camera_intf_sccb_read(adr,&buffer[0]);
|
||||
// t = buffer[0];
|
||||
// //I2C1_stop();
|
||||
// //i2c1_close();
|
||||
//
|
||||
// ddev_close(i2c_hdl);
|
||||
// return t;
|
||||
//
|
||||
//}*/*/*/
|
||||
int attempt;
|
||||
|
||||
|
||||
// dac i2c interface
|
||||
#define I2C_CLK 26
|
||||
#define I2C_DAT 27
|
||||
|
||||
typedef struct Codec_RegCfg_s
|
||||
{
|
||||
unsigned int map;
|
||||
unsigned char reg;
|
||||
}Codec_ES8374_RegCfg_t;
|
||||
|
||||
// 0-output&pullup, 1--input
|
||||
static void gpio_config_c( UINT32 index, UINT32 mode )
|
||||
{
|
||||
volatile UINT32 *gpio_cfg_addr;
|
||||
UINT32 val;
|
||||
UINT32 tmp;
|
||||
if(index >GPIONUM)
|
||||
return;
|
||||
gpio_cfg_addr = (volatile UINT32 *)(REG_GPIO_CFG_BASE_ADDR + index * 4);
|
||||
tmp =mode;
|
||||
mode &= 0xff;
|
||||
|
||||
if(mode == 1)
|
||||
val =0x0c;
|
||||
else
|
||||
{
|
||||
val = 0x30;
|
||||
if(tmp>>8)
|
||||
val |= 1<<1;
|
||||
}
|
||||
REG_WRITE(gpio_cfg_addr, val);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void gpio_output_c(UINT32 index, UINT32 val)
|
||||
{
|
||||
UINT32 reg_val;
|
||||
volatile UINT32 *gpio_cfg_addr;
|
||||
|
||||
gpio_cfg_addr = (volatile UINT32 *)(REG_GPIO_CFG_BASE_ADDR + index * 4);
|
||||
reg_val = REG_READ(gpio_cfg_addr);
|
||||
|
||||
reg_val &= ~GCFG_OUTPUT_BIT;
|
||||
reg_val |= (val & 0x01) << GCFG_OUTPUT_POS;
|
||||
REG_WRITE(gpio_cfg_addr, reg_val);
|
||||
}
|
||||
|
||||
static UINT32 DATA_INPUT(void)
|
||||
{
|
||||
UINT32 val = 0;
|
||||
volatile UINT32 *gpio_cfg_addr;
|
||||
|
||||
gpio_cfg_addr = (volatile UINT32 *)(REG_GPIO_CFG_BASE_ADDR + I2C_DAT * 4);
|
||||
val = REG_READ(gpio_cfg_addr);
|
||||
|
||||
return (val & 1);
|
||||
}
|
||||
|
||||
|
||||
static void CLK_OUTPUT_HIGH(void)
|
||||
{
|
||||
gpio_output_c(I2C_CLK,1);
|
||||
}
|
||||
static void CLK_OUTPUT_LOW(void)
|
||||
{
|
||||
gpio_output_c(I2C_CLK,0);
|
||||
}
|
||||
|
||||
static void DATA_OUTPUT_HIGH(void)
|
||||
{
|
||||
gpio_output_c(I2C_DAT,1);
|
||||
}
|
||||
|
||||
static void DATA_OUTPUT_LOW(void)
|
||||
{
|
||||
gpio_output_c(I2C_DAT,0);
|
||||
}
|
||||
|
||||
static void SET_DATA_INPUT(void)
|
||||
{
|
||||
gpio_config_c(I2C_DAT,1);
|
||||
}
|
||||
|
||||
static void set_data_output(void)
|
||||
{
|
||||
UINT32 mode;
|
||||
UINT32 val = DATA_INPUT();
|
||||
mode = (val<<8) ;
|
||||
gpio_config_c(I2C_DAT,mode);
|
||||
}
|
||||
|
||||
/*1 equals about 5 us*/
|
||||
static void es8374_codec_i2c_delay(int us)
|
||||
{
|
||||
volatile int i, j;
|
||||
for(i = 0; i < us; i++)
|
||||
{
|
||||
j = 50;
|
||||
while(j--);
|
||||
}
|
||||
}
|
||||
|
||||
static void es8374_codec_i2c_start(void)
|
||||
{
|
||||
// start bit
|
||||
CLK_OUTPUT_HIGH();
|
||||
DATA_OUTPUT_HIGH();
|
||||
es8374_codec_i2c_delay(1);
|
||||
DATA_OUTPUT_LOW();
|
||||
es8374_codec_i2c_delay(1);
|
||||
}
|
||||
|
||||
static void es8374_codec_i2c_stop(void)
|
||||
{
|
||||
//stop bit
|
||||
CLK_OUTPUT_LOW();
|
||||
es8374_codec_i2c_delay(1);
|
||||
CLK_OUTPUT_HIGH();
|
||||
es8374_codec_i2c_delay(1);
|
||||
DATA_OUTPUT_HIGH();
|
||||
es8374_codec_i2c_delay(1);
|
||||
}
|
||||
|
||||
|
||||
static void es8374_codec_i2c_write_byte(unsigned char data)
|
||||
{
|
||||
int i;
|
||||
|
||||
//data 0-7bit
|
||||
for(i = 7; i >= 0; i--)
|
||||
{
|
||||
CLK_OUTPUT_LOW();
|
||||
if(data & (0x1 << i)) // msb first, rising change and falling lock in codec
|
||||
DATA_OUTPUT_HIGH();
|
||||
else
|
||||
DATA_OUTPUT_LOW();
|
||||
es8374_codec_i2c_delay(1);
|
||||
CLK_OUTPUT_HIGH();
|
||||
es8374_codec_i2c_delay(1);
|
||||
}
|
||||
//receive ack, bit9
|
||||
CLK_OUTPUT_LOW();
|
||||
SET_DATA_INPUT();
|
||||
|
||||
es8374_codec_i2c_delay(1);
|
||||
|
||||
CLK_OUTPUT_HIGH();
|
||||
es8374_codec_i2c_delay(1);
|
||||
set_data_output();
|
||||
}
|
||||
int TC74_readTemp_method3(int adr)
|
||||
{
|
||||
int t;
|
||||
|
||||
|
||||
es8374_codec_i2c_start();
|
||||
es8374_codec_i2c_write_byte(adr); // Status = 0 if got an ACK
|
||||
es8374_codec_i2c_write_byte(0x00); // Status = 0 if got an ACK
|
||||
es8374_codec_i2c_start(); // issue I2C signal repeated start
|
||||
es8374_codec_i2c_write_byte(adr+1); // Status = 0 if got an ACK
|
||||
delay_ms(10);
|
||||
t = I2C1_Rd(1);
|
||||
es8374_codec_i2c_stop();
|
||||
return t;
|
||||
|
||||
}
|
||||
static void I2CWRNBYTE_CODEC(unsigned char reg, unsigned char val)
|
||||
{
|
||||
UINT8 i2c_address = 0x20;
|
||||
|
||||
es8374_codec_i2c_start();
|
||||
es8374_codec_i2c_write_byte(i2c_address);
|
||||
es8374_codec_i2c_write_byte(reg);
|
||||
es8374_codec_i2c_write_byte(val);
|
||||
es8374_codec_i2c_stop();
|
||||
}
|
||||
|
||||
|
||||
void testI2C_method1()
|
||||
{
|
||||
char buffer[8];
|
||||
|
||||
|
||||
i2c1_open(0);
|
||||
|
||||
i2c1_write(buffer, 2, 0);
|
||||
i2c1_close();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
|
||||
#include "new_common.h"
|
||||
#include "new_tokenizer.h"
|
||||
#include "httpserver/new_http.h"
|
||||
#include "logging/logging.h"
|
||||
#include "new_pins.h"
|
||||
#include "new_cfg.h"
|
||||
#include "new_cmd.h"
|
||||
|
||||
typedef struct repeatingEvent_s {
|
||||
char *command;
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
#define MAX_ARGS 32
|
||||
|
||||
static char g_buffer[MAX_CMD_LEN];
|
||||
static char *g_args[MAX_ARGS];
|
||||
static char *g_argsFrom[MAX_ARGS];
|
||||
static const char *g_args[MAX_ARGS];
|
||||
static const char *g_argsFrom[MAX_ARGS];
|
||||
static int g_numArgs = 0;
|
||||
|
||||
bool isWhiteSpace(char ch) {
|
||||
@ -43,9 +43,7 @@ int Tokenizer_GetArgInteger(int i) {
|
||||
return atoi(s);
|
||||
}
|
||||
void Tokenizer_TokenizeString(const char *s) {
|
||||
int r = 0;
|
||||
char *p;
|
||||
int i;
|
||||
|
||||
while(isWhiteSpace(*s)) {
|
||||
s++;
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
|
||||
int Tokenizer_GetArgsCount();
|
||||
const char *Tokenizer_GetArg(int i);
|
||||
const char *Tokenizer_GetArgFrom(int i);
|
||||
int Tokenizer_GetArgInteger(int i);
|
||||
void Tokenizer_TokenizeString(const char *s);
|
||||
@ -4,6 +4,8 @@
|
||||
|
||||
#include "new_common.h"
|
||||
#include <time.h>
|
||||
#include "new_tokenizer.h"
|
||||
#include "new_cmd.h"
|
||||
|
||||
#ifdef WINDOWS
|
||||
|
||||
@ -166,7 +168,7 @@ void NTP_SendRequest(bool bBlocking) {
|
||||
void NTP_CheckForReceive() {
|
||||
byte *ptr;
|
||||
int i, recv_len;
|
||||
struct tm * ptm;
|
||||
//struct tm * ptm;
|
||||
unsigned short highWord;
|
||||
unsigned short lowWord;
|
||||
unsigned int secsSince1900;
|
||||
|
||||
@ -9,23 +9,15 @@
|
||||
* @Date: 2021-01-23 16:33:00
|
||||
* @LastEditTime: 2021-01-27 17:00:00
|
||||
*/
|
||||
|
||||
#define _TUYA_DEVICE_GLOBAL
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "uni_log.h"
|
||||
#include "gw_intf.h"
|
||||
#include "wlan_ui_pub.h"
|
||||
|
||||
#include "lwip/sockets.h"
|
||||
#include "lwip/ip_addr.h"
|
||||
#include "lwip/inet.h"
|
||||
//
|
||||
//#include "lwip/sockets.h"
|
||||
//#include "lwip/ip_addr.h"
|
||||
//#include "lwip/inet.h"
|
||||
|
||||
#include "mem_pub.h"
|
||||
#include "str_pub.h"
|
||||
#include "ethernet_intf.h"
|
||||
|
||||
/* Private includes ----------------------------------------------------------*/
|
||||
#include "drv_public.h"
|
||||
|
||||
// overall config variables for app - like BK_LITTLEFS
|
||||
#include "obk_config.h"
|
||||
@ -56,14 +48,17 @@ static int g_secondsElapsed = 0;
|
||||
|
||||
static int g_openAP = 0;
|
||||
static int g_connectToWiFi = 0;
|
||||
int bSafeMode = 0;
|
||||
static int bSafeMode = 0;
|
||||
|
||||
// reset in this number of seconds
|
||||
int g_reset = 0;
|
||||
static int g_reset = 0;
|
||||
beken_timer_t g_main_timer_1s;
|
||||
|
||||
// save config in this number of seconds
|
||||
int g_savecfg = 0;
|
||||
|
||||
int g_bHasWiFiConnected = 0;
|
||||
|
||||
#define LOG_FEATURE LOG_FEATURE_MAIN
|
||||
|
||||
// from wlan_ui.c
|
||||
@ -78,7 +73,6 @@ int Time_getUpTimeSeconds() {
|
||||
return g_secondsElapsed;
|
||||
}
|
||||
|
||||
int g_bHasWiFiConnected = 0;
|
||||
// receives status change notifications about wireless - could be useful
|
||||
// ctxt is pointer to a rw_evt_type
|
||||
void wl_status( void *ctxt ){
|
||||
@ -176,36 +170,8 @@ void connect_to_wifi(const char *oob_ssid,const char *connect_key)
|
||||
}
|
||||
|
||||
|
||||
beken_timer_t led_timer;
|
||||
|
||||
#if 0
|
||||
// OpenSHWProjects 2022 04 11
|
||||
// I tried to implement ADC but it seems that BkAdcInitialize and BkAdcTakeSample
|
||||
// are missing from the precompiled Bekken library...
|
||||
int adc_init = 0;
|
||||
#include "../../beken378/func/user_driver/BkDriverADC.h"
|
||||
void run_adc_test(){
|
||||
OSStatus test;
|
||||
int adc;
|
||||
short res;
|
||||
int val;
|
||||
uint32_t sampling_cycle;
|
||||
uint16_t output;
|
||||
sampling_cycle = 1000;
|
||||
adc = 3;
|
||||
|
||||
if(adc_init == 0) {
|
||||
adc_init = 1;
|
||||
// undefined reference to `BkAdcInitialize'
|
||||
test = BkAdcInitialize( adc, sampling_cycle );
|
||||
ADDLOGF_INFO("Adc init res %i\n", test);
|
||||
}
|
||||
// undefined reference to `BkAdcTakeSample'
|
||||
test = BkAdcTakeSample( adc, &output );
|
||||
val = output;
|
||||
ADDLOGF_INFO("BkAdcTakeSample res %i value %i\n", test, val);
|
||||
}
|
||||
#endif
|
||||
static void app_led_timer_handler(void *data)
|
||||
{
|
||||
// run_adc_test();
|
||||
@ -214,7 +180,7 @@ static void app_led_timer_handler(void *data)
|
||||
DRV_OnEverySecond();
|
||||
|
||||
g_secondsElapsed ++;
|
||||
ADDLOGF_INFO("Timer is %i free mem %d\n", g_secondsElapsed, xPortGetFreeHeapSize());
|
||||
ADDLOGF_INFO("Timer is %i free mem %d\n", g_secondsElapsed, xPortGetFreeHeapSize());
|
||||
|
||||
// print network info
|
||||
if (!(g_secondsElapsed % 10)){
|
||||
@ -441,13 +407,13 @@ void user_main(void)
|
||||
}
|
||||
}
|
||||
|
||||
err = rtos_init_timer(&led_timer,
|
||||
err = rtos_init_timer(&g_main_timer_1s,
|
||||
1 * 1000,
|
||||
app_led_timer_handler,
|
||||
(void *)0);
|
||||
ASSERT(kNoErr == err);
|
||||
|
||||
err = rtos_start_timer(&led_timer);
|
||||
err = rtos_start_timer(&g_main_timer_1s);
|
||||
ASSERT(kNoErr == err);
|
||||
ADDLOGF_DEBUG("started timer\r\n");
|
||||
}
|
||||
|
||||
@ -167,37 +167,6 @@
|
||||
RelativePath=".\src\drv_bl0942.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\drv_bl0942.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\i2c\drv_i2c_local.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\i2c\drv_i2c_main.c"
|
||||
>
|
||||
@ -222,18 +191,6 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\drv_i2c_public.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\i2c\drv_i2c_tc74.c"
|
||||
>
|
||||
@ -270,26 +227,10 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\drv_tuyaMCU.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\drv_uart.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\drv_uart.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\flash_config\flash_config.c"
|
||||
>
|
||||
@ -322,18 +263,6 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\httpserver\http_fns.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\httpserver\http_tcp_server.c"
|
||||
>
|
||||
@ -346,10 +275,6 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\httpserver\http_tcp_server.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\jsmn\jsmn.c"
|
||||
>
|
||||
@ -366,26 +291,14 @@
|
||||
RelativePath=".\src\new_cfg.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_cfg.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_cmd.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_cmd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_common.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_common.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\httpserver\new_http.c"
|
||||
>
|
||||
@ -398,30 +311,6 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\httpserver\new_http.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_http.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\mqtt\new_mqtt.c"
|
||||
>
|
||||
@ -446,26 +335,14 @@
|
||||
RelativePath=".\src\new_pins.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_pins.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_repeatingEvents.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_repeatingEvents.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_tokenizer.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_tokenizer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\cmnds\newLEDDriver.c"
|
||||
>
|
||||
@ -474,10 +351,6 @@
|
||||
RelativePath=".\src\ntp_time.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\ntp_time.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\ota\ota.c"
|
||||
>
|
||||
@ -733,6 +606,137 @@
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\drv_bl0942.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\i2c\drv_i2c_local.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\drv_i2c_public.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\drv_tuyaMCU.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\drv_uart.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\httpserver\http_fns.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\httpserver\http_tcp_server.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_cfg.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_cmd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_common.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_http.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\httpserver\new_http.h"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_pins.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_repeatingEvents.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\new_tokenizer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\ntp_time.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
||||
Reference in New Issue
Block a user