wpi-32u4-library
Macros | Functions
Romi32U4Encoders.cpp File Reference
#include <Arduino.h>
#include <Romi32U4Motors.h>
#include <FastGPIO.h>
#include <avr/interrupt.h>
#include <pcint.h>
#include <Chassis.h>

Go to the source code of this file.

Macros

#define LEFT_XOR   8
 
#define LEFT_B   IO_E2
 
#define RIGHT_XOR   7
 
#define RIGHT_B   23
 

Functions

void leftISR (void)
 
void rightISR (void)
 

Macro Definition Documentation

◆ LEFT_B

#define LEFT_B   IO_E2

Definition at line 13 of file Romi32U4Encoders.cpp.

◆ LEFT_XOR

#define LEFT_XOR   8

Definition at line 12 of file Romi32U4Encoders.cpp.

◆ RIGHT_B

#define RIGHT_B   23

Definition at line 15 of file Romi32U4Encoders.cpp.

◆ RIGHT_XOR

#define RIGHT_XOR   7

Definition at line 14 of file Romi32U4Encoders.cpp.

Function Documentation

◆ leftISR()

void leftISR ( void  )

ISR to update the encoder counter for the left motor.

Definition at line 128 of file Romi32U4Encoders.cpp.

References chassis, Romi32U4Motor::handleISR(), FastGPIO::Pin< pin >::isInputHigh(), and Chassis::leftMotor.

Referenced by Romi32U4Motor::initEncoders().

◆ rightISR()

void rightISR ( void  )

ISR to update the encoder counter for the left motor.

Definition at line 139 of file Romi32U4Encoders.cpp.

References chassis, Romi32U4Motor::handleISR(), FastGPIO::Pin< pin >::isInputHigh(), and Chassis::rightMotor.

Referenced by Romi32U4Motor::initEncoders().