egoShield
All Classes Files Functions Variables Friends Macros Pages
Classes | Macros | Functions | Variables
egoShieldTeach.h File Reference

Function prototypes and definitions for the egoShield library. More...

#include "uStepper.h"
#include "U8g2lib.h"
#include "SPI.h"
#include "Arduino.h"
#include "SoftwareSerial.h"

Go to the source code of this file.

Classes

struct  buttons
 struct to hold information required to debounce button. More...
 
class  egoShield
 Watchdog timer interrupt handler, for examining the buttons periodically. More...
 

Macros

#define FWBT   A3
 
#define PLBT   A1
 
#define RECBT   A2
 
#define BWBT   A0
 
#define CNT   50
 
#define OPTO   3
 
#define FULL   1
 
#define HALF   2
 
#define QUARTER   4
 
#define EIGHT   8
 
#define SIXTEEN   16
 
#define en_width   11
 
#define en_height   9
 
#define tt_width   10
 
#define tt_height   10
 
#define play_width   6
 
#define play_height   11
 
#define loop_width   11
 
#define loop_height   10
 
#define logo_width   90
 
#define logo_height   16
 
#define DEPRESSED   0 /** Definition of DEPRESSED button state */
 
#define PRESSED   1 /** Definition of PRESSED button state */
 
#define HOLD   2 /** Definition of HOLD button state */
 
#define HOLDTIME   75 /** Number of PRESSED samples before the button should be considered HOLD */
 
#define HOLDTICK   5 /** Number of HOLD samples before a new button press should be issued */
 
#define RESETWDT   asm volatile("WDR \n\t")
 

Functions

