Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bsp/amebaz/applications/smartconfig_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ static int rt_wlan_device_connetct(char *ssid, char *passwd)

static void airkiss_send_notification(uint8_t random)
{
int i;
int sock = -1;
int udpbufsize = 2;
struct sockaddr_in UDPBCAddr, UDPBCServerAddr;
Expand Down Expand Up @@ -102,7 +103,7 @@ static void airkiss_send_notification(uint8_t random)
goto _exit;
}

for (int i = 0; i <= 20; i++)
for (i = 0; i <= 20; i++)
{
int ret = sendto(sock, (char *)&random, 1, 0, (struct sockaddr *)&UDPBCAddr, sizeof(UDPBCAddr));
rt_thread_delay(10);
Expand Down
5 changes: 4 additions & 1 deletion components/drivers/wlan/wlan_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ static rt_uint16_t rt_wlan_cal_crc(rt_uint8_t *buff, int len)

while (len--)
{
int i;

wChar = *(buff++);
wCRCin ^= (wChar << 8);
for (int i = 0; i < 8; i++)

for (i = 0; i < 8; i++)
{
if (wCRCin & 0x8000)
wCRCin = (wCRCin << 1) ^ wCPoly;
Expand Down