FSG / System_

Fork of System_7_14 by Troy Holley

Committer:
tzyoung
Date:
Thu Apr 27 16:47:11 2017 +0000
Revision:
1:e827d45c3948
Parent:
0:45085dd174e7
Child:
2:4698e312eadb
fixed naming errors

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tzyoung 0:45085dd174e7 1 #include "StaticDefs.hpp"
tzyoung 0:45085dd174e7 2
tzyoung 0:45085dd174e7 3 //Declare static global variables using 'construct on use' idiom to ensure they are always constructed correctly
tzyoung 0:45085dd174e7 4 // and avoid "static initialization order fiasco".
tzyoung 0:45085dd174e7 5
tzyoung 0:45085dd174e7 6 Timer &systemTime()
tzyoung 0:45085dd174e7 7 {
tzyoung 0:45085dd174e7 8 static Timer s;
tzyoung 0:45085dd174e7 9 return s;
tzyoung 0:45085dd174e7 10 }
tzyoung 0:45085dd174e7 11
tzyoung 0:45085dd174e7 12 Serial & pc()
tzyoung 0:45085dd174e7 13 {
tzyoung 0:45085dd174e7 14 //static MODSERIAL p(USBTX, USBRX, 512, 64); // tx, rx
tzyoung 0:45085dd174e7 15 static Serial p(USBTX, USBRX);
tzyoung 0:45085dd174e7 16 return p;
tzyoung 0:45085dd174e7 17 }
tzyoung 0:45085dd174e7 18
tzyoung 0:45085dd174e7 19 SpiADC & adc()
tzyoung 0:45085dd174e7 20 {
tzyoung 0:45085dd174e7 21 static SpiADC adc;
tzyoung 0:45085dd174e7 22 return adc;
tzyoung 0:45085dd174e7 23 }
tzyoung 0:45085dd174e7 24
tzyoung 0:45085dd174e7 25 PosVelFilter & pvf()
tzyoung 0:45085dd174e7 26 {
tzyoung 0:45085dd174e7 27 static PosVelFilter pvf;
tzyoung 0:45085dd174e7 28 return pvf;
tzyoung 0:45085dd174e7 29 }
tzyoung 0:45085dd174e7 30
tzyoung 1:e827d45c3948 31 PololuHBridge & hBridge()
tzyoung 0:45085dd174e7 32 {
tzyoung 1:e827d45c3948 33 static PololuHBridge hBridge(p26, p29, p30);
tzyoung 1:e827d45c3948 34 return hBridge;
tzyoung 0:45085dd174e7 35 }
tzyoung 0:45085dd174e7 36
tzyoung 0:45085dd174e7 37 PositionController & posCon()
tzyoung 0:45085dd174e7 38 {
tzyoung 0:45085dd174e7 39 static PositionController posCon;
tzyoung 0:45085dd174e7 40 return posCon;
tzyoung 0:45085dd174e7 41 }