void WDT_vect (void) __attribute__((signal
 

Variables

static unsigned char fw_bits []
 
static unsigned char bw_bits []
 
static unsigned char rec_bits []
 
static unsigned char stop_bits []
 
static unsigned char pse_bits []
 
static unsigned char play_bits []
 
static unsigned char loop_bits []
 
static unsigned char logo_bits []
 
void used
 

Detailed Description

Function prototypes and definitions for the egoShield library.

This file contains class and function prototypes for the library, as well as necessary constants and global variables.

Author
Mogens Groth Nicolaisen (mogen.nosp@m.s@us.nosp@m.teppe.nosp@m.r.co.nosp@m.m)

Definition in file egoShieldTeach.h.

Macro Definition Documentation

◆ BWBT

#define BWBT   A0

Backward button pin definition

Definition at line 121 of file egoShieldTeach.h.

◆ CNT

#define CNT   50

Max record count definition

Definition at line 123 of file egoShieldTeach.h.

◆ EIGHT

#define EIGHT   8

Eighth step definition

Definition at line 134 of file egoShieldTeach.h.

◆ FULL

#define FULL   1

Full step definition

Definition at line 128 of file egoShieldTeach.h.

◆ FWBT

#define FWBT   A3

Forward button pin definition

Definition at line 115 of file egoShieldTeach.h.

◆ HALF

#define HALF   2

Half step definition

Definition at line 130 of file egoShieldTeach.h.

◆ OPTO

#define OPTO   3

Optocoupler pin definition

Definition at line 125 of file egoShieldTeach.h.

◆ PLBT

#define PLBT   A1

Play button pin definition

Definition at line 117 of file egoShieldTeach.h.

◆ QUARTER

#define QUARTER   4

Quarter step definition

Definition at line 132 of file egoShieldTeach.h.

◆ RECBT

#define RECBT   A2

Record button pin definition

Definition at line 119 of file egoShieldTeach.h.

◆ RESETWDT

#define RESETWDT   asm volatile("WDR \n\t")

Macro for resetting watchdog timer

Definition at line 206 of file egoShieldTeach.h.

◆ SIXTEEN

#define SIXTEEN   16

Sixteenth step definition

Definition at line 136 of file egoShieldTeach.h.

Function Documentation

◆ WDT_vect()

void WDT_vect ( void  )

Periodic interrupt to sample buttons

Definition at line 69 of file egoShieldTeach.cpp.

Variable Documentation

◆ bw_bits

unsigned char bw_bits[]
static
Initial value:
= {
0x10, 0x04, 0x18, 0x06, 0x1c, 0x07, 0x9e, 0x07, 0xdf, 0x07, 0x9e, 0x07,
0x1c, 0x07, 0x18, 0x06, 0x10, 0x04 }

Definition at line 143 of file egoShieldTeach.h.

◆ fw_bits

unsigned char fw_bits[]
static
Initial value:
= {
0x41, 0x00, 0xc3, 0x00, 0xc7, 0x01, 0xcf, 0x03, 0xdf, 0x07, 0xcf, 0x03,
0xc7, 0x01, 0xc3, 0x00, 0x41, 0x00 }

Definition at line 140 of file egoShieldTeach.h.

◆ logo_bits

unsigned char logo_bits[]
static
Initial value:
= {
0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0xff, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0xc7, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3e, 0xcf, 0x07, 0xfc, 0xe3, 0xc3, 0x7b, 0x78, 0x0f, 0x3e, 0x9c, 0x01,
0xdf, 0xcf, 0x3f, 0xfe, 0xf3, 0xf7, 0xff, 0xfe, 0x1f, 0x7f, 0xff, 0x03,
0x3e, 0xcf, 0xff, 0x78, 0x38, 0xc7, 0xf3, 0x78, 0x9e, 0x73, 0xfe, 0x03,
0x3c, 0x8f, 0xff, 0x79, 0xfc, 0xcf, 0xf3, 0x79, 0xde, 0xff, 0xbc, 0x01,
0x1c, 0x47, 0xfe, 0x78, 0xfc, 0xcf, 0xf3, 0x78, 0xbe, 0x7f, 0x1e, 0x00,
0x3c, 0xef, 0xf0, 0x79, 0x38, 0xc0, 0xf3, 0x79, 0xde, 0x03, 0x1e, 0x00,
0xbe, 0xcf, 0xff, 0x78, 0x78, 0xc4, 0xf3, 0x78, 0x9e, 0x47, 0x3e, 0x00,
0xfc, 0xdf, 0x7f, 0xf8, 0xf3, 0xc7, 0x7f, 0xf8, 0x0f, 0x7f, 0x7e, 0x00,
0x38, 0x07, 0x3f, 0xf0, 0xe1, 0xc3, 0x3f, 0xf8, 0x07, 0x3e, 0x7f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x7c, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0xfc, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00 }

Definition at line 168 of file egoShieldTeach.h.

◆ loop_bits

unsigned char loop_bits[]
static
Initial value:
= {
0x04, 0x00, 0x08, 0x00, 0x9e, 0x03, 0x09, 0x04, 0x05, 0x04, 0x01, 0x05,
0x81, 0x04, 0xce, 0x03, 0x80, 0x00, 0x00, 0x01 }

Definition at line 163 of file egoShieldTeach.h.

◆ play_bits

unsigned char play_bits[]
static
Initial value:
= {
0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x01 }

Definition at line 159 of file egoShieldTeach.h.

◆ pse_bits

unsigned char pse_bits[]
static
Initial value:
= {
0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00,
0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00, 0xcc, 0x00 }

Definition at line 154 of file egoShieldTeach.h.

◆ rec_bits

unsigned char rec_bits[]
static
Initial value:
= {
0xfc, 0x00, 0xfe, 0x01, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03,
0xff, 0x03, 0xff, 0x03, 0xfe, 0x01, 0xfc, 0x00 }

Definition at line 148 of file egoShieldTeach.h.

◆ stop_bits

unsigned char stop_bits[]
static
Initial value:
= {
0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03,
0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03 }

Definition at line 151 of file egoShieldTeach.h.