42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
64#define SHUTTLE_MAP_MIKROBUS( cfg, mikrobus ) \
65 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
66 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
67 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
68 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
69 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT ); \
70 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
71 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
72 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
73 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
74 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
75 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
76 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_TX )
83#define SHUTTLE_RETVAL uint8_t
85#define SHUTTLE_OK 0x00
86#define SHUTTLE_INIT_ERROR 0xFF
#define SHUTTLE_RETVAL
Definition shuttle.h:83
void shuttle_cfg_setup(shuttle_cfg_t *cfg)
Config Object Initialization function.
void shuttle_set_pin_high(digital_out_t *pin)
Set pin high function.
SHUTTLE_RETVAL shuttle_init(shuttle_t *ctx, shuttle_cfg_t *cfg)
Initialization function.
void shuttle_set_pin_low(digital_out_t *pin)
Set pin low function.
Click configuration structure definition.
Definition shuttle.h:125
pin_name_t sck
Definition shuttle.h:130
pin_name_t tx_pin
Definition shuttle.h:134
pin_name_t mosi
Definition shuttle.h:132
pin_name_t rx_pin
Definition shuttle.h:135
pin_name_t scl
Definition shuttle.h:128
pin_name_t int_pin
Definition shuttle.h:142
pin_name_t pwm
Definition shuttle.h:141
pin_name_t miso
Definition shuttle.h:131
pin_name_t sda
Definition shuttle.h:129
pin_name_t rst
Definition shuttle.h:140
pin_name_t an
Definition shuttle.h:139
pin_name_t cs
Definition shuttle.h:133
Click ctx object definition.
Definition shuttle.h:100
digital_out_t cs
Definition shuttle.h:108
digital_out_t sck
Definition shuttle.h:105
digital_out_t mosi
Definition shuttle.h:107
digital_out_t pwm
Definition shuttle.h:116
digital_out_t sda
Definition shuttle.h:104
digital_out_t int_pin
Definition shuttle.h:117
digital_out_t rst
Definition shuttle.h:115
digital_out_t rx_pin
Definition shuttle.h:110
digital_out_t scl
Definition shuttle.h:103
digital_out_t tx_pin
Definition shuttle.h:109
digital_out_t miso
Definition shuttle.h:106
digital_out_t an
Definition shuttle.h:114