Skip to content

Commit

Permalink
Merge pull request tuya#7 from valeklubomir/master
Browse files Browse the repository at this point in the history
Warnings cleanup
  • Loading branch information
openshwprojects authored Oct 27, 2022
2 parents 1a8e8ff + 243c349 commit 5099441
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 17 deletions.
4 changes: 1 addition & 3 deletions b_clean.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/bin/bash
./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.0 clean
./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.1 clean
./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.2 clean
./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.7 clean

6 changes: 3 additions & 3 deletions b_full.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.3 clean
./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.3
cp -f apps/OpenBK7231N_App/output/1.0.3/OpenBK7231N_App_1.0.3.rbl /var/www/OpenBK7231N_App_1.0.3.rbl
./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.7 clean
./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.7
cp -f apps/OpenBK7231N_App/output/1.0.7/OpenBK7231N_App_1.0.7.rbl /var/www/OpenBK7231N_App_1.0.7.rbl

4 changes: 2 additions & 2 deletions b_rebuild.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.3
cp -f apps/OpenBK7231N_App/output/1.0.3/OpenBK7231N_App_1.0.3.rbl /var/www/OpenBK7231N_App_1.0.3.rbl
./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.7
cp -f apps/OpenBK7231N_App/output/1.0.7/OpenBK7231N_App_1.0.7.rbl /var/www/OpenBK7231N_App_1.0.7.rbl

Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ typedef struct
extern void pwm_init(void);
extern void pwm_exit(void);
extern void pwm_isr(void);
extern UINT8 pwm_single_update_param_enable(UINT8 ucChannel,UINT32 level);
extern UINT32 pwm_check_group(UINT8 channel1,UINT8 channel2);
extern void pwm_group_mode_disable(UINT8 ucChannel);
extern void pwm_unit_disable(UINT8 ucChannel);
extern UINT8 pwm_init_levl_get(UINT8 ucChannel);

#endif //_PWM_PUB_H_
// eof
Expand Down
5 changes: 4 additions & 1 deletion platforms/bk7231n/bk7231n_os/beken378/driver/pwm/pwm_new.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ UINT8 pwm_update_param(pwm_param_t *pwm_param)
value = (UINT32) pwm_param->end_value;
REG_WRITE(REG_GROUP_PWM1_T4_ADDR(current_group), value);
}
return 0;
}

UINT8 pwm_single_update_param(pwm_param_t *pwm_param)
Expand Down Expand Up @@ -935,6 +936,7 @@ UINT8 pwm_group_update_param_enable(UINT8 channel1,UINT8 channel2,pwm_param_t *p
}

REG_WRITE(REG_PWM_GROUP_CTRL_ADDR(current_group), value);
return 0;
}

UINT8 pwm_nogroup_update_param_enable(UINT8 channel1,UINT8 channel2,pwm_param_t *pwm_param)
Expand All @@ -961,6 +963,7 @@ UINT8 pwm_nogroup_update_param_enable(UINT8 channel1,UINT8 channel2,pwm_param_t

REG_WRITE(REG_PWM_GROUP_CTRL_ADDR(group1), value1);
REG_WRITE(REG_PWM_GROUP_CTRL_ADDR(group2), value2);
return 0;
}

UINT8 pwm_param_clear(UINT8 ucChannel)
Expand Down Expand Up @@ -996,7 +999,7 @@ UINT8 pwm_param_clear(UINT8 ucChannel)
REG_WRITE(REG_GROUP_PWM1_T3_ADDR(current_group), 0);
REG_WRITE(REG_GROUP_PWM1_T4_ADDR(current_group), 0);
}

