42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
54#include "drv_spi_master.h"
68#define LEDRINGR_MAP_MIKROBUS( cfg, mikrobus ) \
69 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
70 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
71 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
72 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
73 cfg.mr = MIKROBUS( mikrobus, MIKROBUS_RST );
81#define LEDRINGR_RETVAL uint8_t
83#define LEDRINGR_OK 0x00
84#define LEDRINGR_INIT_ERROR 0xFF
#define LEDRINGR_RETVAL
Definition ledringr.h:81
void ledringr_turn_on_led(ledringr_t *ctx, uint8_t led_position)
Turn On LED by position.
void ledringr_led_ring_set(ledringr_t *ctx)
Set led.
void ledringr_cfg_setup(ledringr_cfg_t *cfg)
Config Object Initialization function.
LEDRINGR_RETVAL ledringr_init(ledringr_t *ctx, ledringr_cfg_t *cfg)
Initialization function.
void ledringr_transfer_data(ledringr_t *ctx, uint8_t *write_buf, uint16_t wbuf_size, uint8_t *read_buf, uint16_t rbuf_size)
Transfer data function.
void ledringr_led_ring_reset(ledringr_t *ctx)
Set led.
void ledringr_write_data(ledringr_t *ctx, uint32_t data_to_write)
Generic write function.
Click configuration structure definition.
Definition ledringr.h:116
uint8_t spi_mode
Definition ledringr.h:131
spi_master_chip_select_polarity_t cs_polarity
Definition ledringr.h:132
pin_name_t mr
Definition ledringr.h:126
pin_name_t sck
Definition ledringr.h:121
pin_name_t mosi
Definition ledringr.h:120
uint32_t spi_speed
Definition ledringr.h:130
pin_name_t miso
Definition ledringr.h:119
pin_name_t cs
Definition ledringr.h:122
Click ctx object definition.
Definition ledringr.h:99
digital_out_t cs
Definition ledringr.h:103
spi_master_t spi
Definition ledringr.h:107
digital_out_t mr
Definition ledringr.h:102
pin_name_t chip_select
Definition ledringr.h:108