libpropeller
Making PropellerGCC Easier
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Enumerations
Enumerator
Macros
Pages
libpropeller
libpropeller
quadrature_encoder
quadrature_encoder.test.h
Go to the documentation of this file.
1
#include "unity.h"
2
#include "
libpropeller/quadrature_encoder/quadrature_encoder.h
"
3
#include "c++-alloc.h"
4
5
6
const
int
basePin
= 9;
7
QuadratureEncoder
*
sut
;
8
9
class
UnityTests {
10
public
:
11
12
static
void
setUp(
void
) {
13
sut =
new
QuadratureEncoder
();
14
printf(
"Started in cog: %i"
, sut->
Start
(9, 2));
15
waitcnt(CLKFREQ / 10 + CNT);
16
}
17
18
static
void
tearDown(
void
) {
19
sut->
Stop
();
20
delete
sut
;
21
sut = NULL;
22
}
23
24
static
void
test_Empty(
void
) {
25
//while(true){
26
printf(
"\nPosition: %i"
, sut->
GetReading
(1));
27
waitcnt(CLKFREQ / 10 + CNT);
28
//}
29
}
30
31
};
Generated on Fri Oct 25 2013 23:41:46 for libpropeller by
1.8.4