return 0;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static void bk_spi_tx_finish_callback(int port, void *param)
static void bk_spi_configure(UINT32 rate, UINT32 mode)
{
UINT32 param;
struct spi_callback_des spi_dev_cb;
//struct spi_callback_des spi_dev_cb;


param = 0;
Expand Down Expand Up @@ -723,7 +723,7 @@ int bk_spi_master_dma_send(struct spi_message *spi_msg)
{
GDMA_CFG_ST en_cfg;
en_cfg.channel = SPI_TX_DMA_CHANNEL;
en_cfg.param = spi_msg->send_buf; // dma dst addr
en_cfg.param = (UINT32)spi_msg->send_buf; // dma dst addr
gdma_ctrl(CMD_GDMA_SET_SRC_START_ADDR, (void *)&en_cfg);
spi_dev->tx_ptr = spi_msg->send_buf;

Expand Down Expand Up @@ -784,7 +784,7 @@ int bk_spi_master_dma_recv(struct spi_message *spi_msg)
{
GDMA_CFG_ST en_cfg;
en_cfg.channel = SPI_RX_DMA_CHANNEL;
en_cfg.param = spi_msg->recv_buf; // dma dst addr
en_cfg.param = (UINT32)spi_msg->recv_buf; // dma dst addr
gdma_ctrl( CMD_GDMA_SET_DST_START_ADDR, (void *)&en_cfg);
spi_dev->rx_ptr = spi_msg->recv_buf;

Expand Down Expand Up @@ -837,7 +837,7 @@ void bk_master_dma_rx_finshed_callback(void (*func)(void))

void bk_master_dma_tx_disable(void)
{
GDMA_CFG_ST en_cfg;
//GDMA_CFG_ST en_cfg;

spi_dma_tx_enable(0);
spi_dev->flag &= (~TX_FINISH_FLAG);
Expand All @@ -847,7 +847,7 @@ void bk_master_dma_tx_disable(void)

void bk_master_dma_rx_disable(void)
{
GDMA_CFG_ST en_cfg;
//GDMA_CFG_ST en_cfg;
spi_dma_rx_enable(0);
spi_dev->flag &= (~RX_FINISH_FLAG);

Expand Down
2 changes: 1 addition & 1 deletion platforms/bk7231n/bk7231n_os/beken378/func/key/key_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

beken_timer_t g_key_timer;


#if 1
BUTTON_S button_test;

Expand Down Expand Up @@ -72,6 +71,7 @@ uint8_t key_get_gpio_value(void)
uint8_t key_gpio_init(void)
{
bk_gpio_config_input_pup(GPIO_TEST_ID);
return 0;
}

void key_item_configure(void)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,9 @@ mqtt_close(mqtt_client_t *client, mqtt_connection_status_t reason)
client->connect_cb(client, client->connect_arg, reason);
}
}
if (client->output.g_mutex != NULL)
vSemaphoreDelete(client->output.g_mutex);
client->output.g_mutex = NULL;
}


Expand Down Expand Up @@ -1401,7 +1404,6 @@ void mqtt_client_cleanup(mqtt_client_t *client)
if (client->output.g_mutex != NULL)
{
vSemaphoreDelete(client->output.g_mutex);
client->output.g_mutex = NULL;
}
memset(client, 0, sizeof(mqtt_client_t));
}
Expand All @@ -1420,7 +1422,6 @@ mqtt_client_free(mqtt_client_t *client)
if (client->output.g_mutex != NULL)
{
vSemaphoreDelete(client->output.g_mutex);
client->output.g_mutex = NULL;
}
mem_free(client);
}
Expand Down Expand Up @@ -1518,6 +1519,9 @@ mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port,
remaining_length = (u16_t)len;

if (mqtt_output_check_space(&client->output, remaining_length) == 0) {
if (client->output.g_mutex != NULL)
vSemaphoreDelete(client->output.g_mutex);
client->output.g_mutex = NULL;
return ERR_MEM;
}

Expand All @@ -1530,6 +1534,9 @@ mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port,
client->conn = altcp_tcp_new_ip_type(IP_GET_TYPE(ip_addr));
}
if (client->conn == NULL) {
if (client->output.g_mutex != NULL)
vSemaphoreDelete(client->output.g_mutex);
client->output.g_mutex = NULL;
return ERR_MEM;
}

Expand Down Expand Up @@ -1585,6 +1592,9 @@ mqtt_client_connect(mqtt_client_t *client, const ip_addr_t *ip_addr, u16_t port,
return ERR_OK;

tcp_fail:
if (client->output.g_mutex != NULL)
vSemaphoreDelete(client->output.g_mutex);
client->output.g_mutex = NULL;
altcp_abort(client->conn);
client->conn = NULL;
return err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ int lwip_ioctl(int s, long cmd, void *argp);
int lwip_fcntl(int s, int cmd, int val);
const char *lwip_inet_ntop(int af, const void *src, char *dst, socklen_t size);
int lwip_inet_pton(int af, const char *src, void *dst);
int lwip_close_force(int s);

#if LWIP_COMPAT_SOCKETS
#if LWIP_COMPAT_SOCKETS != 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************************
*/

#include <string.h>

#include "include.h"
#include "rtos_pub.h"
#include "BkDriverPwm.h"
Expand Down
1 change: 1 addition & 0 deletions sdk/include/tuya_tls_config_psk_only.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@


#define TUYA_TLS_DYNAMIC_MEMORY_ALLOCATION 1 //开启TLS动态内存
#undef TLS_SESSION
#define TLS_SESSION 1 //开启TLS_SESSION
#define TLS_MEM_DEBUG 0 //开启TLS内存调试
#define TUYA_TLS_DEBUG_THRDSHOLD 5 //TLS 调试等级
Expand Down

0 comments on commit 5099441

Please sign in to comment.