set:sys: add ProductModel enums (#538)

This commit is contained in:
Jeremy S. Postelnek 2021-04-02 13:34:40 -04:00 committed by GitHub
parent 7e29719263
commit c5a9a909a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 4 deletions

View File

@ -23,6 +23,17 @@ typedef enum {
ColorSetId_Dark = 1, ColorSetId_Dark = 1,
} ColorSetId; } ColorSetId;
/// Console Product Models
typedef enum {
SetSysProductModel_Invalid = 0, ///< Invalid Model
SetSysProductModel_Nx = 1, ///< Erista Model
SetSysProductModel_Copper = 2, ///< Erista "Simulation" Model
SetSysProductModel_Iowa = 3, ///< Mariko Model
SetSysProductModel_Hoag = 4, ///< Mariko Lite Model
SetSysProductModel_Calcio = 5, ///< Mariko "Simulation" Model
SetSysProductModel_Aula = 6, ///< Mariko Pro Model(?)
} SetSysProductModel;
/// IDs for Language. /// IDs for Language.
typedef enum typedef enum
{ {
@ -1390,9 +1401,9 @@ Result setsysSetDeviceNickname(const SetSysDeviceNickName *nickname);
/** /**
* @brief GetProductModel * @brief GetProductModel
* @param[out] out Output ProductModel. * @param[out] model Output SetSysProductModel.
*/ */
Result setsysGetProductModel(s32 *out); Result setsysGetProductModel(SetSysProductModel *model);
/** /**
* @brief GetLdnChannel * @brief GetLdnChannel

View File

@ -637,8 +637,11 @@ Result setsysSetDeviceNickname(const SetSysDeviceNickName *nickname) {
); );
} }
Result setsysGetProductModel(s32 *out) { Result setsysGetProductModel(SetSysProductModel *model) {
return _setCmdNoInOutU32(&g_setsysSrv, (u32*)out, 79); u32 product_model = 0;
Result rc = _setCmdNoInOutU32(&g_setsysSrv, &product_model, 79);
if (R_SUCCEEDED(rc) && model) *model = product_model;
return rc;
} }
Result setsysGetLdnChannel(s32 *out) { Result setsysGetLdnChannel(s32 *out) {