Skip to content

Надо переписывать, отвязывать от хардкода

License

Notifications You must be signed in to change notification settings

kotofeuz/stm32-encoder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stm32-encoder

Simple encoder library for handling a quadrature rotary encoder with an STM32F103C8 MCU.

Currently the library only handles encoders that produce two ticks per dedent.

Usage:

#include "Encoder.h"

Encoder_Config();  // configure the encoders timer
Encoder_Init();    // start the encoders timer

Encoder_Status encoderStatus;

int main(void) {
  encoderStatus = Encoder_Get_Status();

  switch(encoderStatus) {
    case Incremented:
      // do something
      break;
    case Decremented:
      // do something else
      break;
    case Neutral:
      // don't do anything
      break;
  }
}

About

Надо переписывать, отвязывать от хардкода

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%