summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/devices/nld_mm5837.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/devices/nld_mm5837.cpp')
-rw-r--r--src/lib/netlist/devices/nld_mm5837.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/lib/netlist/devices/nld_mm5837.cpp b/src/lib/netlist/devices/nld_mm5837.cpp
index 45b97ade9ef..cd92ce1e5df 100644
--- a/src/lib/netlist/devices/nld_mm5837.cpp
+++ b/src/lib/netlist/devices/nld_mm5837.cpp
@@ -1,4 +1,4 @@
-// license:GPL-2.0+
+// license:BSD-3-Clause
// copyright-holders:Couriersud
/*
* nld_MM5837.cpp
@@ -19,10 +19,8 @@
#include "analog/nlid_twoterm.h"
#include "solver/nld_matrix_solver.h"
-namespace netlist
-{
- namespace devices
- {
+namespace netlist::devices {
+
NETLIB_OBJECT(MM5837)
{
NETLIB_CONSTRUCTOR(MM5837)
@@ -43,14 +41,14 @@ namespace netlist
// output
connect("_RV.2", "VDD");
- register_subalias("OUT", "_RV.1");
+ register_sub_alias("OUT", "_RV.1");
}
NETLIB_RESETI()
{
//m_V0.initial(0.0);
//m_RV.do_reset();
- m_RV.set_G_V_I(plib::reciprocal(m_R_LOW()),
+ m_RV().set_G_V_I(plib::reciprocal(m_R_LOW()),
nlconst::zero(),
nlconst::zero());
m_inc = netlist_time::from_fp(plib::reciprocal(m_FREQ()));
@@ -88,15 +86,15 @@ namespace netlist
const nl_fptype R = state ? m_R_HIGH : m_R_LOW;
const nl_fptype V = state ? m_VDD() : m_VSS();
- m_RV.change_state([this, &R, &V]()
+ m_RV().change_state([this, &R, &V]()
{
- m_RV.set_G_V_I(plib::reciprocal(R), V, nlconst::zero());
+ m_RV().set_G_V_I(plib::reciprocal(R), V, nlconst::zero());
});
}
}
- analog::NETLIB_SUB(twoterm) m_RV;
+ NETLIB_SUB_NS(analog, two_terminal) m_RV;
analog_input_t m_VDD;
analog_input_t m_VGG;
analog_input_t m_VSS;
@@ -115,5 +113,4 @@ namespace netlist
NETLIB_DEVICE_IMPL(MM5837, "MM5837", "")
- } //namespace devices
-} // namespace netlist
+} // namespace netlist::devices