|
- /*
- * File: AudioConsole.h
- * Author: JF
- *
- * Created on February 20, 2025, 2:30 PM
- */
-
- #ifndef AUDIOCONSOLE_H
- #define AUDIOCONSOLE_H
-
- #include "define.h"
- #include "AudioConsoleInterface.h"
- #include "WiFiCtrl.h"
-
-
- #define AUDIO_CONSOLE_WAIT_FOR_WIFI_TIMEOUT 1000
- #define AUDIO_CONSOLE_WAIT_FOR_CONNECT_TIMEOUT 5000
- #define AUDIO_CONSOLE_STATUS_REQUEST_TIMEOUT 1000
-
-
- #define AUDIO_CONSOLE_MIN_VOLUME 0
- #define AUDIO_CONSOLE_MAX_VOLUME 194
-
- typedef struct eAVReceiverStatus
- {
- bool MainPwrStatus;
- bool MainSleepStatus;
- bool IsMute;
- bool DataValid;
- bool ReceiverOnline;
- bool SyncZones;
- unsigned int MainVolume;
- }AVReceiverStatus_t;
-
- enum eAudioConsoleStates
- {
- AUDIO_CONSOLE_INIT_STATE,
- AUDIO_CONSOLE_DISCONNECTED_STATE,
- AUDIO_CONSOLE_CONNECTING_STATE,
- AUDIO_CONSOLE_RUN_STATE,
-
- AUDIO_CONSOLE_MAX_STATE
- };
-
- enum eAudioConsoleSMEvents
- {
- AUDIO_CONSOLE_SM_TICK_EVENT,
- AUDIO_CONSOLE_SM_CONNECTED_EVENT,
- AUDIO_CONSOLE_SM_DISCONNECTED_EVENT,
- AUDIO_CONSOLE_MAX_EVENT
- };
-
- int AudioConsoleInit();
- void AudioConsoleTick();
-
- int AudioConsoleSetIFConnectionStatus(bool Connected);
- int AudioConsoleSetReceiverStatus(AVReceiverStatus_t *MainZone, AVReceiverStatus_t *Zone2);
- int AudioConsoleSM(int Event);
-
-
- void RequestStatus();
-
- #endif /* AUDIOCONSOLE_H */
|