Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AVM and TVE headers, functions and enums #345

Merged
merged 2 commits into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
GaryOderNichts marked this conversation as resolved.
Show resolved Hide resolved
* 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
GaryOderNichts marked this conversation as resolved.
Show resolved Hide resolved
* 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
Loading