blob: 1d70dc9e170ec4fc878340ddd1837a3b93de9855 (
plain) (
blame)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
// license:GPL-2.0+
// copyright-holders:Couriersud
/*
* nld_NE555.h
*
* NE555: PRECISION TIMERS
*
* +--------+
* GND |1 ++ 8| VCC
* TRIG |2 7| DISCH
* OUT |3 6| THRES
* RESET |4 5| CONT
* +--------+
*
* Naming conventions follow Texas Instruments datasheet
*
*/
#ifndef NLD_NE555_H_
#define NLD_NE555_H_
#include "../nl_base.h"
#include "../analog/nld_twoterm.h"
#define NE555(_name) \
NET_REGISTER_DEV(NE555, _name)
NETLIB_DEVICE(NE555,
NETLIB_NAME(R) m_R1;
NETLIB_NAME(R) m_R2;
NETLIB_NAME(R) m_R3;
NETLIB_NAME(R) m_RDIS;
netlist_logic_input_t m_RESET;
netlist_analog_input_t m_THRES;
netlist_analog_input_t m_TRIG;
netlist_analog_output_t m_OUT;
netlist_state_t<bool> m_last_out;
netlist_state_t<bool> m_ff;
inline nl_double clamp(const nl_double v, const nl_double a, const nl_double b);
);
#define NE555_DIP(_name) \
NET_REGISTER_DEV(NE555_dip, _name)
NETLIB_DEVICE_DERIVED(NE555_dip, NE555,
);
#endif /* NLD_NE555_H_ */
|