This commit is contained in:
pvvx 2017-06-26 00:51:33 +03:00
parent df98859f82
commit 882758b798
10 changed files with 466 additions and 461 deletions

View file

@ -128,7 +128,9 @@ int i2sInit(int mask, int bufsize, int word_len) { // word_len = WL_16b or WL_24
HalPinCtrlRtl8195A(JTAG, 0, 0);
i2s_init(pi2s_obj, I2S0_SCLK_PIN, I2S0_WS_PIN, I2S0_SD_PIN);
// Create a Semaphone
RtlInitSema(&I2sTxSema, 1);
// RtlInitSema(&I2sTxSema, 1); //
I2sTxSema = xSemaphoreCreateCounting(MAX_SEMA_COUNT, 1);
}
else i2s_init(pi2s_obj, I2S1_SCLK_PIN, I2S1_WS_PIN, I2S1_SD_PIN);
i2s_set_param(pi2s_obj, pi2s_obj->channel_num, pi2s_obj->sampling_rate, pi2s_obj->word_length);

View file

@ -5,6 +5,7 @@
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
#include "freertos_pmu.h"
#include "at_cmd/log_service.h"
#include "at_cmd/atcmd_wifi.h"
#include <lwip_netconf.h>
@ -327,17 +328,17 @@ LOCAL void fATSP(int argc, char *argv[])
switch (argv[1][0]) {
case 'a': // acquire
{
acquire_wakelock(atoi(argv[2]));
pmu_acquire_wakelock(atoi(argv[2]));
break;
}
case 'r': // release
{
release_wakelock(atoi(argv[2]));
pmu_release_wakelock(atoi(argv[2]));
break;
}
};
};
printf("WakeLock Status %d\n", get_wakelock_status());
printf("WakeLock Status %d\n", pmu_get_wakelock_status());
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------

View file

@ -7,6 +7,7 @@
#include <autoconf.h>
#include "FreeRTOS.h"
#include "freertos_pmu.h"
#include "diag.h"
#include "wifi_api.h"
#include "wifi_conf.h"
@ -226,7 +227,7 @@ LOCAL void fATSF(int argc, char *argv[])
LOCAL void fATWP(int argc, char *argv[]) {
if(argc > 1) {
release_wakelock(0xffff);
pmu_release_wakelock(0xffff);
wifi_set_power_mode(1, 1);
wifi_set_lps_dtim(atoi(argv[1]));
}