42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
65#define UPS_MAP_MIKROBUS( cfg, mikrobus ) \
66 cfg.an= MIKROBUS( mikrobus, MIKROBUS_AN ); \
67 cfg.rst= MIKROBUS( mikrobus, MIKROBUS_RST ); \
68 cfg.cs= MIKROBUS( mikrobus, MIKROBUS_CS ); \
75#define UPS_RETVAL uint8_t
78#define UPS_INIT_ERROR 0xFF
85#define UPS_MODE_ACTIVE 1
86#define UPS_MODE_SLEEP 0
#define UPS_RETVAL
Definition ups.h:75
uint8_t ups_get_power_good(ups_t *ctx)
Functions for reading PGD state.
UPS_RETVAL ups_init(ups_t *ctx, ups_cfg_t *cfg)
Initialization function.
void ups_cfg_setup(ups_cfg_t *cfg)
Config Object Initialization function.
void usp_set_mode(ups_t *ctx, uint8_t mode)
Functions for settings chip mode.
Click configuration structure definition.
Definition ups.h:116
pin_name_t rst
Definition ups.h:120
pin_name_t an
Definition ups.h:119
pin_name_t cs
Definition ups.h:121
Click ctx object definition.
Definition ups.h:100
digital_in_t cs
Definition ups.h:108
digital_in_t an
Definition ups.h:107
digital_out_t rst
Definition ups.h:103