linefollower 2.0.0.0
linefollower.h File Reference

This file contains API for Line Follower Click driver. More...

#include "drv_digital_in.h"

Go to the source code of this file.

Data Structures

struct  linefollower_t
 Click ctx object definition. More...
 
struct  linefollower_cfg_t
 Click configuration structure definition. More...
 
struct  linefollower_direction_t
 

Macros

#define LINEFOLLOWER_MAP_MIKROBUS(cfg, mikrobus)
 
#define LINEFOLLOWER_RETVAL   uint8_t
 
#define LINEFOLLOWER_OK   0x00
 
#define LINEFOLLOWER_INIT_ERROR   0xFF
 
#define LINEFOLLOWER_DATA_DIR_START   0x00
 
#define LINEFOLLOWER_DATA_DIR_1   0x01
 
#define LINEFOLLOWER_DATA_DIR_2   0x02
 
#define LINEFOLLOWER_DATA_DIR_3   0x03
 
#define LINEFOLLOWER_DATA_DIR_4   0x04
 
#define LINEFOLLOWER_DATA_DIR_6   0x06
 
#define LINEFOLLOWER_DATA_DIR_7   0x07
 
#define LINEFOLLOWER_DATA_DIR_8   0x08
 
#define LINEFOLLOWER_DATA_DIR_12   0x0C
 
#define LINEFOLLOWER_DATA_DIR_16   0x10
 
#define LINEFOLLOWER_DATA_DIR_24   0x18
 
#define LINEFOLLOWER_DATA_DIR_28   0x1C
 
#define LINEFOLLOWER_DATA_DIR_31   0x1F
 
#define LINEFOLLOWER_BIT_0   0x01
 
#define LINEFOLLOWER_BIT_1   0x02
 
#define LINEFOLLOWER_BIT_2   0x04
 
#define LINEFOLLOWER_BIT_3   0x08
 
#define LINEFOLLOWER_BIT_4   0x10
 
#define LINEFOLLOWER_DIR_STRAIGHT   0x00
 
#define LINEFOLLOWER_DIR_LEFT   0x01
 
#define LINEFOLLOWER_DIR_RIGHT   0x02
 
#define LINEFOLLOWER_DIR_SHARP_LEFT   0x03
 
#define LINEFOLLOWER_DIR_SHARP_RIGHT   0x04
 
#define LINEFOLLOWER_DIR_TRACKING_LOST   0x05
 

Functions

void linefollower_cfg_setup (linefollower_cfg_t *cfg)
 Config Object Initialization function.
 
LINEFOLLOWER_RETVAL linefollower_init (linefollower_t *ctx, linefollower_cfg_t *cfg)
 Initialization function.
 
uint8_t linefollower_get_u1 (linefollower_t *ctx)
 Get status of U1 pin function.
 
uint8_t linefollower_get_u2 (linefollower_t *ctx)
 Get status of U2 pin function.
 
uint8_t linefollower_get_u3 (linefollower_t *ctx)
 Get status of U3 pin function.
 
uint8_t linefollower_get_u4 (linefollower_t *ctx)
 Get status of U4 pin function.
 
uint8_t linefollower_get_u5 (linefollower_t *ctx)
 Get status of U5 pin function.
 
void linefollower_data_track (linefollower_t *ctx, linefollower_direction_t *data_track)
 Get status of all pin function.
 
uint8_t linefollower_get_direction (linefollower_t *ctx)
 Get direction data function.
 

Detailed Description

This file contains API for Line Follower Click driver.