libstrat: convert to experimental new (super-accurate) sf allocation semantics
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
namespace ams::pwm {
|
||||
|
||||
void InitializeWith(std::shared_ptr<pwm::sf::IManager> &&sp);
|
||||
void InitializeWith(ams::sf::SharedPointer<pwm::sf::IManager> sp);
|
||||
void Finalize();
|
||||
|
||||
}
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
|
||||
namespace ams::pwm::server {
|
||||
|
||||
std::shared_ptr<pwm::sf::IManager> GetServiceObject();
|
||||
ams::sf::SharedPointer<pwm::sf::IManager> GetServiceObject();
|
||||
|
||||
}
|
||||
|
||||
@@ -18,18 +18,14 @@
|
||||
#include <vapours.hpp>
|
||||
#include <stratosphere/pwm/pwm_types.hpp>
|
||||
|
||||
namespace ams::pwm::sf {
|
||||
#define AMS_PWM_I_CHANNEL_SESSION_INTERFACE_INFO(C, H) \
|
||||
AMS_SF_METHOD_INFO(C, H, 0, Result, SetPeriod, (TimeSpanType period), (period) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 1, Result, GetPeriod, (ams::sf::Out<TimeSpanType> out), (out) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 2, Result, SetDuty, (int duty), (duty) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 3, Result, GetDuty, (ams::sf::Out<int> out), (out) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 4, Result, SetEnabled, (bool enabled), (enabled) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 5, Result, GetEnabled, (ams::sf::Out<bool> out), (out) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 6, Result, SetScale, (double scale), (scale), hos::Version_6_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 7, Result, GetScale, (ams::sf::Out<double> out), (out), hos::Version_6_0_0)
|
||||
|
||||
#define AMS_PWM_I_CHANNEL_SESSION_INTERFACE_INFO(C, H) \
|
||||
AMS_SF_METHOD_INFO(C, H, 0, Result, SetPeriod, (TimeSpanType period) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 1, Result, GetPeriod, (ams::sf::Out<TimeSpanType> out) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 2, Result, SetDuty, (int duty) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 3, Result, GetDuty, (ams::sf::Out<int> out) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 4, Result, SetEnabled, (bool enabled) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 5, Result, GetEnabled, (ams::sf::Out<bool> out) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 6, Result, SetScale, (double scale), hos::Version_6_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 7, Result, GetScale, (ams::sf::Out<double> out), hos::Version_6_0_0)
|
||||
|
||||
AMS_SF_DEFINE_INTERFACE(IChannelSession, AMS_PWM_I_CHANNEL_SESSION_INTERFACE_INFO)
|
||||
|
||||
}
|
||||
AMS_SF_DEFINE_INTERFACE(ams::pwm::sf, IChannelSession, AMS_PWM_I_CHANNEL_SESSION_INTERFACE_INFO)
|
||||
|
||||
@@ -20,13 +20,9 @@
|
||||
#include <stratosphere/pwm/pwm_select_channel_name.hpp>
|
||||
#include <stratosphere/pwm/sf/pwm_sf_i_channel_session.hpp>
|
||||
|
||||
namespace ams::pwm::sf {
|
||||
#define AMS_PWM_I_MANAGER_INTERFACE_INFO(C, H) \
|
||||
AMS_SF_METHOD_INFO(C, H, 0, Result, OpenSessionForDev, (ams::sf::Out<ams::sf::SharedPointer<pwm::sf::IChannelSession>> out, int channel), (out, channel) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 1, Result, OpenSession, (ams::sf::Out<ams::sf::SharedPointer<pwm::sf::IChannelSession>> out, pwm::ChannelName channel_name), (out, channel_name) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 2, Result, OpenSession2, (ams::sf::Out<ams::sf::SharedPointer<pwm::sf::IChannelSession>> out, DeviceCode device_code), (out, device_code), hos::Version_6_0_0)
|
||||
|
||||
#define AMS_PWM_I_MANAGER_INTERFACE_INFO(C, H) \
|
||||
AMS_SF_METHOD_INFO(C, H, 0, Result, OpenSessionForDev, (ams::sf::Out<std::shared_ptr<pwm::sf::IChannelSession>> out, int channel) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 1, Result, OpenSession, (ams::sf::Out<std::shared_ptr<pwm::sf::IChannelSession>> out, pwm::ChannelName channel_name) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 2, Result, OpenSession2, (ams::sf::Out<std::shared_ptr<pwm::sf::IChannelSession>> out, DeviceCode device_code), hos::Version_6_0_0)
|
||||
|
||||
AMS_SF_DEFINE_INTERFACE(IManager, AMS_PWM_I_MANAGER_INTERFACE_INFO)
|
||||
|
||||
}
|
||||
AMS_SF_DEFINE_INTERFACE(ams::pwm::sf, IManager, AMS_PWM_I_MANAGER_INTERFACE_INFO)
|
||||
|
||||
Reference in New Issue
Block a user