PS_Fgen_FW  4da88f4073c1cc65ea45c3a652a2751e495e50db
Firmware for an Power Supply and Function Generator build from an ATX power supply
Loading...
Searching...
No Matches
Encoder.h File Reference

Containing functions to handle the rotary encoder. More...

#include <avr/interrupt.h>
#include "../Pins/Pins.h"

Go to the source code of this file.

Functions

void Encoder_Init ()
 Initialize all registers for the pin interrupts used for encoder handling.
 
bool Encoder_IsButtonPressed ()
 Check if the encoder button is pressed.
 

Detailed Description

Containing functions to handle the rotary encoder.

Date
07.09.2020 19:17:09
Author
Markus Scheich
See also
https://www.leniwiec.org/en/2014/04/28/rotary-shaft-encoder-how-to-connect-it-and-handle-it-with-avr-atmega8-16-32-168-328/

Function Documentation

◆ Encoder_IsButtonPressed()

bool Encoder_IsButtonPressed ( )
inline

Check if the encoder button is pressed.

This checks if the ENC_PB pin is pulled low.

Returns
true if the button is pressed; otherwise false