1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use crate::result::*;
use crate::ipc::sf;
use crate::ipc::sf::mii;
use crate::util;
use crate::version;

#[derive(Copy, Clone, PartialEq, Eq, Debug, Default)]
#[repr(C)]
pub struct FirmwareVersion {
    pub major: u8,
    pub minor: u8,
    pub micro: u8,
    pub pad_1: u8,
    pub revision_major: u8,
    pub revision_minor: u8,
    pub pad_2: u8,
    pub pad_3: u8,
    pub platform: util::CString<0x20>,
    pub version_hash: util::CString<0x40>,
    pub display_version: util::CString<0x18>,
    pub display_title: util::CString<0x80>
}
const_assert!(core::mem::size_of::<FirmwareVersion>() == 0x100);

ipc_sf_define_interface_trait! {
    trait ISystemSettingsServer {
        get_firmware_version [3, version::VersionInterval::all()]: (out_version: sf::OutFixedPointerBuffer<FirmwareVersion>) => ();
        get_firmware_version_2 [4, version::VersionInterval::from(version::Version::new(3,0,0))]: (out_version: sf::OutFixedPointerBuffer<FirmwareVersion>) => ();
        get_mii_author_id [90, version::VersionInterval::all()]: () => (id: mii::CreateId);
    }
}