1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: y2r_Y2r.h 4 5 Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Rev: 35746 $ 14 *---------------------------------------------------------------------------*/ 15 16 // 17 // Do not edit this file. 18 // This file is automatically generated. 19 // 20 21 #ifndef NN_Y2R_CTR_Y2R_Y2R_H_ 22 #define NN_Y2R_CTR_Y2R_Y2R_H_ 23 24 #include <nn/Handle.h> 25 #include <nn/Result.h> 26 #include <nn/types.h> 27 #include <nn/y2r/CTR/y2r_Types.h> 28 29 30 31 namespace nn { 32 namespace y2r { 33 namespace CTR { 34 namespace detail { 35 36 class Y2r 37 { 38 public: 39 enum Tag 40 { 41 TAG_IPC_ERROR, 42 TAG_SET_INPUT_FORMAT = 0x0001, 43 TAG_GET_INPUT_FORMAT = 0x0002, 44 TAG_SET_OUTPUT_FORMAT = 0x0003, 45 TAG_GET_OUTPUT_FORMAT = 0x0004, 46 TAG_SET_ROTATION = 0x0005, 47 TAG_GET_ROTATION = 0x0006, 48 TAG_SET_BLOCK_ALIGNMENT = 0x0007, 49 TAG_GET_BLOCK_ALIGNMENT = 0x0008, 50 TAG_SET_SPACIAL_DITHERING = 0x0009, 51 TAG_GET_SPACIAL_DITHERING = 0x000a, 52 TAG_SET_TEMPORAL_DITHERING = 0x000b, 53 TAG_GET_TEMPORAL_DITHERING = 0x000c, 54 TAG_SET_TRANSFER_END_INTERRUPT = 0x000d, 55 TAG_GET_TRANSFER_END_INTERRUPT = 0x000e, 56 TAG_GET_TRANSFER_END_EVENT = 0x000f, 57 TAG_SET_SENDING_Y = 0x0010, 58 TAG_SET_SENDING_U = 0x0011, 59 TAG_SET_SENDING_V = 0x0012, 60 TAG_SET_SENDING_YUV = 0x0013, 61 TAG_IS_FINISHED_SENDING_YUV = 0x0014, 62 TAG_IS_FINISHED_SENDING_Y = 0x0015, 63 TAG_IS_FINISHED_SENDING_U = 0x0016, 64 TAG_IS_FINISHED_SENDING_V = 0x0017, 65 TAG_SET_RECEIVING = 0x0018, 66 TAG_IS_FINISHED_RECEIVING = 0x0019, 67 TAG_SET_INPUT_LINE_WIDTH = 0x001a, 68 TAG_GET_INPUT_LINE_WIDTH = 0x001b, 69 TAG_SET_INPUT_LINES = 0x001c, 70 TAG_GET_INPUT_LINES = 0x001d, 71 TAG_SET_COEFFICIENT_PARAMS = 0x001e, 72 TAG_GET_COEFFICIENT_PARAMS = 0x001f, 73 TAG_SET_STANDARD_COEFFICIENT = 0x0020, 74 TAG_GET_STANDARD_COEFFICIENT_PARAMS = 0x0021, 75 TAG_SET_ALPHA = 0x0022, 76 TAG_GET_ALPHA = 0x0023, 77 TAG_SET_DITHERING_WEIGHT_PARAMS = 0x0024, 78 TAG_GET_DITHERING_WEIGHT_PARAMS = 0x0025, 79 TAG_START_CONVERSION = 0x0026, 80 TAG_STOP_CONVERSION = 0x0027, 81 TAG_IS_BUSY_CONVERSION = 0x0028, 82 TAG_SET_PACKAGE_PARAMETER = 0x0029, 83 TAG_PING_PROCESS = 0x002a, 84 TAG_DRIVER_INITIALIZE = 0x002b, 85 TAG_DRIVER_FINALIZE = 0x002c, 86 TAG_GET_PACKAGE_PARAMETER = 0x002d, 87 TAG_IPC_END 88 }; 89 90 public: 91 static Handle s_Session; 92 93 public: Y2r()94 Y2r() {} 95 96 public: 97 static nn::Result SetInputFormat( nn::y2r::CTR::InputFormat format ); 98 static nn::Result GetInputFormat( nn::y2r::CTR::InputFormat* pFormat ); 99 static nn::Result SetOutputFormat( nn::y2r::CTR::OutputFormat format ); 100 static nn::Result GetOutputFormat( nn::y2r::CTR::OutputFormat* pFormat ); 101 static nn::Result SetRotation( nn::y2r::CTR::Rotation rotation ); 102 static nn::Result GetRotation( nn::y2r::CTR::Rotation* pRotation ); 103 static nn::Result SetBlockAlignment( nn::y2r::CTR::BlockAlignment align ); 104 static nn::Result GetBlockAlignment( nn::y2r::CTR::BlockAlignment* pAlign ); 105 static nn::Result SetSpacialDithering( bool enable ); 106 static nn::Result GetSpacialDithering( bool* pEnable ); 107 static nn::Result SetTemporalDithering( bool enable ); 108 static nn::Result GetTemporalDithering( bool* pEnable ); 109 static nn::Result SetTransferEndInterrupt( bool enable ); 110 static nn::Result GetTransferEndInterrupt( bool* pEnable ); 111 static nn::Result GetTransferEndEvent( nn::Handle* pHandle ); 112 static nn::Result SetSendingY( nn::Handle srcProcess, u32 pSrc, size_t imageSize, s16 transferUnit, s16 transferStride ); 113 static nn::Result SetSendingU( nn::Handle srcProcess, u32 pSrc, size_t imageSize, s16 transferUnit, s16 transferStride ); 114 static nn::Result SetSendingV( nn::Handle srcProcess, u32 pSrc, size_t imageSize, s16 transferUnit, s16 transferStride ); 115 static nn::Result SetSendingYuv( nn::Handle srcProcess, u32 pSrc, size_t imageSize, s16 transferUnit, s16 transferStride ); 116 static nn::Result IsFinishedSendingYuv( bool* pState ); 117 static nn::Result IsFinishedSendingY( bool* pState ); 118 static nn::Result IsFinishedSendingU( bool* pState ); 119 static nn::Result IsFinishedSendingV( bool* pState ); 120 static nn::Result SetReceiving( nn::Handle dstProcess, u32 pDst, size_t imageSize, s16 transferUnit, s16 transferStride ); 121 static nn::Result IsFinishedReceiving( bool* pState ); 122 static nn::Result SetInputLineWidth( s16 width ); 123 static nn::Result GetInputLineWidth( s16* pWidth ); 124 static nn::Result SetInputLines( s16 lines ); 125 static nn::Result GetInputLines( s16* pLines ); 126 static nn::Result SetCoefficientParams( const nn::y2r::CTR::CoefficientParams& src ); 127 static nn::Result GetCoefficientParams( nn::y2r::CTR::CoefficientParams* pDst ); 128 static nn::Result SetStandardCoefficient( nn::y2r::CTR::StandardCoefficient no ); 129 static nn::Result GetStandardCoefficientParams( nn::y2r::CTR::CoefficientParams* pDst, nn::y2r::CTR::StandardCoefficient no ); 130 static nn::Result SetAlpha( s16 alpha ); 131 static nn::Result GetAlpha( s16* pAlpha ); 132 static nn::Result SetDitheringWeightParams( const nn::y2r::CTR::DitheringWeightParams& w ); 133 static nn::Result GetDitheringWeightParams( nn::y2r::CTR::DitheringWeightParams* pW ); 134 static nn::Result StartConversion(); 135 static nn::Result StopConversion(); 136 static nn::Result IsBusyConversion( bool* pState ); 137 static nn::Result SetPackageParameter( const nn::y2r::CTR::PackageParameter& param ); 138 static nn::Result PingProcess( u8* connectedNumber ); 139 static nn::Result DriverInitialize(); 140 static nn::Result DriverFinalize(); 141 static nn::Result GetPackageParameter( nn::y2r::CTR::PackageParameter* pParam ); 142 }; 143 144 } // end of namespace detail 145 } // end of namespace CTR 146 } // end of namespace y2r 147 } // end of namespace nn 148 149 150 151 #endif // ifndef NN_Y2R_CTR_Y2R_Y2R_H_ 152