|
Open AT |
|
|
|
 |
Ответов
|
Apr 10 2008, 13:10
|

Знающий
   
Группа: Свой
Сообщений: 926
Регистрация: 18-01-07
Пользователь №: 24 552

|
Не получается попасть в AudioHandler: Код #include "adl_global.h"
const u16 wm_apmCustomStackSize = 1024; s32 handle; s32 BufferSize; u16 BufPlay[160]; s32 appPlayLowIrqHandle = 0;
void AudioHandler( s32 audioHandle, adl_audioEvents_e Event ) //add events { //???????????????????????????????????????????????????????? adl_atSendResponse( ADL_AT_INT,"!!!\r\n" ); return; } bool appPlayLowIrqHandler( adl_irqID_e Source, adl_irqNotificationLevel_e NotificationLevel, adl_irqEventData_t *Data ) { if (/*Признак окончания трека*/) { adl_audioStop(handle); return 0; } else { *( ( adl_audioStream_t * )Data->SourceData )->BufferReady = TRUE; return 0; } }
void adl_main ( adl_InitType_e InitType ) { appPlayLowIrqHandle = adl_irqSubscribe ( appPlayLowIrqHandler, ADL_IRQ_NOTIFY_LOW_LEVEL, ADL_IRQ_PRIORITY_LOW_LEVEL, 1 ); handle=adl_audioSubscribe ( ADL_AUDIO_VOICE_CALL_TX , AudioHandler, ADL_AUDIO_RESOURCE_OPTION_FORBID_PREEMPTION ); adl_audioGetOption( handle,ADL_AUDIO_PCM_8K_16B_MONO_BUFFER_SIZE , &BufferSize ); adl_audioStreamPlay ( handle, ADL_AUDIO_PCM_MONO_8K_16B , appPlayLowIrqHandle, 0, BufPlay); } Если в BufPlay писать, то трек воспроизводиться до того момента пока признака окончания нет, но в AudioHandler не попадаю. Ткните носом плз...
|
|
|
|
|
Apr 10 2008, 13:27
|
Участник

Группа: Новичок
Сообщений: 26
Регистрация: 19-03-08
Пользователь №: 36 045

|
У меня модем проще, работы со звуком нет. а что за парметр adl_atSendResponse( ADL_AT_INT,"!!!\r\n" ); может быть ADL_PORT_UART1? А вы брейкпоинт на обработчик ставили?
|
|
|
|
|
Apr 11 2008, 02:40
|

Знающий
   
Группа: Свой
Сообщений: 926
Регистрация: 18-01-07
Пользователь №: 24 552

|
Цитата(de__ @ Apr 10 2008, 20:27)  У меня модем проще, работы со звуком нет. а что за парметр adl_atSendResponse( ADL_AT_INT,"!!!\r\n" ); может быть ADL_PORT_UART1? А вы брейкпоинт на обработчик ставили? Код This function sends the provided text to any external application connected to the required port, as a response, an unsolicited response or an intermediate response, according to the requested type. • Prototype s32 adl_atSendResponse (u16 Type, ascii * String ) • Parameters Type: This parameter is composed of the response type, and the destination port where to send the response. The type & destination combination has to be done with the following macro: ADL_AT_PORT_TYPE ( _port, _type ) The _port argument has to be a defined value of the adl_atPort_e type, and this required port has to be available (cf. the AT/FCM port Service); sending a response on an Open AT® the GSM or GPRS based port will have no effects). Note: With the ADL_AT_UNS type value, if the ADL_AT_PORT_TYPE macro is not used, the unsolicited response will be broadcasted on all currently opened ports. If the ADL_AT_PORT_TYPE macro is not used with the ADL_AT_RSP & ADL_AT_INT types, responses will be by default sent on the UART 1 port. If this port is not opened, responses will not be displayed. The _type argument has to be one of the values defined below: o ADL_AT_RSP: Terminal response (have to ends an incoming AT command). A destination port has to be specified. Sending such a response will flush all previously buffered unsolicited responses on the required port. o ADL_AT_INT: Intermediate response (text to display while an incoming AT command is running). A destination port has to be specified. Sending such a response will just display the required text, without flushing all previously buffered unsolicited responses on the required port. API AT Commands Service © Confidential Page: 50 / 365 This document is the sole and exclusive property of Wavecom. Not to be distributed or divulged without prior written agreement. WM_DEV_OAT_UGD_060 - 003 December 17, 2007 o ADL_AT_UNS: Unsolicited response (text to be displayed out of a currently running command process). For the required port (if any) or for each currently opened port (if the ADL_AT_PORT_TYPE macro is not used), if an AT command is currently running (ie. the command was sent by the external application, but this command answer has not be sent back yet), any unsolicited response will automatically be buffered, until a terminal response is sent on this port. String: The text to be sent. Please note that this is exactly the text string to be displayed on the required port (ie. all carriage return & line feed characters ("\r\n" in C language) have to be sent by the application itself). • Returned values o ADL_RET_ERR_SERVICE_LOCKED if the function was called from a low level interrupt handler (the function is forbidden in this context). o OK if the function is successfully executed.
|
|
|
|
Сообщений в этой теме
sobr Open AT Apr 1 2008, 08:43 sobr ЗАРАБОТАЛО!!!
Хм... Чето не могу най... Apr 1 2008, 10:42 de__ Цитата(sobr @ Apr 1 2008, 13:42) ЗАРАБОТА... Apr 2 2008, 09:21  sobr Цитата(de__ @ Apr 2 2008, 16:21) Значит и... Apr 2 2008, 09:28   de__ Цитата(sobr @ Apr 2 2008, 12:28) Прикольн... Apr 2 2008, 13:38    sobr Цитата(de__ @ Apr 2 2008, 20:38) Мало кур... Apr 2 2008, 13:52     de__ Имелось в виду что функция принимает параметр - ук... Apr 2 2008, 14:31      sobr Спасибо за помощь!
Завтра буду дальше... Apr 2 2008, 14:34 sobr Есть два буффера:
Кодvoid * a;
u16 b[160]
... Apr 2 2008, 10:30 sobr Всем привет.
Сущевствует ли возможность при создан... Apr 4 2008, 05:12 de__ По логике вещей такого быть не может. Если бы это ... Apr 4 2008, 12:31 sobr Цитата(de__ @ Apr 4 2008, 19:31) Остается... Apr 4 2008, 14:13  sobr Голосовой файл "засунуть" в программу по... Apr 5 2008, 08:46 de__ в моем q24plus, кажется, 768 кБ Apr 5 2008, 13:37 sobr Я так понял, что USB можно ипользовать только посл... Apr 7 2008, 06:34 Vitaliy_ARM Слышал на семинаре Элтеха по WaveCom, что некотору... Apr 7 2008, 13:43
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0
|
|
|