File tree Expand file tree Collapse file tree 2 files changed +0
-41
lines changed Expand file tree Collapse file tree 2 files changed +0
-41
lines changed Original file line number Diff line number Diff line change @@ -200,40 +200,6 @@ void systemBus::init_gpio(gpio_num_t _pin)
200200 return ;
201201}
202202
203- #ifdef IEC_ASSERT_RELEASE_AS_FUNCTIONS
204- // true => ASSERT => LOW
205- void IRAM_ATTR systemBus::pull ( uint8_t _pin )
206- {
207- int _reg = GPIO_ENABLE_REG;
208- if (_pin > 31 )
209- {
210- _reg = GPIO_ENABLE1_REG, _pin -= 32 ;
211- }
212- REG_SET_BIT (_reg, 1ULL << _pin); // GPIO_MODE_OUTPUT
213- }
214-
215- // false => RELEASE => HIGH
216- void IRAM_ATTR systemBus::release ( uint8_t _pin )
217- {
218- int _reg = GPIO_ENABLE_REG;
219- if (_pin > 31 )
220- {
221- _reg = GPIO_ENABLE1_REG, _pin -= 32 ;
222- }
223- REG_CLR_BIT (_reg, 1ULL << _pin); // GPIO_MODE_INPUT
224- }
225-
226- bool IRAM_ATTR systemBus::status ( uint8_t _pin )
227- {
228- int _reg = GPIO_IN_REG;
229- if (_pin > 31 )
230- {
231- _reg = GPIO_IN1_REG, _pin -= 32 ;
232- }
233- return (REG_READ (_reg) & BIT (_pin)) ? RELEASED : ASSERTED;
234- }
235- #endif
236-
237203bool IRAM_ATTR systemBus::status ()
238204{
239205 // uint64_t pin_states;
Original file line number Diff line number Diff line change 99
1010#include " ../../include/cbm_defines.h"
1111
12- #ifndef IEC_ASSERT_RELEASE_AS_FUNCTIONS
1312#define IEC_RELEASE (pin ) ({ \
1413 uint32_t _pin = pin; \
1514 uint32_t _mask = 1 << (_pin % 32 ); \
3938 })
4039#endif /* !IEC_INVERTED_LINES */
4140
42- #else
43- #define IEC_IS_ASSERTED (x ) status(x)
44- #define IEC_ASSERT (x ) pull(x)
45- #define IEC_RELEASE (x ) release(x)
46- #endif
47-
4841namespace Protocol
4942{
5043 /* *
You can’t perform that action at this time.
0 commit comments