42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
66#define IRBEACON_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
68 cfg.mod = MIKROBUS( mikrobus, MIKROBUS_AN );
75#define IRBEACON_RETVAL uint8_t
77#define IRBEACON_OK 0x00
78#define IRBEACON_INIT_ERROR 0xFF
85#define IRBEACON_DEF_FREQ 5000
#define IRBEACON_RETVAL
Definition irbeacon.h:75
void irbeacon_pwm_stop(irbeacon_t *ctx)
Stop PWM module.
void irbeacon_cfg_setup(irbeacon_cfg_t *cfg)
Config Object Initialization function.
IRBEACON_RETVAL irbeacon_init(irbeacon_t *ctx, irbeacon_cfg_t *cfg)
Initialization function.
void irbeacon_reset_mod(irbeacon_t *ctx)
Reset MOD function.
void irbeacon_enable_mod(irbeacon_t *ctx)
Enable MOD function.
void irbeacon_set_duty_cycle(irbeacon_t *ctx, float duty_cycle)
Generic sets PWM duty cycle.
void irbeacon_disable_mod(irbeacon_t *ctx)
Disable MOD function.
void irbeacon_pwm_start(irbeacon_t *ctx)
Start PWM module.
Click configuration structure definition.
Definition irbeacon.h:120
pin_name_t mod
Definition irbeacon.h:127
uint32_t dev_pwm_freq
Definition irbeacon.h:132
pin_name_t pwm
Definition irbeacon.h:123
Click ctx object definition.
Definition irbeacon.h:99
digital_out_t mod
Definition irbeacon.h:103
uint32_t pwm_freq
Definition irbeacon.h:112
pwm_t pwm
Definition irbeacon.h:107
uint16_t pwm_period
Definition irbeacon.h:111