Vitaliy_ARM 0 7 апреля, 2008 Опубликовано 7 апреля, 2008 · Жалоба Слышал на семинаре Элтеха по WaveCom, что некоторую документацию надо получать платно. Интересно, можно ли обойтись и сделать на USB Mass Storage? Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
sobr 0 10 апреля, 2008 Опубликовано 10 апреля, 2008 · Жалоба Не получается попасть в 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 не попадаю. Ткните носом плз... Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
de__ 0 10 апреля, 2008 Опубликовано 10 апреля, 2008 · Жалоба У меня модем проще, работы со звуком нет. а что за парметр adl_atSendResponse( ADL_AT_INT,"!!!\r\n" ); может быть ADL_PORT_UART1? А вы брейкпоинт на обработчик ставили? Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться
sobr 0 11 апреля, 2008 Опубликовано 11 апреля, 2008 · Жалоба У меня модем проще, работы со звуком нет. а что за парметр 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. Цитата Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты Поделиться