mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-03-30 03:04:58 +00:00
bl602 access point shows up
This commit is contained in:
@ -1,6 +1,19 @@
|
||||
#ifdef PLATFORM_BL602
|
||||
|
||||
#include "../hal_wifi.h"
|
||||
#include "../../new_common.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <cli.h>
|
||||
|
||||
#include <FreeRTOS.h>
|
||||
#include <task.h>
|
||||
#include <portable.h>
|
||||
#include <semphr.h>
|
||||
#include <hal_sys.h>
|
||||
#include <bl_wifi.h>
|
||||
#include <bl60x_fw_api.h>
|
||||
#include <wifi_mgmr_ext.h>
|
||||
|
||||
char g_ipStr[64];
|
||||
|
||||
@ -10,6 +23,13 @@ void HAL_ConnectToWiFi(const char *ssid, const char *psk)
|
||||
}
|
||||
int HAL_SetupWiFiOpenAccessPoint(const char *ssid) {
|
||||
|
||||
uint8_t hidden_ssid = 0;
|
||||
int channel;
|
||||
wifi_interface_t wifi_interface;
|
||||
|
||||
wifi_interface = wifi_mgmr_ap_enable();
|
||||
/*no password when only one param*/
|
||||
wifi_mgmr_ap_start(wifi_interface, ssid, hidden_ssid, NULL, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ OSStatus rtos_create_thread( beken_thread_t* thread,
|
||||
OSStatus err = kNoErr;
|
||||
|
||||
|
||||
err = xTaskCreate(function, name, stack_size, arg, 15, &thread);
|
||||
err = xTaskCreate(function, name, stack_size, arg, 1, thread);
|
||||
/*
|
||||
BaseType_t xTaskCreate(
|
||||
TaskFunction_t pvTaskCode,
|
||||
@ -115,8 +115,15 @@ OSStatus rtos_create_thread( beken_thread_t* thread,
|
||||
TaskHandle_t *pvCreatedTask
|
||||
);
|
||||
*/
|
||||
|
||||
return err;
|
||||
if(err == pdPASS){
|
||||
printf("Thread create %s - pdPASS\n",name);
|
||||
return 0;
|
||||
} else if(err == errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY ) {
|
||||
printf("Thread create %s - errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY\n",name);
|
||||
} else {
|
||||
printf("Thread create %s - err %i\n",name,err);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
OSStatus rtos_delete_thread( beken_thread_t* thread ) {
|
||||
|
||||
Reference in New Issue
Block a user