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 MCP1664_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM )
74#define MCP1664_RETVAL uint8_t
76#define MCP1664_OK 0x00
77#define MCP1664_INIT_ERROR 0xFF
84#define MCP1664_DEF_FREQ 20000
#define MCP1664_RETVAL
Definition mcp1664.h:74
void mcp1664_pwm_start(mcp1664_t *ctx)
Start PWM module.
void mcp1664_cfg_setup(mcp1664_cfg_t *cfg)
Config Object Initialization function.
void mcp1664_pwm_stop(mcp1664_t *ctx)
Stop PWM module.
void mcp1664_set_duty_cycle(mcp1664_t *ctx, float duty_cycle)
Generic sets PWM duty cycle.
MCP1664_RETVAL mcp1664_init(mcp1664_t *ctx, mcp1664_cfg_t *cfg)
Initialization function.
Click configuration structure definition.
Definition mcp1664.h:113
uint32_t dev_pwm_freq
Definition mcp1664.h:120
pin_name_t pwm
Definition mcp1664.h:116
Click ctx object definition.
Definition mcp1664.h:98
uint32_t pwm_freq
Definition mcp1664.h:105
pwm_t pwm
Definition mcp1664.h:101