HID services: Difference between revisions

Line 1,309: Line 1,309:
Takes an input s32 entry-index, returns an output bool.
Takes an input s32 entry-index, returns an output bool.


Uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. Then the output bool is set to [[Settings_services#ButtonConfigSettings|IsEmpty]] bit0 == 0. Then 0 is returned.
Uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. Then the output bool is set to [[Settings_services#ButtonConfigSettings|IsFull]] bit0 == 0. Then 0 is returned.


== IsButtonConfigStorageFullEmpty ==
== IsButtonConfigStorageFullEmpty ==
Takes an input s32, returns an output bool.
Takes an input s32 entry-index, returns an output bool.


Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with a different setsys cmd.
Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with a different setsys cmd.


== IsButtonConfigStorageLeftEmpty ==
== IsButtonConfigStorageLeftEmpty ==
Takes an input s32, returns an output bool.
Takes an input s32 entry-index, returns an output bool.


Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with a different setsys cmd.
Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with a different setsys cmd.


== IsButtonConfigStorageRightEmpty ==
== IsButtonConfigStorageRightEmpty ==
Takes an input s32, returns an output bool.
Takes an input s32 entry-index, returns an output bool.


Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with a different setsys cmd.
Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with a different setsys cmd.


== GetButtonConfigStorageEmbedded ==
== GetButtonConfigStorageEmbedded ==
Takes an input s32, and a type-0x16 output buffer containing a [[#ButtonConfigEmbedded]].
Takes an input s32 entry-index, and a type-0x16 output buffer containing a [[#ButtonConfigEmbedded]].


Uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. Then an error is thrown if [[Settings_services#ButtonConfigSettings|IsEmpty]] bit0 is clear. Then the data at +0x1C8 is converted to [[#ButtonConfigEmbedded]], copied to output, and returns 0.
Uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. Then an error is thrown if [[Settings_services#ButtonConfigSettings|IsFull]] bit0 is clear. Then the data at +0x1C8 is converted to [[#ButtonConfigEmbedded]], copied to output, and returns 0.


== GetButtonConfigStorageFull ==
== GetButtonConfigStorageFull ==
Takes an input s32, and a type-0x16 output buffer containing a [[#ButtonConfigFull]].
Takes an input s32 entry-index, and a type-0x16 output buffer containing a [[#ButtonConfigFull]].


Same as [[#GetButtonConfigStorageEmbedded]], except this uses a different setsys cmd, and uses a different conversion func / different output struct.
Same as [[#GetButtonConfigStorageEmbedded]], except this uses a different setsys cmd, and uses a different conversion func / different output struct.


== GetButtonConfigStorageLeft ==
== GetButtonConfigStorageLeft ==
Takes an input s32, and a type-0x16 output buffer containing a [[#ButtonConfigLeft]].
Takes an input s32 entry-index, and a type-0x16 output buffer containing a [[#ButtonConfigLeft]].


Same as [[#GetButtonConfigStorageEmbedded]], except this uses a different setsys cmd, and uses a different conversion func / different output struct.
Same as [[#GetButtonConfigStorageEmbedded]], except this uses a different setsys cmd, and uses a different conversion func / different output struct.


== GetButtonConfigStorageRight ==
== GetButtonConfigStorageRight ==
Takes an input s32, and a type-0x16 output buffer containing a [[#ButtonConfigRight]].
Takes an input s32 entry-index, and a type-0x16 output buffer containing a [[#ButtonConfigRight]].


Same as [[#GetButtonConfigStorageEmbedded]], except this uses a different setsys cmd, and uses a different conversion func / different output struct.
Same as [[#GetButtonConfigStorageEmbedded]], except this uses a different setsys cmd, and uses a different conversion func / different output struct.


== SetButtonConfigStorageEmbedded ==
== SetButtonConfigStorageEmbedded ==
Takes an input s32, and a type-0x15 input buffer containing a [[#ButtonConfigEmbedded]].
Takes an input s32 entry-index, and a type-0x15 input buffer containing a [[#ButtonConfigEmbedded]].


If the input config matches config in state, this first does:  
If the input config matches config in state, this first does:  
* Uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. When [[Settings_services#ButtonConfigSettings|IsEmpty]] is set, the config is deleted the same way as [[#DeleteButtonConfigStorageEmbedded]] (following the IsEmpty check).
* Uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. When [[Settings_services#ButtonConfigSettings|IsFull]] is set, the config is deleted the same way as [[#DeleteButtonConfigStorageEmbedded]] (following the IsFull check).


Afterwards, this uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. The input struct is converted, the output from that is copied to +0x1C8 size 0x3E0, IsEmpty is set, [[Settings_services#SetButtonConfigSettingsEmbedded|SetButtonConfigSettingsEmbedded]] is used with the updated array, and then returns 0.
Afterwards, this uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. The input struct is converted, the output from that is copied to +0x1C8 size 0x3E0, IsFull is set, [[Settings_services#SetButtonConfigSettingsEmbedded|SetButtonConfigSettingsEmbedded]] is used with the updated array, and then returns 0.


== SetButtonConfigStorageFull ==
== SetButtonConfigStorageFull ==
Takes an input s32, and a type-0x15 input buffer containing a [[#ButtonConfigFull]].
Takes an input s32 entry-index, and a type-0x15 input buffer containing a [[#ButtonConfigFull]].


Same as [[#SetButtonConfigStorageEmbedded]], except this uses different setsys cmds, and uses a different structs etc.
Same as [[#SetButtonConfigStorageEmbedded]], except this uses different setsys cmds, and uses a different structs etc.


== SetButtonConfigStorageLeft ==
== SetButtonConfigStorageLeft ==
Takes an input s32, and a type-0x15 input buffer containing a [[#ButtonConfigLeft]].
Takes an input s32 entry-index, and a type-0x15 input buffer containing a [[#ButtonConfigLeft]].


Same as [[#SetButtonConfigStorageEmbedded]], except this uses different setsys cmds, and uses a different structs etc.
Same as [[#SetButtonConfigStorageEmbedded]], except this uses different setsys cmds, and uses a different structs etc.


== SetButtonConfigStorageRight ==
== SetButtonConfigStorageRight ==
Takes an input s32, and a type-0x15 input buffer containing a [[#ButtonConfigRight]].
Takes an input s32 entry-index, and a type-0x15 input buffer containing a [[#ButtonConfigRight]].


Same as [[#SetButtonConfigStorageEmbedded]], except this uses different setsys cmds, and uses a different structs etc.
Same as [[#SetButtonConfigStorageEmbedded]], except this uses different setsys cmds, and uses a different structs etc.


== DeleteButtonConfigStorageEmbedded ==
== DeleteButtonConfigStorageEmbedded ==
Takes an input s32, no output.
Takes an input s32 entry-index, no output.


Uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. Then an error is thrown if [[Settings_services#ButtonConfigSettings|IsEmpty]] bit0 is clear. Then the data at +0x1C8 size 0x3E0 is cleared, IsEmpty bit0 is cleared, [[Settings_services#SetButtonConfigSettingsEmbedded|SetButtonConfigSettingsEmbedded]] is used with the updated array, and then returns 0.
Uses [[Settings_services#GetButtonConfigSettingsEmbedded|GetButtonConfigSettingsEmbedded]] with count=5 (output s32 ignored). The input entry-index is used with this array. Then an error is thrown if [[Settings_services#ButtonConfigSettings|IsFull]] bit0 is clear. Then the data at +0x1C8 size 0x3E0 is cleared, IsFull bit0 is cleared, [[Settings_services#SetButtonConfigSettingsEmbedded|SetButtonConfigSettingsEmbedded]] is used with the updated array, and then returns 0.


== DeleteButtonConfigStorageEmbedded ==
== DeleteButtonConfigStorageEmbedded ==
Takes an input s32, no output.
Takes an input s32 entry-index, no output.


Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with different setsys cmds.
Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with different setsys cmds.


== DeleteButtonConfigStorageLeft ==
== DeleteButtonConfigStorageLeft ==
Takes an input s32, no output.
Takes an input s32 entry-index, no output.


Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with different setsys cmds.
Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with different setsys cmds.


== DeleteButtonConfigStorageRight ==
== DeleteButtonConfigStorageRight ==
Takes an input s32, no output.
Takes an input s32 entry-index, no output.


Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with different setsys cmds.
Same as [[#IsButtonConfigStorageEmbeddedEmpty]] except with different setsys cmds.