Skip to content

Commit

Permalink
Add AVM headers, functions and enums
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew1Hawes authored and GaryOderNichts committed Feb 4, 2024
1 parent e20c2e7 commit c1115e5
Show file tree
Hide file tree
Showing 4 changed files with 400 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/avm/avm.dox
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* \defgroup avm avm
*
* AVM
* Audio/Video Manager
*/
132 changes: 132 additions & 0 deletions include/avm/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
#pragma once
#include <wut.h>
#include <tve/tve.h>
#include "tv.h"

/**
* \defgroup avm_config AVM System Config
* \ingroup avm
* @{
*/

#ifdef __cplusplus
extern "C" {
#endif

/**
* Reads the TV aspect ratio.
*
* \param outAspectRatio
* Pointer to write the aspect ratio to.
*
* \return
* \c 0 on success or a negative value on error.
*/
int32_t
AVMReadSystemAspectRatioConfig(AVMTvAspectRatio *outAspectRatio);

/**
* Reads the TV port.
*
* \param outPort
* Pointer to write the port to.
*
* \return
* \c 0 on success or a negative value on error.
*/
int32_t
AVMReadSystemPortConfig(TVEPort *outPort);

/**
* Reads the TV under scan.
*
* \param outUnderScan
* Pointer to write the under scan to.
*
* \return
* \c 0 on success or a negative value on error.
*/
int32_t
AVMReadSystemTVUnderScanConfig(uint32_t *outUnderScan);

/**
* Reads the TV resolution.
*
* \param outResolution
* Pointer to write the resolution to.
*
* \return
* \c 0 on success or a negative value on error.
*/
int32_t
AVMReadSystemVideoResConfig(AVMTvResolution *outResolution);

/**
* Writes the TV aspect ratio.
*
* \param aspectRatio
* Must be one of #AVMTvAspectRatio.
*
* \return
* \c 0 on success or a negative value on error.
*/
int32_t
AVMWriteSystemAspectRatioConfig(AVMTvAspectRatio aspectRatio);

/**
* Writes the TV under scan.
*
* \param underScan
* Must be less than \c 0x15 .
*
* \return
* \c 0 on success or a negative value on error.
*/
int32_t
AVMWriteSystemTVUnderScanConfig(uint32_t underScan);

/**
* Writes the TV port and resolution.
*
* \param port
* Must be one of #TVEPort.
*
* \param resolution
* Must be one of:
* - #AVM_TV_RESOLUTION_576I
* - #AVM_TV_RESOLUTION_480I
* - #AVM_TV_RESOLUTION_480P
* - #AVM_TV_RESOLUTION_720P
* - #AVM_TV_RESOLUTION_1080I
* - #AVM_TV_RESOLUTION_1080P
*
* \return
* \c 0 on success or a negative value on error.
*/
int32_t
AVMWriteSystemVideoOutConfig(TVEPort port,
AVMTvResolution resolution);

/**
* Writes the TV resolution.
*
* \param resolution
* Must be one of:
* - #AVM_TV_RESOLUTION_576I
* - #AVM_TV_RESOLUTION_480I
* - #AVM_TV_RESOLUTION_480P
* - #AVM_TV_RESOLUTION_720P
* - #AVM_TV_RESOLUTION_1080I
* - #AVM_TV_RESOLUTION_1080P
*
* \return
* \c 0 on success or a negative value on error.
*/
int32_t
AVMWriteSystemVideoResConfig(AVMTvResolution resolution);

#ifdef __cplusplus
}
#endif

/** @} */
Loading

0 comments on commit c1115e5

Please sign in to comment.