-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bbcf70d
commit 34ad457
Showing
2 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
#pragma once | ||
#include <wut.h> | ||
#include <tve/cec.h> | ||
|
||
/** | ||
* \defgroup avm_cec AVM HDMI CEC | ||
* \ingroup avm | ||
* @{ | ||
*/ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* Initializes CEC. | ||
* | ||
* \return | ||
* \c TRUE on success. | ||
*/ | ||
BOOL | ||
AVMCECInit(void); | ||
|
||
/** | ||
* Enable CEC. | ||
*/ | ||
void | ||
AVMEnableCEC(void); | ||
|
||
/** | ||
* Disable CEC. | ||
*/ | ||
void | ||
AVMDisableCEC(void); | ||
|
||
/** | ||
* Sends a CEC command. | ||
* | ||
* \param destination | ||
* Logical address of the device where the command should be sent to. | ||
* | ||
* \param opCode | ||
* The op code of the command to send. | ||
* | ||
* \param parameters | ||
* Pointer to optional command parameters. | ||
* | ||
* \param numParameters | ||
* The amount of additional parameters. | ||
* | ||
* \return | ||
* \c TRUE on success. | ||
*/ | ||
BOOL | ||
AVMCECSendCommand(TVECECLogicalAddress destination, | ||
TVECECOpCode opCode, | ||
uint8_t *parameters, | ||
uint8_t numParameters); | ||
|
||
/** | ||
* Get the last receieved CEC command. | ||
* | ||
* \param outInitiator | ||
* Pointer to store the logical address of the initiator of the command to. | ||
* | ||
* \param outOpCode | ||
* Pointer to store the op code of the command to. | ||
* | ||
* \param outParameters | ||
* Pointer to store additional parameters to. | ||
* | ||
* \param numParameters | ||
* Pointer to store the amount of additional parameters to. | ||
* | ||
* \return | ||
* \c TRUE on success. | ||
* | ||
* \warning | ||
* This will return success even if no new command has been receieved. | ||
* The caller should check that the parameters were actually written to. | ||
*/ | ||
BOOL | ||
AVMCECReceiveCommand(TVECECLogicalAddress *outInitiator, | ||
TVECECOpCode *outOpCode, | ||
uint8_t *outParameters, | ||
uint8_t *outNumParameters); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#include <avm/cec.h> | ||
#include <avm/config.h> | ||
#include <avm/drc.h> | ||
#include <avm/tv.h> | ||
|