libpropeller
Making PropellerGCC Easier
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
quadrature_encoder.test.h
Go to the documentation of this file.
1 #include "unity.h"
3 #include "c++-alloc.h"
4 
5 
6 const int basePin = 9;
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 };