39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
72#define TERMINAL2_MAP_MIKROBUS( cfg, mikrobus ) \
73 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
74 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
75 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
76 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
77 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT ); \
78 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
79 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
80 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
81 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
82 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
83 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
84 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_TX )
void terminal2_cfg_setup(terminal2_cfg_t *cfg)
Terminal 2 configuration object setup function.
void terminal2_set_all_pins_low(terminal2_t *ctx)
Terminal 2 set all pins low function.
err_t terminal2_init(terminal2_t *ctx, terminal2_cfg_t *cfg)
Terminal 2 initialization function.
void terminal2_toggle_pin(digital_out_t *pin)
Terminal 2 toggle pin function.
void terminal2_set_pin_low(digital_out_t *pin)
Terminal 2 set pin low function.
void terminal2_set_all_pins_high(terminal2_t *ctx)
Terminal 2 set all pins high function.
void terminal2_set_pin_high(digital_out_t *pin)
Terminal 2 set pin high function.
void terminal2_toggle_all_pins(terminal2_t *ctx)
Terminal 2 toggle all pins function.
Terminal 2 Click configuration object.
Definition terminal2.h:115
pin_name_t sck
Definition terminal2.h:118
pin_name_t tx_pin
Definition terminal2.h:122
pin_name_t mosi
Definition terminal2.h:120
pin_name_t rx_pin
Definition terminal2.h:123
pin_name_t scl
Definition terminal2.h:116
pin_name_t int_pin
Definition terminal2.h:127
pin_name_t pwm
Definition terminal2.h:126
pin_name_t miso
Definition terminal2.h:119
pin_name_t sda
Definition terminal2.h:117
pin_name_t rst
Definition terminal2.h:125
pin_name_t an
Definition terminal2.h:124
pin_name_t cs
Definition terminal2.h:121
Terminal 2 Click context object.
Definition terminal2.h:94
digital_out_t cs
Definition terminal2.h:100
digital_out_t sck
Definition terminal2.h:97
digital_out_t mosi
Definition terminal2.h:99
digital_out_t pwm
Definition terminal2.h:105
digital_out_t sda
Definition terminal2.h:96
digital_out_t int_pin
Definition terminal2.h:106
digital_out_t rst
Definition terminal2.h:104
digital_out_t rx_pin
Definition terminal2.h:102
digital_out_t scl
Definition terminal2.h:95
digital_out_t tx_pin
Definition terminal2.h:101
digital_out_t miso
Definition terminal2.h:98
digital_out_t an
Definition terminal2.h:103
terminal2_return_value_t
Terminal 2 Click return value data.
Definition terminal2.h:136
@ TERMINAL2_OK
Definition terminal2.h:137
@ TERMINAL2_ERROR
Definition terminal2.h:138