microwave2 2.0.0.0
microwave2.h File Reference

This file contains API for Microwave 2 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  microwave2_t
 Click ctx object definition. More...
 
struct  microwave2_cfg_t
 Click configuration structure definition. More...
 

Macros

#define MICROWAVE2_MAP_MIKROBUS(cfg, mikrobus)
 
#define MICROWAVE2_RETVAL   uint8_t
 
#define MICROWAVE2_OK   0x00
 
#define MICROWAVE2_INIT_ERROR   0xFF
 
#define DRV_RX_BUFFER_SIZE   500
 
#define MICROWAVE2_MOVING_AWAY   1
 
#define MICROWAVE2_MOVING_CLOSER   2
 
#define MICROWAVE2_STOPPED_MOVING   4
 

Functions

void microwave2_cfg_setup (microwave2_cfg_t *cfg)
 Config Object Initialization function.
 
MICROWAVE2_RETVAL microwave2_init (microwave2_t *ctx, microwave2_cfg_t *cfg)
 Initialization function.
 
void microwave2_generic_multi_write (microwave2_t *ctx, char *data_buf, uint8_t len)
 Generic multi write function.
 
int32_t microwave2_generic_read (microwave2_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
char microwave2_generic_single_read (microwave2_t *ctx)
 Generic single read function.
 
void microwave2_generic_single_write (microwave2_t *ctx, char tx_data)
 Generic single write function.
 
uint8_t microwave2_da_state (microwave2_t *ctx)
 Set pin DA.
 
uint8_t microwave2_dl_state (microwave2_t *ctx)
 Set pin DL.
 

Detailed Description

This file contains API for Microwave 2 Click driver.