inc_encoder_params.h File Reference

Default configuration for a generic incremental rotary encoder. More...

Detailed Description

Default configuration for a generic incremental rotary encoder.

Author
Leonard Herbst leona.nosp@m.rd.h.nosp@m.erbst.nosp@m.@tu-.nosp@m.dresd.nosp@m.en.d.nosp@m.e

Definition in file inc_encoder_params.h.

#include "board.h"
#include "inc_encoder.h"
#include "saul_reg.h"
+ Include dependency graph for inc_encoder_params.h:

Go to the source code of this file.

Macros

#define INC_ENCODER_SAUL_INFO
 SAUL info for the RPM and pulse count driver. More...
 

Variables

static const inc_encoder_params_t inc_encoder_params []
 Incremental rotary encoder configuration. More...
 
static const saul_reg_info_t inc_encoder_saul_info [][2]
 Additional meta information to keep in the SAUL registry. More...
 

default configuration parameters for a generic incremental rotary encoder

#define CONFIG_INC_ENCODER_GEAR_RED_RATIO   204
 Default gear reduction ratio.
 
#define CONFIG_INC_ENCODER_PPR   13
 Default number of pulses per revolution.
 
#define CONFIG_INC_ENCODER_HARDWARE_PERIOD_MS   200
 Default period for hardware RPM calculation in milliseconds.
 
#define INC_ENCODER_INTERRUPT   GPIO_PIN(1, 10)
 Default pin of the first phase used to trigger the interrupt for software decoding.
 
#define INC_ENCODER_DIRECTION   GPIO_PIN(1, 11)
 Default pin of the second (shifted) phase used to determine the direction for software decoding.
 
#define INC_ENCODER_QDEC_DEV   QDEC_DEV(0)
 Default QDEC device used for hardware decoding.
 
#define INC_ENCODER_PARAMS
 Default parameters. More...
 

Macro Definition Documentation

◆ INC_ENCODER_PARAMS

#define INC_ENCODER_PARAMS
Value:
{ .interrupt = INC_ENCODER_INTERRUPT, \
.direction = INC_ENCODER_DIRECTION }
#define INC_ENCODER_INTERRUPT
Default pin of the first phase used to trigger the interrupt for software decoding.
#define INC_ENCODER_DIRECTION
Default pin of the second (shifted) phase used to determine the direction for software decoding.

Default parameters.

Definition at line 84 of file inc_encoder_params.h.

◆ INC_ENCODER_SAUL_INFO

#define INC_ENCODER_SAUL_INFO
Value:
{ { .name = "Incremental Rotary Encoder RPM Sensor" }, \
{ .name = "Incremental Rotary Encoder Revolution Counter" } }

SAUL info for the RPM and pulse count driver.

Definition at line 99 of file inc_encoder_params.h.

Variable Documentation

◆ inc_encoder_params

const inc_encoder_params_t inc_encoder_params[]
static
Initial value:
=
{
}
#define INC_ENCODER_PARAMS
Default parameters.

Incremental rotary encoder configuration.

Definition at line 106 of file inc_encoder_params.h.

◆ inc_encoder_saul_info

const saul_reg_info_t inc_encoder_saul_info[][2]
static
Initial value:
=
{
}
#define INC_ENCODER_SAUL_INFO
SAUL info for the RPM and pulse count driver.

Additional meta information to keep in the SAUL registry.

Definition at line 114 of file inc_encoder_params.h.