1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
|
/*
* FPGA_Comm.h
*
* Uptaded: May 09, 2018
* By: Avi
*
* Based on:
* Tango_HW_SW.xlsx
* Version: 3
* 08/05/2018
*/
#ifndef DRIVERS_FPGA_FPGA_COMM_H_
#define DRIVERS_FPGA_FPGA_COMM_H_
#include <stdbool.h>
//Address is = 16 Bit : 4bit_base , 3bit_fpga_base , 9bit_Address(Byte)
//Base Address 0X000
#include "inc/hw_memmap.h"
//#define BASE 0x60000000 //0x60000000 | (0x00 << 12)
#define FPGA1_BASE 0x60000000//(BASE | (0x00 << 0x09))
#define FPGA2_BASE 0x60000400//(BASE | (0x02 << 0x09))
#define FPGA3_BASE 0x60000800//(BASE | (0x04 << 0x09))
//Registers definitions
// * * * * * * * * * * * * * * * * FPGA 1 * * * * * * * * * * * * * * * * //
//Version1
#define F1_Ver1_D (*((volatile short *)(FPGA1_BASE | 0x000))) //Version of Fpga is held here
//Version2
#define F1_Ver2_D (*((volatile short *)(FPGA1_BASE | 0x010))) //Version of Fpga is held here
//GPI shorterrupt LS_01 Registers
#define F1_GPI_LS1_D (*((volatile short *)(FPGA1_BASE | 0x020))) //Reads the direct values that are currently being sent to the fpga.
#define F1_GPI_LS1_L (*((volatile short *)(FPGA1_BASE | 0x022))) //Value of the latched shorterrupts that have occurred
#define F1_GPI_LS1_M (*((volatile short *)(FPGA1_BASE | 0x024))) //Value of the shorterrupt mask, Default is 0x0000
//GPI shorterrupt LS_02 Registers
#define F1_GPI_LS2_D (*((volatile short *)(FPGA1_BASE | 0x030))) //Reads the direct values that are currently being sent to the fpga.
#define F1_GPI_LS2_L (*((volatile short *)(FPGA1_BASE | 0x032))) //Value of the latched shorterrupts that have occurred
#define F1_GPI_LS2_M (*((volatile short *)(FPGA1_BASE | 0x034))) //Value of the shorterrupt mask, Default is 0x0000
//GPI shorterrupt LS_03 Registers
#define F1_GPI_LS3_D (*((volatile short *)(FPGA1_BASE | 0x040))) //Reads the direct values that are currently being sent to the fpga.
#define F1_GPI_LS3_L (*((volatile short *)(FPGA1_BASE | 0x042))) //Value of the latched shorterrupts that have occurred
#define F1_GPI_LS3_M (*((volatile short *)(FPGA1_BASE | 0x044))) //Value of the shorterrupt mask, Default is 0x0000
//Moto_Driver_NBUSY_register1
#define F1_Moto_Driver_NBUSY1_D (*((volatile short *)(FPGA1_BASE | 0x050))) //Reads the direct values that are currently being sent to the fpga.
#define F1_Moto_Driver_NBUSY1_L (*((volatile short *)(FPGA1_BASE | 0x052))) //Value of the latched shorterrupts that have occurred
#define F1_Moto_Driver_NBUSY1_M (*((volatile short *)(FPGA1_BASE | 0x054))) //Value of the shorterrupt mask, Default is 0x0000
//Moto_Driver_NBUSY_register2
#define F1_Moto_Driver_NBUSY2_D (*((volatile short *)(FPGA1_BASE | 0x060))) //Reads the direct values that are currently being sent to the fpga.
#define F1_Moto_Driver_NBUSY2_L (*((volatile short *)(FPGA1_BASE | 0x062))) //Value of the latched shorterrupts that have occurred
#define F1_Moto_Driver_NBUSY2_M (*((volatile short *)(FPGA1_BASE | 0x064))) //Value of the shorterrupt mask, Default is 0x0000
//GPI_EXTWINDER_and_TFEED_BRK
#define F1_GPI_EXTWINDER_D (*((volatile short *)(FPGA1_BASE | 0x070))) //Reads the direct values that are currently being sent to the fpga.
#define F1_GPI_EXTWINDER_L (*((volatile short *)(FPGA1_BASE | 0x072))) //Value of the latched shorterrupts that have occurred
#define F1_GPI_EXTWINDER_M (*((volatile short *)(FPGA1_BASE | 0x074))) //Value of the shorterrupt mask, Default is 0x0000
//SPI_Busy_register1
#define F1_SPI_Busy1_D (*((volatile short *)(FPGA1_BASE | 0x090))) //Reads the direct values that are currently being sent to the fpga.
#define F1_SPI_Busy1_L (*((volatile short *)(FPGA1_BASE | 0x092))) //Value of the latched shorterrupts that have occurred
#define F1_SPI_Busy1_M (*((volatile short *)(FPGA1_BASE | 0x094))) //Value of the shorterrupt mask, Default is 0x0000
//SPI_Busy_register2
#define F1_SPI_Busy2_D (*((volatile short *)(FPGA1_BASE | 0x0A0))) //Reads the direct values that are currently being sent to the fpga.
#define F1_SPI_Busy2_L (*((volatile short *)(FPGA1_BASE | 0x0A2))) //Value of the latched shorterrupts that have occurred
#define F1_SPI_Busy2_M (*((volatile short *)(FPGA1_BASE | 0x0A4))) //Value of the shorterrupt mask, Default is 0x0000
//Moto_Driver_NSTBYRST_register1
#define F1_Moto_Driver_NSTBYRST1 (*((volatile short *)(FPGA1_BASE | 0x0B2))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//Moto_Driver_NSTBYRST_register2
#define F1_Moto_Driver_NSTBYRST2 (*((volatile short *)(FPGA1_BASE | 0x0C2))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//Moto_Driver_SW_register1
#define F1_Moto_Driver_SW1 (*((volatile short *)(FPGA1_BASE | 0x0D2))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//Moto_Driver_SW_register2
#define F1_Moto_Driver_SW2 (*((volatile short *)(FPGA1_BASE | 0x0E2))) //Writes to values. Readback thevaluessthat are currently in the GPO register
#define F1_Prescaler1_reg9 (*((volatile short *)(FPGA1_BASE | 0x0F2 ))) //Parameter for prescaler divisions
//QEI_SCREW_ROTENC
#define F1_SCREW_ROTENC_L (*((volatile short *)(FPGA1_BASE | 0x100))) //Value of the lsb of the QEI register
#define F1_SCREW_ROTENC_M (*((volatile short *)(FPGA1_BASE | 0x102))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
#define F1_SCREW_ROTENC_I (*((volatile short *)(FPGA1_BASE | 0x104))) //value of index counter
//QEI_RSPARE_ROTENC
#define F1_RSPARE_ROTENC_L (*((volatile short *)(FPGA1_BASE | 0x110))) //Value of the lsb of the QEI register
#define F1_RSPARE_ROTENC_M (*((volatile short *)(FPGA1_BASE | 0x112))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
#define F1_RSPARE_ROTENC_I (*((volatile short *)(FPGA1_BASE | 0x114))) //value of index counter
//QEI_LSPARE1_ROTENC
#define F1_LSPARE1_ROTENC_L (*((volatile short *)(FPGA1_BASE | 0x120))) //Value of the lsb of the QEI register
#define F1_LSPARE1_ROTENC_M (*((volatile short *)(FPGA1_BASE | 0x122))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
#define F1_LSPARE1_ROTENC_I (*((volatile short *)(FPGA1_BASE | 0x124))) //value of index counter
//QEI_RSPEEDSENS_ROTENC
#define F1_RSPEEDSENS_ROTENC_L (*((volatile short *)(FPGA1_BASE | 0x130))) //Value of the lsb of the QEI register
#define F1_RSPEEDSENS_ROTENC_M (*((volatile short *)(FPGA1_BASE | 0x132))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
#define F1_RSPEEDSENS_ROTENC_I (*((volatile short *)(FPGA1_BASE | 0x134))) //value of index counter
//QEI_LSPARE2_ROTENC
#define F1_LSPARE2_ROTENC_L (*((volatile short *)(FPGA1_BASE | 0x140))) //Value of the lsb of the QEI register
#define F1_LSPARE2_ROTENC_M (*((volatile short *)(FPGA1_BASE | 0x142))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
#define F1_LSPARE2_ROTENC_I (*((volatile short *)(FPGA1_BASE | 0x144))) //value of index counter
//QEI_DRYER_LOADARM_ROTENC
#define F1_DRYER_LOADARM_ROTENC_L (*((volatile short *)(FPGA1_BASE | 0x150))) //Value of the lsb of the QEI register
#define F1_DRYER_LOADARM_ROTENC_M (*((volatile short *)(FPGA1_BASE | 0x152))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
#define F1_DRYER_LOADARM_ROTENC_I (*((volatile short *)(FPGA1_BASE | 0x154))) //value of index counter
//SSI
#define F1_RSPARE_ROTENC_DATA_p_RX_lsb (*((volatile short *)(FPGA1_BASE | 0x180))) //The 16 Lsb bits of the shifted in data.
#define F1_RSPARE_ROTENC_DATA_p_RX_msb (*((volatile short *)(FPGA1_BASE | 0x182))) //16 bit MSB if nessesary
#define F1_RSPARE_ROTENC_DATA_p_TX (*((volatile short *)(FPGA1_BASE | 0x18E))) //This register triggers a TX transmission
#define F1_LSPARE_ROTENC_DATA_p_RX_lsb (*((volatile short *)(FPGA1_BASE | 0x190))) //The 16 Lsb bits of the shifted in data.
#define F1_LSPARE_ROTENC_DATA_p_RX_msb (*((volatile short *)(FPGA1_BASE | 0x192))) //16 bit MSB if nessesary
#define F1_LSPARE_ROTENC_DATA_p_TX (*((volatile short *)(FPGA1_BASE | 0x19E))) //This register triggers a TX transmission
#define F1_RDANCER_ROTENC_DATA_p_RX_lsb (*((volatile short *)(FPGA1_BASE | 0x1A0))) //The 16 Lsb bits of the shifted in data.
#define F1_RDANCER_ROTENC_DATA_p_RX_msb (*((volatile short *)(FPGA1_BASE | 0x1A2))) //16 bit MSB if nessesary
#define F1_RDANCER_ROTENC_DATA_p_TX (*((volatile short *)(FPGA1_BASE | 0x1AE))) //This register triggers a TX transmission
#define F1_LDANCER2_ROTENC_DATA_p_RX_lsb (*((volatile short *)(FPGA1_BASE | 0x1B0))) //The 16 Lsb bits of the shifted in data.
#define F1_LDANCER2_ROTENC_DATA_p_RX_msb (*((volatile short *)(FPGA1_BASE | 0x1B2))) //16 bit MSB if nessesary
#define F1_LDANCER2_ROTENC_DATA_p_TX (*((volatile short *)(FPGA1_BASE | 0x1BE))) //This register triggers a TX transmission
#define F1_LDANCER1_ROTENC_DATA_p_RX_lsb (*((volatile short *)(FPGA1_BASE | 0x1C0))) //The 16 Lsb bits of the shifted in data.
#define F1_LDANCER1_ROTENC_DATA_p_RX_msb (*((volatile short *)(FPGA1_BASE | 0x1C2))) //16 bit MSB if nessesary
#define F1_LDANCER1_ROTENC_DATA_p_TX (*((volatile short *)(FPGA1_BASE | 0x1CE))) //This register triggers a TX transmission
//SPI_MOTO_RLOADING_A1
#define F1_MOTO_RLOADING_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x200))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_RLOADING_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x202))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_RLOADING_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x204))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_RLOADING_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x206))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_RLOADING_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x208))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_RDRIVING_A1
#define F1_MOTO_RDRIVING_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x210))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_RDRIVING_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x212))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_RDRIVING_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x214))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_RDRIVING_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x216))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_RDRIVING_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x218))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_LDRIVING_A1
#define F1_MOTO_LDRIVING_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x220))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LDRIVING_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x222))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LDRIVING_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x224))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_LDRIVING_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x226))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_LDRIVING_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x228))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_LLOADING_A1
#define F1_MOTO_LLOADING_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x230))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LLOADING_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x232))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LLOADING_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x234))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_LLOADING_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x236))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_LLOADING_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x238))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_DRYER_LOADARM_A1
#define F1_MOTO_DRYER_LOADARM_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x240))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DRYER_LOADARM_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x242))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DRYER_LOADARM_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x244))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_DRYER_LOADARM_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x246))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_DRYER_LOADARM_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x248))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_DRYER_DRIVING_A1
#define F1_MOTO_DRYER_DRIVING_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x250))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DRYER_DRIVING_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x252))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DRYER_DRIVING_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x254))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_DRYER_DRIVING_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x256))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_DRYER_DRIVING_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x258))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_DH_CLEANHEAD_A1
#define F1_MOTO_DH_CLEANHEAD_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x260))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DH_CLEANHEAD_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x262))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DH_CLEANHEAD_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x264))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_DH_CLEANHEAD_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x266))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_DH_CLEANHEAD_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x268))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_DH_CLEANMECH_A1
#define F1_MOTO_DH_CLEANMECH_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x270))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DH_CLEANMECH_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x272))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DH_CLEANMECH_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x274))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_DH_CLEANMECH_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x276))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_DH_CLEANMECH_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x278))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_SCREW_A1
#define F1_MOTO_SCREW_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x280))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_SCREW_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x282))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_SCREW_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x284))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_SCREW_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x286))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_SCREW_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x288))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_WINDER_A1
#define F1_MOTO_WINDER_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x290))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_WINDER_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x292))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_WINDER_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x294))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_WINDER_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x296))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_WINDER_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x298))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_RLOADARM_A1
#define F1_MOTO_RLOADARM_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x2A0))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_RLOADARM_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x2A2))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_RLOADARM_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x2A4))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_RLOADARM_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x2A6))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_RLOADARM_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x2A8))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_RDANCER_A1
#define F1_MOTO_RDANCER_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x2B0))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_RDANCER_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x2B2))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_RDANCER_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x2B4))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_RDANCER_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x2B6))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_RDANCER_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x2B8))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_LDANCER1_A1
#define F1_MOTO_LDANCER1_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x2C0))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LDANCER1_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x2C2))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LDANCER1_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x2C4))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_LDANCER1_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x2C6))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_LDANCER1_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x2C8))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_LDANCER2_A1
#define F1_MOTO_LDANCER2_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x2D0))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LDANCER2_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x2D2))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LDANCER2_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x2D4))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_LDANCER2_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x2D6))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_LDANCER2_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x2D8))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_DRYER_LID_A1
#define F1_MOTO_DRYER_LID_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x2E0))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DRYER_LID_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x2E2))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DRYER_LID_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x2E4))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_DRYER_LID_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x2E6))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_DRYER_LID_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x2E8))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_DH_LID_A1
#define F1_MOTO_DH_LID_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x2F0))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DH_LID_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x2F2))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_DH_LID_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x2F4))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_DH_LID_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x2F6))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_DH_LID_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x2F8))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_LPIVOT1_A1
#define F1_MOTO_LPIVOT1_A1_TX_00 (*((volatile short *)(FPGA1_BASE | 0x300))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LPIVOT1_A1_TX_01 (*((volatile short *)(FPGA1_BASE | 0x302))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F1_MOTO_LPIVOT1_A1_RX_00 (*((volatile short *)(FPGA1_BASE | 0x304))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F1_MOTO_LPIVOT1_A1_RX_01 (*((volatile short *)(FPGA1_BASE | 0x306))) //The 16 Lsb bits of the shifted in data.
#define F1_MOTO_LPIVOT1_A1_WORDS (*((volatile short *)(FPGA1_BASE | 0x308))) //The amount of spi words (usually byte sized) per transmission.
#define F1_Tacho_reg0 (*((volatile short *)(FPGA1_BASE | 0x3C0))) //This Register stores the Tacho counter
#define F1_Tacho_reg1 (*((volatile short *)(FPGA1_BASE | 0x3C2))) //This Register stores the Tacho counter
#define F1_Tacho_reg2 (*((volatile short *)(FPGA1_BASE | 0x3C4))) //This Register stores the Tacho counter
#define F1_Tacho_reg3 (*((volatile short *)(FPGA1_BASE | 0x3C6))) //This Register stores the Tacho counter
#define F1_Tacho_reg4 (*((volatile short *)(FPGA1_BASE | 0x3C8))) //This Register stores the Tacho counter
#define F1_Tacho_reg5 (*((volatile short *)(FPGA1_BASE | 0x3CA))) //This Register stores the Tacho counter
#define F1_Tacho_reg6 (*((volatile short *)(FPGA1_BASE | 0x3CC))) //This Register stores the Tacho counter
#define F1_Tacho_reg7 (*((volatile short *)(FPGA1_BASE | 0x3CE))) //This Register stores the Tacho counter
//GPO
#define F1_gpo_01 (*((volatile short *)(FPGA1_BASE | 0x3D2))) //Gpo Register Miscellaneous output register, 16bits
//Prescaler
#define F1_Prescaler1_reg1 (*((volatile short *)(FPGA1_BASE | 0x3E0))) //Parameter for prescaler divisions - 6bit ssi high duty cycle value for prescaler
#define F1_Prescaler1_reg2 (*((volatile short *)(FPGA1_BASE | 0x3E2))) //Parameter for prescaler divisions - 6bit ssi low duty cycle value for prescaler
#define F1_Prescaler1_reg3 (*((volatile short *)(FPGA1_BASE | 0x3E4))) //Parameter for prescaler divisions - 3bit spi moto low duty cycle value for pmw
#define F1_Prescaler1_reg4 (*((volatile short *)(FPGA1_BASE | 0x3E6))) //Parameter for prescaler divisions - 3bit spi moto high duty cycle value for pmw
#define F1_Prescaler1_reg5 (*((volatile short *)(FPGA1_BASE | 0x3E8))) //Parameter for prescaler divisions - amount of prescaled clocks for counter of signal All Tachos
#define F1_Prescaler1_reg6 (*((volatile short *)(FPGA1_BASE | 0x3EA))) //Parameter for prescaler divisions
#define F1_Prescaler1_reg7 (*((volatile short *)(FPGA1_BASE | 0x3EC))) //Parameter for prescaler divisions
#define F1_Prescaler1_reg8 (*((volatile short *)(FPGA1_BASE | 0x3EE))) //Parameter for prescaler divisions
//Test
#define F1_Test (*((volatile short *)(FPGA1_BASE | 0x3F0))) //Readback not -gives the inverse of the written to value
// * * * * * * * * * * * * * * * * FPGA 2 * * * * * * * * * * * * * * * * //
//Version1
#define F2_Ver1_D (*((volatile short *)(FPGA2_BASE | 0x000))) //Version of Fpga is held here
//Version2
#define F2_Ver2_D (*((volatile short *)(FPGA2_BASE | 0x010))) //Version of Fpga is held here
//GPI shorterrupt LS_01 Registers
#define F2_GPI_LS1_D (*((volatile short *)(FPGA2_BASE | 0x020))) //Reads the direct values that are currently being sent to the fpga.
#define F2_GPI_LS1_L (*((volatile short *)(FPGA2_BASE | 0x022))) //Value of the latched shorterrupts that have occurred
#define F2_GPI_LS1_M (*((volatile short *)(FPGA2_BASE | 0x024))) //Value of the shorterrupt mask, Default is 0x0000
//GPI shorterrupt LS_02 Registers
#define F2_GPI_LS2_D (*((volatile short *)(FPGA2_BASE | 0x030))) //Reads the direct values that are currently being sent to the fpga.
#define F2_GPI_LS2_L (*((volatile short *)(FPGA2_BASE | 0x032))) //Value of the latched shorterrupts that have occurred
#define F2_GPI_LS2_M (*((volatile short *)(FPGA2_BASE | 0x034))) //Value of the shorterrupt mask, Default is 0x0000
//GPI shorterrupt LS_03 Registers
#define F2_GPI_LS3_D (*((volatile short *)(FPGA2_BASE | 0x040))) //Reads the direct values that are currently being sent to the fpga.
#define F2_GPI_LS3_L (*((volatile short *)(FPGA2_BASE | 0x042))) //Value of the latched shorterrupts that have occurred
#define F2_GPI_LS3_M (*((volatile short *)(FPGA2_BASE | 0x044))) //Value of the shorterrupt mask, Default is 0x0000
//Moto_Driver_NBUSY_register1
#define F2_Moto_Driver_NBUSY1_D (*((volatile short *)(FPGA2_BASE | 0x050))) //Reads the direct values that are currently being sent to the fpga.
#define F2_Moto_Driver_NBUSY1_L (*((volatile short *)(FPGA2_BASE | 0x052))) //Value of the latched shorterrupts that have occurred
#define F2_Moto_Driver_NBUSY1_M (*((volatile short *)(FPGA2_BASE | 0x054))) //Value of the shorterrupt mask, Default is 0x0000
//DISPENSER_VALVE_IN
#define F2_DISPENSER_VALVE_IN_Direct (*((volatile short *)(FPGA2_BASE | 0x060))) //Reads the direct values that are currently being sent to the fpga.
#define F2_DISPENSER_VALVE_IN_Latched (*((volatile short *)(FPGA2_BASE | 0x062))) //Value of the latched shorterrupts that have occurred
#define F2_DISPENSER_VALVE_IN_Mask (*((volatile short *)(FPGA2_BASE | 0x064))) //Value of the shorterrupt mask, Default is 0x0000
//GPI_REGISTER1
#define F2_GPI_REGISTER1_Direct (*((volatile short *)(FPGA2_BASE | 0x070))) //Reads the direct values that are currently being sent to the fpga.
#define F2_GPI_REGISTER1_Latched (*((volatile short *)(FPGA2_BASE | 0x072))) //Value of the latched shorterrupts that have occurred
#define F2_GPI_REGISTER1_Mask (*((volatile short *)(FPGA2_BASE | 0x074))) //Value of the shorterrupt mask, Default is 0x0000
//LS_04
#define F2_LS_04_Direct (*((volatile short *)(FPGA2_BASE | 0x080))) //Version of Fpga is held here
#define F2_LS_04_Latched (*((volatile short *)(FPGA2_BASE | 0x082))) //Value of the latched shorterrupts that have occurred
#define F2_LS_04_Mask (*((volatile short *)(FPGA2_BASE | 0x084))) //Value of the shorterrupt mask, Default is 0x0000
//SPI_Busy_register1
#define F2_SPI_Busy1_D (*((volatile short *)(FPGA2_BASE | 0x090))) //Reads the direct values that are currently being sent to the fpga.
#define F2_SPI_Busy1_L (*((volatile short *)(FPGA2_BASE | 0x092))) //Value of the latched shorterrupts that have occurred
#define F2_SPI_Busy1_M (*((volatile short *)(FPGA2_BASE | 0x094))) //Value of the shorterrupt mask, Default is 0x0000
//SPI_Busy_register2
#define F2_SPI_Busy2_D (*((volatile short *)(FPGA2_BASE | 0x0A0))) //Reads the direct values that are currently being sent to the fpga.
#define F2_SPI_Busy2_L (*((volatile short *)(FPGA2_BASE | 0x0A2))) //Value of the latched shorterrupts that have occurred
#define F2_SPI_Busy2_M (*((volatile short *)(FPGA2_BASE | 0x0A4))) //Value of the shorterrupt mask, Default is 0x0000
//Moto_Driver_NSTBYRST_register1
#define F2_Moto_Driver_NSTBYRST1 (*((volatile short *)(FPGA2_BASE | 0x0B2))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//DISPENSER_VALVE_OUT
#define F2_DISPENSER_VALVE_OUT (*((volatile short *)(FPGA2_BASE | 0x0C2))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//Moto_Driver_SW_register1
#define F2_Moto_Driver_SW1 (*((volatile short *)(FPGA2_BASE | 0x0D2))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//CTRL
#define F2_CTRL (*((volatile short *)(FPGA2_BASE | 0x0E2))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//GPO_REGISTER
#define F2_GPO_REGISTER (*((volatile short *)(FPGA2_BASE | 0x0F2))) //Writes to values. Readback thevaluessthat are currently in the GPO register
#define F2_Prescaler1_reg10 (*((volatile short *)(FPGA2_BASE | 0x102))) //Parameter for prescaler divisions -amount of prescaled clocks for counter of signal Blower Tacho.
#define F2_Prescaler1_reg11 (*((volatile short *)(FPGA2_BASE | 0x112))) //Parameter for prescaler divisions -amount of prescaled clocks clk input of pwm of signal F2_GPO_BLOWER_PWM. 8bits
#define F2_Prescaler1_reg12 (*((volatile short *)(FPGA2_BASE | 0x122))) //Variable for prescaler divisions -amount of prescaled clocks clk input of prescaler of signal VALVE registers. 16bits
#define F2_Prescaler1_reg13 (*((volatile short *)(FPGA2_BASE | 0x132))) //Variable for prescaler divisions -amount of prescaled clocks clk input of prescaler of signal debouncer of the limit switch. 14bits
//SSI
#define F2_DISPENSER_ROTENC_DATA_p_1_RX_lsb (*((volatile short *)(FPGA2_BASE | 0x180))) //The 16 Lsb bits of the shifted in data.
#define F2_DISPENSER_ROTENC_DATA_p_1_RX_msb (*((volatile short *)(FPGA2_BASE | 0x182))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_1_TX (*((volatile short *)(FPGA2_BASE | 0x18E))) //This register triggers a TX transmission
#define F2_DISPENSER_ROTENC_DATA_p_2_RX_lsb (*((volatile short *)(FPGA2_BASE | 0x190))) //The 16 Lsb bits of the shifted in data.
#define F2_DISPENSER_ROTENC_DATA_p_2_RX_msb (*((volatile short *)(FPGA2_BASE | 0x192))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_2_TX (*((volatile short *)(FPGA2_BASE | 0x19E))) //This register triggers a TX transmission
#define F2_DISPENSER_ROTENC_DATA_p_3_RX_lsb (*((volatile short *)(FPGA2_BASE | 0x1A0))) //The 16 Lsb bits of the shifted in data.
#define F2_DISPENSER_ROTENC_DATA_p_3_RX_msb (*((volatile short *)(FPGA2_BASE | 0x1A2))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_3_TX (*((volatile short *)(FPGA2_BASE | 0x1AE))) //This register triggers a TX transmission
#define F2_DISPENSER_ROTENC_DATA_p_4_RX_lsb (*((volatile short *)(FPGA2_BASE | 0x1B0))) //The 16 Lsb bits of the shifted in data.
#define F2_DISPENSER_ROTENC_DATA_p_4_RX_msb (*((volatile short *)(FPGA2_BASE | 0x1B2))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_4_TX (*((volatile short *)(FPGA2_BASE | 0x1BE))) //This register triggers a TX transmission
#define F2_DISPENSER_ROTENC_DATA_p_5_RX_lsb (*((volatile short *)(FPGA2_BASE | 0x1C0))) //The 16 Lsb bits of the shifted in data.
#define F2_DISPENSER_ROTENC_DATA_p_5_RX_msb (*((volatile short *)(FPGA2_BASE | 0x1C2))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_5_TX (*((volatile short *)(FPGA2_BASE | 0x1CE))) //This register triggers a TX transmission
#define F2_DISPENSER_ROTENC_DATA_p_6_RX_lsb (*((volatile short *)(FPGA2_BASE | 0x1D0))) //The 16 Lsb bits of the shifted in data.
#define F2_DISPENSER_ROTENC_DATA_p_6_RX_msb (*((volatile short *)(FPGA2_BASE | 0x1D2))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_6_TX (*((volatile short *)(FPGA2_BASE | 0x1DE))) //This register triggers a TX transmission
#define F2_DISPENSER_ROTENC_DATA_p_7_RX_lsb (*((volatile short *)(FPGA2_BASE | 0x1E0))) //The 16 Lsb bits of the shifted in data.
#define F2_DISPENSER_ROTENC_DATA_p_7_RX_msb (*((volatile short *)(FPGA2_BASE | 0x1E2))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_7_TX (*((volatile short *)(FPGA2_BASE | 0x1EE))) //This register triggers a TX transmission
#define F2_DISPENSER_ROTENC_DATA_p_8_RX_lsb (*((volatile short *)(FPGA2_BASE | 0x1F0))) //The 16 Lsb bits of the shifted in data.
#define F2_DISPENSER_ROTENC_DATA_p_8_RX_msb (*((volatile short *)(FPGA2_BASE | 0x1F2))) //16 bit MSB if nessesary
#define F2_DISPENSER_ROTENC_DATA_p_8_TX (*((volatile short *)(FPGA2_BASE | 0x1FE))) //This register triggers a TX transmission
//ANALOG_DYEINGH_TEMP1_1
#define F2_ANALOG_DYEINGH_TEMP1_1_TX_00 (*((volatile short *)(FPGA2_BASE | 0x200))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP1_1_TX_01 (*((volatile short *)(FPGA2_BASE | 0x202))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP1_1_RX_00 (*((volatile short *)(FPGA2_BASE | 0x204))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_DYEINGH_TEMP1_1_RX_01 (*((volatile short *)(FPGA2_BASE | 0x206))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_DYEINGH_TEMP1_1_WORDS (*((volatile short *)(FPGA2_BASE | 0x208))) //The amount of spi words (usually byte sized) per transmission.
//AN_ENCLOSURETEMP1_1
#define F2_AN_ENCLOSURETEMP1_1_TX_00 (*((volatile short *)(FPGA2_BASE | 0x210))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_AN_ENCLOSURETEMP1_1_TX_01 (*((volatile short *)(FPGA2_BASE | 0x212))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_AN_ENCLOSURETEMP1_1_RX_00 (*((volatile short *)(FPGA2_BASE | 0x214))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_AN_ENCLOSURETEMP1_1_RX_01 (*((volatile short *)(FPGA2_BASE | 0x216))) //The 16 Lsb bits of the shifted in data.
#define F2_AN_ENCLOSURETEMP1_1_WORDS (*((volatile short *)(FPGA2_BASE | 0x218))) //The amount of spi words (usually byte sized) per transmission.
//ANALOG_DYEINGH_TEMP2
#define F2_ANALOG_DYEINGH_TEMP2_TX_00 (*((volatile short *)(FPGA2_BASE | 0x220))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP2_TX_01 (*((volatile short *)(FPGA2_BASE | 0x222))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP2_RX_00 (*((volatile short *)(FPGA2_BASE | 0x224))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_DYEINGH_TEMP2_RX_01 (*((volatile short *)(FPGA2_BASE | 0x226))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_DYEINGH_TEMP2_WORDS (*((volatile short *)(FPGA2_BASE | 0x228))) //The amount of spi words (usually byte sized) per transmission.
//AN_ENCLOSURETEMP2_1
#define F2_AN_ENCLOSURETEMP2_1_TX_00 (*((volatile short *)(FPGA2_BASE | 0x230))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_AN_ENCLOSURETEMP2_1_TX_01 (*((volatile short *)(FPGA2_BASE | 0x232))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_AN_ENCLOSURETEMP2_1_RX_00 (*((volatile short *)(FPGA2_BASE | 0x234))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_AN_ENCLOSURETEMP2_1_RX_01 (*((volatile short *)(FPGA2_BASE | 0x236))) //The 16 Lsb bits of the shifted in data.
#define F2_AN_ENCLOSURETEMP2_1_WORDS (*((volatile short *)(FPGA2_BASE | 0x238))) //The amount of spi words (usually byte sized) per transmission.
//ANALOG_DYEINGH_TEMP3
#define F2_ANALOG_DYEINGH_TEMP3_1_TX_00 (*((volatile short *)(FPGA2_BASE | 0x240))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP3_1_TX_01 (*((volatile short *)(FPGA2_BASE | 0x242))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP3_1_RX_00 (*((volatile short *)(FPGA2_BASE | 0x244))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_DYEINGH_TEMP3_1_RX_01 (*((volatile short *)(FPGA2_BASE | 0x246))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_DYEINGH_TEMP3_1_WORDS (*((volatile short *)(FPGA2_BASE | 0x248))) //The amount of spi words (usually byte sized) per transmission.
//AN_ENCLOSURETEMP3_1
#define F2_AN_ENCLOSURETEMP3_1_TX_00 (*((volatile short *)(FPGA2_BASE | 0x250))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_AN_ENCLOSURETEMP3_1_TX_01 (*((volatile short *)(FPGA2_BASE | 0x252))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_AN_ENCLOSURETEMP3_1_RX_00 (*((volatile short *)(FPGA2_BASE | 0x254))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_AN_ENCLOSURETEMP3_1_RX_01 (*((volatile short *)(FPGA2_BASE | 0x256))) //The 16 Lsb bits of the shifted in data.
#define F2_AN_ENCLOSURETEMP3_1_WORDS (*((volatile short *)(FPGA2_BASE | 0x258))) //The amount of spi words (usually byte sized) per transmission.
//ANALOG_DYEINGH_TEMP4
#define F2_ANALOG_DYEINGH_TEMP4_1_TX_00 (*((volatile short *)(FPGA2_BASE | 0x260))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP4_1_TX_01 (*((volatile short *)(FPGA2_BASE | 0x262))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP4_1_RX_00 (*((volatile short *)(FPGA2_BASE | 0x264))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_DYEINGH_TEMP4_1_RX_01 (*((volatile short *)(FPGA2_BASE | 0x266))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_DYEINGH_TEMP4_1_WORDS (*((volatile short *)(FPGA2_BASE | 0x268))) //The amount of spi words (usually byte sized) per transmission.
//ANALOG_DRYER_TEMP1
#define F2_ANALOG_DRYER_TEMP1_1_TX_00 (*((volatile short *)(FPGA2_BASE | 0x270))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DRYER_TEMP1_1_TX_01 (*((volatile short *)(FPGA2_BASE | 0x272))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DRYER_TEMP1_1_RX_00 (*((volatile short *)(FPGA2_BASE | 0x274))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_DRYER_TEMP1_1_RX_01 (*((volatile short *)(FPGA2_BASE | 0x276))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_DRYER_TEMP1_1_WORDS (*((volatile short *)(FPGA2_BASE | 0x278))) //The amount of spi words (usually byte sized) per transmission.
//ANALOG_DYEINGH_TEMP5
#define F2_ANALOG_DYEINGH_TEMP5_1_TX_00 (*((volatile short *)(FPGA2_BASE | 0x280))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP5_1_TX_01 (*((volatile short *)(FPGA2_BASE | 0x282))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DYEINGH_TEMP5_1_RX_00 (*((volatile short *)(FPGA2_BASE | 0x284))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_DYEINGH_TEMP5_1_RX_01 (*((volatile short *)(FPGA2_BASE | 0x286))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_DYEINGH_TEMP5_1_WORDS (*((volatile short *)(FPGA2_BASE | 0x288))) //The amount of spi words (usually byte sized) per transmission.
//ANALOG_DRYER_TEMP2
#define F2_ANALOG_DRYER_TEMP2_1_TX_00 (*((volatile short *)(FPGA2_BASE | 0x290))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DRYER_TEMP2_1_TX_01 (*((volatile short *)(FPGA2_BASE | 0x292))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DRYER_TEMP2_1_RX_00 (*((volatile short *)(FPGA2_BASE | 0x294))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_DRYER_TEMP2_1_RX_01 (*((volatile short *)(FPGA2_BASE | 0x296))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_DRYER_TEMP2_1_WORDS (*((volatile short *)(FPGA2_BASE | 0x298))) //The amount of spi words (usually byte sized) per transmission.
//ANALOG_MIXCHIP_TEMP
#define F2_ANALOG_MIXCHIP_TEMP_1_TX_00 (*((volatile short *)(FPGA2_BASE | 0x2A0))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_MIXCHIP_TEMP_1_TX_01 (*((volatile short *)(FPGA2_BASE | 0x2A2))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_MIXCHIP_TEMP_1_RX_00 (*((volatile short *)(FPGA2_BASE | 0x2A4))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_MIXCHIP_TEMP_1_RX_01 (*((volatile short *)(FPGA2_BASE | 0x2A6))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_MIXCHIP_TEMP_1_WORDS (*((volatile short *)(FPGA2_BASE | 0x2A8))) //The amount of spi words (usually byte sized) per transmission.
//ANALOG_DRYER_TEMP3
#define F2_ANALOG_DRYER_TEMP3_1_TX_00 (*((volatile short *)(FPGA2_BASE | 0x2B0))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DRYER_TEMP3_1_TX_01 (*((volatile short *)(FPGA2_BASE | 0x2B2))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_ANALOG_DRYER_TEMP3_1_RX_00 (*((volatile short *)(FPGA2_BASE | 0x2B4))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_ANALOG_DRYER_TEMP3_1_RX_01 (*((volatile short *)(FPGA2_BASE | 0x2B6))) //The 16 Lsb bits of the shifted in data.
#define F2_ANALOG_DRYER_TEMP3_1_WORDS (*((volatile short *)(FPGA2_BASE | 0x2B8))) //The amount of spi words (usually byte sized) per transmission.
//MOTO_DISPENSER_A1
#define F2_MOTO_DISPENSER_A1_1_TX_00 (*((volatile short *)(FPGA2_BASE | 0x320))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_1_TX_01 (*((volatile short *)(FPGA2_BASE | 0x322))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_1_RX_00 (*((volatile short *)(FPGA2_BASE | 0x324))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_MOTO_DISPENSER_A1_1_RX_01 (*((volatile short *)(FPGA2_BASE | 0x326))) //The 16 Lsb bits of the shifted in data.
#define F2_MOTO_DISPENSER_A1_1_WORDS (*((volatile short *)(FPGA2_BASE | 0x328))) //The amount of spi words (usually byte sized) per transmission.
//MOTO_DISPENSER_A1_2
#define F2_MOTO_DISPENSER_A1_2_TX_00 (*((volatile short *)(FPGA2_BASE | 0x330))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_2_TX_01 (*((volatile short *)(FPGA2_BASE | 0x332))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_2_RX_00 (*((volatile short *)(FPGA2_BASE | 0x334))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_MOTO_DISPENSER_A1_2_RX_01 (*((volatile short *)(FPGA2_BASE | 0x336))) //The 16 Lsb bits of the shifted in data.
#define F2_MOTO_DISPENSER_A1_2_WORDS (*((volatile short *)(FPGA2_BASE | 0x338))) //The amount of spi words (usually byte sized) per transmission.
//MOTO_DISPENSER_A1_3
#define F2_MOTO_DISPENSER_A1_3_TX_00 (*((volatile short *)(FPGA2_BASE | 0x340))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_3_TX_01 (*((volatile short *)(FPGA2_BASE | 0x342))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_3_RX_00 (*((volatile short *)(FPGA2_BASE | 0x344))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_MOTO_DISPENSER_A1_3_RX_01 (*((volatile short *)(FPGA2_BASE | 0x346))) //The 16 Lsb bits of the shifted in data.
#define F2_MOTO_DISPENSER_A1_3_WORDS (*((volatile short *)(FPGA2_BASE | 0x348))) //The amount of spi words (usually byte sized) per transmission.
//MOTO_DISPENSER_A1_4
#define F2_MOTO_DISPENSER_A1_4_TX_00 (*((volatile short *)(FPGA2_BASE | 0x350))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_4_TX_01 (*((volatile short *)(FPGA2_BASE | 0x352))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_4_RX_00 (*((volatile short *)(FPGA2_BASE | 0x354))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_MOTO_DISPENSER_A1_4_RX_01 (*((volatile short *)(FPGA2_BASE | 0x356))) //The 16 Lsb bits of the shifted in data.
#define F2_MOTO_DISPENSER_A1_4_WORDS (*((volatile short *)(FPGA2_BASE | 0x358))) //The amount of spi words (usually byte sized) per transmission.
//MOTO_DISPENSER_A1_5
#define F2_MOTO_DISPENSER_A1_5_TX_00 (*((volatile short *)(FPGA2_BASE | 0x360))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_5_TX_01 (*((volatile short *)(FPGA2_BASE | 0x362))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_5_RX_00 (*((volatile short *)(FPGA2_BASE | 0x364))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_MOTO_DISPENSER_A1_5_RX_01 (*((volatile short *)(FPGA2_BASE | 0x366))) //The 16 Lsb bits of the shifted in data.
#define F2_MOTO_DISPENSER_A1_5_WORDS (*((volatile short *)(FPGA2_BASE | 0x368))) //The amount of spi words (usually byte sized) per transmission.
//MOTO_DISPENSER_A1_6
#define F2_MOTO_DISPENSER_A1_6_TX_00 (*((volatile short *)(FPGA2_BASE | 0x370))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_6_TX_01 (*((volatile short *)(FPGA2_BASE | 0x372))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_6_RX_00 (*((volatile short *)(FPGA2_BASE | 0x374))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_MOTO_DISPENSER_A1_6_RX_01 (*((volatile short *)(FPGA2_BASE | 0x376))) //The 16 Lsb bits of the shifted in data.
#define F2_MOTO_DISPENSER_A1_6_WORDS (*((volatile short *)(FPGA2_BASE | 0x378))) //The amount of spi words (usually byte sized) per transmission.
//MOTO_DISPENSER_A1_7
#define F2_MOTO_DISPENSER_A1_7_TX_00 (*((volatile short *)(FPGA2_BASE | 0x380))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_7_TX_01 (*((volatile short *)(FPGA2_BASE | 0x382))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_7_RX_00 (*((volatile short *)(FPGA2_BASE | 0x384))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_MOTO_DISPENSER_A1_7_RX_01 (*((volatile short *)(FPGA2_BASE | 0x386))) //The 16 Lsb bits of the shifted in data.
#define F2_MOTO_DISPENSER_A1_7_WORDS (*((volatile short *)(FPGA2_BASE | 0x388))) //The amount of spi words (usually byte sized) per transmission.
//MOTO_DISPENSER_A1_8
#define F2_MOTO_DISPENSER_A1_8_TX_00 (*((volatile short *)(FPGA2_BASE | 0x390))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_8_TX_01 (*((volatile short *)(FPGA2_BASE | 0x392))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F2_MOTO_DISPENSER_A1_8_RX_00 (*((volatile short *)(FPGA2_BASE | 0x394))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F2_MOTO_DISPENSER_A1_8_RX_01 (*((volatile short *)(FPGA2_BASE | 0x396))) //The 16 Lsb bits of the shifted in data.
#define F2_MOTO_DISPENSER_A1_8_WORDS (*((volatile short *)(FPGA2_BASE | 0x398))) //The amount of spi words (usually byte sized) per transmission.
#define F2_Tacho_reg0 (*((volatile short *)(FPGA2_BASE | 0x3C0))) //This Register stores the Tacho counter
//Prescaler
#define F2_Prescaler1_reg0 (*((volatile short *)(FPGA2_BASE | 0x3E0))) //Parameter for prescaler divisions - 6bit ssi high duty cycle value for prescaler
#define F2_Prescaler1_reg1 (*((volatile short *)(FPGA2_BASE | 0x3E2))) //Parameter for prescaler divisions - 6bit ssi low duty cycle value for prescaler
#define F2_Prescaler1_reg2 (*((volatile short *)(FPGA2_BASE | 0x3E4))) //Parameter for prescaler divisions - 3bit spi temp low duty cycle value for pmw
#define F2_Prescaler1_reg3 (*((volatile short *)(FPGA2_BASE | 0x3E6))) //Parameter for prescaler divisions - 3bit spi temp high duty cycle value for pmw
#define F2_Prescaler1_reg4 (*((volatile short *)(FPGA2_BASE | 0x3E8))) //Parameter for prescaler divisions - 3bit spi moto low duty cycle value for pmw
#define F2_Prescaler1_reg5 (*((volatile short *)(FPGA2_BASE | 0x3EA))) //Parameter for prescaler divisions - 3bit spi moto high duty cycle value for pmw
#define F2_Prescaler1_reg6 (*((volatile short *)(FPGA2_BASE | 0x3EC))) //Parameter for prescaler divisions - 8bit BLOWER low duty cycle value for pmw
#define F2_Prescaler1_reg7 (*((volatile short *)(FPGA2_BASE | 0x3EE))) //Parameter for prescaler divisions - 8bit BLOWER high duty cycle value for pmw
//Test
#define F2_Test (*((volatile short *)(FPGA2_BASE | 0x3F0))) //Readback not - gives the inverse of the written to value
// * * * * * * * * * * * * * * * * FPGA 3 * * * * * * * * * * * * * * * * //
//Version1
#define F3_Ver1_D (*((volatile short *)(FPGA3_BASE | 0x000))) //Version of Fpga is held here
//Version2
#define F3_Ver2_D (*((volatile short *)(FPGA3_BASE | 0x010))) //Version of Fpga is held here
//GPI 01
#define F3_GPI_01_D (*((volatile short *)(FPGA3_BASE | 0x020))) //Reads the direct values that are currently being sent to the fpga.
#define F3_GPI_01_L (*((volatile short *)(FPGA3_BASE | 0x022))) //Value of the latched shorterrupts that have occurred
#define F3_GPI_01_M (*((volatile short *)(FPGA3_BASE | 0x024))) //Value of the shorterrupt mask, Default is 0x0000
//MIDTANK 01
#define F3_MIDTANK_01_Direct (*((volatile short *)(FPGA3_BASE | 0x030))) //Reads the direct values that are currently being sent to the fpga.
#define F3_MIDTANK_01_Latched (*((volatile short *)(FPGA3_BASE | 0x032))) //Value of the latched shorterrupts that have occurred
#define F3_MIDTANK_01_Mask (*((volatile short *)(FPGA3_BASE | 0x034))) //Value of the shorterrupt mask, Default is 0x0000
//MIDTANK 02
#define F3_MIDTANK_02_Direct (*((volatile short *)(FPGA3_BASE | 0x040))) //Reads the direct values that are currently being sent to the fpga.
#define F3_MIDTANK_02_Latched (*((volatile short *)(FPGA3_BASE | 0x042))) //Value of the latched shorterrupts that have occurred
#define F3_MIDTANK_02_Mask (*((volatile short *)(FPGA3_BASE | 0x044))) //Value of the shorterrupt mask, Default is 0x0000
//DISPENSER_ROTENC_IN
#define F3_DISPENSER_ROTENC_IN_Direct (*((volatile short *)(FPGA3_BASE | 0x050))) //Reads the direct values that are currently being sent to the fpga.
#define F3_DISPENSER_ROTENC_IN_Latched (*((volatile short *)(FPGA3_BASE | 0x052))) //Value of the latched shorterrupts that have occurred
#define F3_DISPENSER_ROTENC_IN_Mask (*((volatile short *)(FPGA3_BASE | 0x054))) //Value of the shorterrupt mask, Default is 0x0000
//Moto_Driver_NBUSY_register1
#define F3_Moto_Driver_NBUSY1_D (*((volatile short *)(FPGA3_BASE | 0x060))) //Reads the direct values that are currently being sent to the fpga.
#define F3_Moto_Driver_NBUSY1_L (*((volatile short *)(FPGA3_BASE | 0x062))) //Value of the latched shorterrupts that have occurred
#define F3_Moto_Driver_NBUSY1_M (*((volatile short *)(FPGA3_BASE | 0x064))) //Value of the shorterrupt mask, Default is 0x0000
//CARTx_PRES
#define F3_CARTx_PRES_02_Direct (*((volatile short *)(FPGA3_BASE | 0x070))) //Reads the direct values that are currently being sent to the fpga.
#define F3_CARTx_PRES_02_Latched (*((volatile short *)(FPGA3_BASE | 0x072))) //Value of the latched shorterrupts that have occurred
#define F3_CARTx_PRES_02_Mask (*((volatile short *)(FPGA3_BASE | 0x074))) //Value of the shorterrupt mask, Default is 0x0000
//LS_01
#define F3_LS_01_Direct (*((volatile short *)(FPGA3_BASE | 0x080))) //Reads the direct values that are currently being sent to the fpga.
#define F3_LS_01_Latched (*((volatile short *)(FPGA3_BASE | 0x082))) //Value of the latched shorterrupts that have occurred
#define F3_LS_01_Mask (*((volatile short *)(FPGA3_BASE | 0x084))) //Value of the shorterrupt mask, Default is 0x0000
//GPI_02
#define F3_GPI_02_Direct (*((volatile short *)(FPGA3_BASE | 0x090))) //Reads the direct values that are currently being sent to the fpga.
#define F3_GPI_02_Latched (*((volatile short *)(FPGA3_BASE | 0x092))) //Value of the latched shorterrupts that have occurred
#define F3_GPI_02_Mask (*((volatile short *)(FPGA3_BASE | 0x094))) //Value of the shorterrupt mask, Default is 0x0000
//Spi_Busy_01
#define F3_SPI_Busy1_D (*((volatile short *)(FPGA3_BASE | 0x0A0))) //Reads the direct values that are currently being sent to the fpga.
#define F3_SPI_Busy1_L (*((volatile short *)(FPGA3_BASE | 0x0A2))) //Value of the latched shorterrupts that have occurred
#define F3_SPI_Busy1_M (*((volatile short *)(FPGA3_BASE | 0x0A4))) //Value of the shorterrupt mask, Default is 0x0000
//Moto_Driver_NSTBYRST_register1
#define F3_Moto_Driver_NSTBYRST1 (*((volatile short *)(FPGA3_BASE | 0x0B2))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//GPO_01
#define F3_GPO_01_bus (*((volatile short *)(FPGA3_BASE | 0x0C2))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//Moto_Driver_SW_register1
#define F3_Moto_Driver_SW1 (*((volatile short *)(FPGA3_BASE | 0x0D2))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//VALVE_OUT
#define F3_VALVE_OUT (*((volatile short *)(FPGA3_BASE | 0x0E2))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//DISPENSER_ROTENC_OUT
#define F3_DISPENSER_ROTENC_OUT (*((volatile short *)(FPGA3_BASE | 0x0F2))) //Writes to values. Readback thevaluessthat are currently in the GPO register
//QEI_SCREW_ROTENC
#define F3_SPARE1_ROTENC_lsb (*((volatile short *)(FPGA3_BASE | 0x100))) //Value of the lsb of the QEI register
#define F3_SPARE1_ROTENC_msb (*((volatile short *)(FPGA3_BASE | 0x102))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
#define F3_SPARE1_ROTENC_index (*((volatile short *)(FPGA3_BASE | 0x104))) //value of index counter
//QEI_RSPARE_ROTENC
#define F3_RSPARE_ROTENC_lsb (*((volatile short *)(FPGA3_BASE | 0x110))) //Value of the lsb of the QEI register
#define F3_RSPARE_ROTENC_msb (*((volatile short *)(FPGA3_BASE | 0x112))) //10bits Value of the Msb of the QEI register, 1bit Direction of movement, 5bits Reserved
#define F3_RSPARE_ROTENC_index (*((volatile short *)(FPGA3_BASE | 0x114))) //value of index counter
//SPI_MOTO_RLOADING_A1
#define F3_MOTO_SPARE1_1_A1_TX_00 (*((volatile short *)(FPGA3_BASE | 0x200))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE1_1_A1_TX_01 (*((volatile short *)(FPGA3_BASE | 0x202))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE1_1_A1_RX_00 (*((volatile short *)(FPGA3_BASE | 0x204))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F3_MOTO_SPARE1_1_A1_RX_01 (*((volatile short *)(FPGA3_BASE | 0x206))) //The 16 Lsb bits of the shifted in data.
#define F3_MOTO_SPARE1_1_A1_WORDS (*((volatile short *)(FPGA3_BASE | 0x208))) //The amount of spi words (usually byte sized) per transmission.
//SPI_MOTO_RDRIVING_A1
#define F3_MOTO_SPARE1_2_A1_TX_00 (*((volatile short *)(FPGA3_BASE | 0x210))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE1_2_A1_TX_01 (*((volatile short *)(FPGA3_BASE | 0x212))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE1_2_A1_RX_00 (*((volatile short *)(FPGA3_BASE | 0x214))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F3_MOTO_SPARE1_2_A1_RX_01 (*((volatile short *)(FPGA3_BASE | 0x216))) //The 16 Lsb bits of the shifted in data.
#define F3_MOTO_SPARE1_2_A1_WORDS (*((volatile short *)(FPGA3_BASE | 0x218))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_LDRIVING_A1
#define F3_MOTO_SPARE2_1_A1_TX_00 (*((volatile short *)(FPGA3_BASE | 0x220))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE2_1_A1_TX_01 (*((volatile short *)(FPGA3_BASE | 0x222))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE2_1_A1_RX_00 (*((volatile short *)(FPGA3_BASE | 0x224))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F3_MOTO_SPARE2_1_A1_RX_01 (*((volatile short *)(FPGA3_BASE | 0x226))) //The 16 Lsb bits of the shifted in data.
#define F3_MOTO_SPARE2_1_A1_WORDS (*((volatile short *)(FPGA3_BASE | 0x228))) //The amount of spi words (usually byte sized) per transmission.
//SPI_F1_MOTO_LLOADING_A1
#define F3_MOTO_SPARE2_2_A1_TX_00 (*((volatile short *)(FPGA3_BASE | 0x230))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE2_2_A1_TX_01 (*((volatile short *)(FPGA3_BASE | 0x232))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE2_2_A1_RX_00 (*((volatile short *)(FPGA3_BASE | 0x234))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F3_MOTO_SPARE2_2_A1_RX_01 (*((volatile short *)(FPGA3_BASE | 0x236))) //The 16 Lsb bits of the shifted in data.
#define F3_MOTO_SPARE2_2_A1_WORDS (*((volatile short *)(FPGA3_BASE | 0x238))) //The amount of spi words (usually byte sized) per transmission.
#define F3_MOTO_SPARE3_1_A1_TX_00 (*((volatile short *)(FPGA3_BASE | 0x240))) //The second register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE3_1_A1_TX_01 (*((volatile short *)(FPGA3_BASE | 0x242))) //The first register to be shifted out of the spi. The msb bit of this register is shifted out first.
#define F3_MOTO_SPARE3_1_A1_RX_00 (*((volatile short *)(FPGA3_BASE | 0x244))) //The 8 msb bits of the shifted in bits. The 8 msb bits of this register are zeros.
#define F3_MOTO_SPARE3_1_A1_RX_01 (*((volatile short *)(FPGA3_BASE | 0x246))) //The 16 Lsb bits of the shifted in data.
#define F3_MOTO_SPARE3_1_A1_WORDS (*((volatile short *)(FPGA3_BASE | 0x248))) //The amount of spi words (usually byte sized) per transmission.
//SSI
#define F3_SPARE1_ROTENC_DATA_p_1_RX_lsb (*((volatile short *)(FPGA3_BASE | 0x2C0))) //The 16 Lsb bits of the shifted in data.
#define F3_SPARE1_ROTENC_DATA_p_1_RX_msb (*((volatile short *)(FPGA3_BASE | 0x2C2))) //16 bit MSB if nessesary
#define F3_SPARE1_ROTENC_DATA_p_1_TX (*((volatile short *)(FPGA3_BASE | 0x2CE))) //This register triggers a TX transmission
#define F3_SPARE2_ROTENC_DATA_p_2_RX_lsb (*((volatile short *)(FPGA3_BASE | 0x2D0))) //The 16 Lsb bits of the shifted in data.
#define F3_SPARE2_ROTENC_DATA_p_2_RX_msb (*((volatile short *)(FPGA3_BASE | 0x2D2))) //16 bit MSB if nessesary
#define F3_SPARE2_ROTENC_DATA_p_2_TX (*((volatile short *)(FPGA3_BASE | 0x2DE))) //This register triggers a TX transmission
#define F3_Prescaler1_reg9 (*((volatile short *)(FPGA3_BASE | 0x3C2))) //Variable for prescaler divisions -amount of prescaled clocks clk input of prescaler of signal debouncer of the limit switch. 14bits. The value inserted here is multiply by 8 before being set.
#define F3_SW_RESET_reg (*((volatile short *)(FPGA3_BASE | 0x3D0))) //This register resets the MCU
//Prescaler
#define F3_Prescaler1_reg1 (*((volatile short *)(FPGA3_BASE | 0x3E0))) //Parameter for prescaler divisions - 6bit ssi high duty cycle value for prescale
#define F3_Prescaler1_reg2 (*((volatile short *)(FPGA3_BASE | 0x3E2))) //Parameter for prescaler divisions - 6bit ssi low duty cycle value for prescaler
#define F3_Prescaler1_reg3 (*((volatile short *)(FPGA3_BASE | 0x3E4))) //Parameter for prescaler divisions - 3bit spi moto low duty cycle value for pmw
#define F3_Prescaler1_reg4 (*((volatile short *)(FPGA3_BASE | 0x3E6))) //Parameter for prescaler divisions - 3bit spi moto high duty cycle value for pmw
#define F3_Prescaler1_reg5 (*((volatile short *)(FPGA3_BASE | 0x3E8))) //Parameter for prescaler divisions
#define F3_Prescaler1_reg6 (*((volatile short *)(FPGA3_BASE | 0x3EA))) //Parameter for prescaler divisions
#define F3_Prescaler1_reg7 (*((volatile short *)(FPGA3_BASE | 0x3EC))) //Parameter for prescaler divisions
#define F3_Prescaler1_reg8 (*((volatile short *)(FPGA3_BASE | 0x3EE))) //Parameter for prescaler divisions
//Test
#define F3_Test (*((volatile short *)(FPGA3_BASE | 0x3F0))) //Readback not - gives the inverse of the written to value
//1 Version1_Direct
typedef union
{
struct
{
unsigned char Month; //0-7
unsigned char Day; //8-15
}bytes;
unsigned short ushort;
}VER1;
//4 Version2_Direct
typedef union
{
struct
{
unsigned char Ver_num; //0-7
unsigned char Year; //8-15
}bytes;
unsigned short ushort;
}VER2;
//F1_Moto_Driver_NBUSY1_Direct
typedef union
{
struct
{
bool F1_MOTO_LPIVOT1_A1_NBUSY : 1; //0
bool F1_MOTO_LLOADING_A1_NBUSY : 1; //1
bool F1_MOTO_LDRIVING_A1_NBUSY : 1; //2
bool F1_MOTO_LDANCER2_A1_NBUSY : 1; //3
bool F1_MOTO_LDANCER1_A1_NBUSY : 1; //4
bool F1_MOTO_DRYER_LOADARM_A1_NBUSY : 1; //5
bool F1_MOTO_DRYER_LID_A1_NBUSY : 1; //6
bool F1_MOTO_DRYER_DRIVING_A1_NBUSY : 1; //7
bool F1_MOTO_DH_LID_A1_NBUSY : 1; //8
bool F1_MOTO_DH_CLEANMECH_A1_NBUSY : 1; //9
bool F1_MOTO_DH_CLEANHEAD_A1_NBUSY : 1; //10
unsigned char RESERVE:5; //11-15
}bits;
unsigned short ushort;
}F1MOTNBUSY1;
//19 F1_Moto_Driver_NBUSY2_Direct
typedef union
{
struct
{
bool F1_MOTO_WINDER_A1_NBUSY : 1; //0
bool F1_MOTO_SCREW_A1_NBUSY : 1; //1
bool F1_MOTO_RLOADING_A1_NBUSY : 1; //2
bool F1_MOTO_RLOADARM_A1_NBUSY : 1; //3
bool F1_MOTO_RDRIVING_A1_NBUSY : 1; //4
bool F1_MOTO_RDANCER_A1_NBUSY : 1; //5
unsigned char RESERVE1 : 2; // 6-7
unsigned char RESERVE2; // 8-15
}bits;
unsigned short ushort;
}F1MOTNBUSY2;
//F2_Moto_Driver_NBUSY1_Direct
typedef union
{
struct
{
bool F2_MOTO_DISPENSER_A1_8_NBUSY : 1; //0
bool F2_MOTO_DISPENSER_A1_7_NBUSY : 1; //1
bool F2_MOTO_DISPENSER_A1_6_NBUSY : 1; //2
bool F2_MOTO_DISPENSER_A1_5_NBUSY : 1; //3
bool F2_MOTO_DISPENSER_A1_4_NBUSY : 1; //4
bool F2_MOTO_DISPENSER_A1_3_NBUSY : 1; //5
bool F2_MOTO_DISPENSER_A1_2_NBUSY : 1; //6
bool F2_MOTO_DISPENSER_A1_1_NBUSY : 1; //7
unsigned char RESERVE:5; //8-15
}bits;
unsigned short ushort;
}F2MOTNBUSY1;
//F3_Moto_Driver_NBUSY1_Direct
typedef union
{
struct
{
bool F3_MOTO_SPARE1_1_A1_NBUSY : 1; //0
bool F3_MOTO_SPARE1_2_A1_NBUSY : 1; //1
bool F3_MOTO_SPARE2_1_A1_NBUSY : 1; //2
bool F3_MOTO_SPARE2_2_A1_NBUSY : 1; //3
bool F3_MOTO_SPARE3_1_A1_NBUSY : 1; //4
unsigned char RESERVE1 : 3; //5-7
unsigned char RESERVE : 5; //8-15
}bits;
unsigned short ushort;
}F3MOTNBUSY1;
//-------------------------------------------------------------
//F1_SPI_Busy1_Direct
typedef union
{
struct
{
bool F1_RSPARE_ROTENC_DATA_p_busy : 1; //0
bool F1_RDANCER_ROTENC_DATA_p_busy : 1; //1
bool F1_LSPARE_ROTENC_DATA_p_busy : 1; //2
bool F1_LDANCER2_ROTENC_DATA_p_busy : 1; //3
bool F1_LDANCER1_ROTENC_DATA_p_busy : 1; //4
bool F1_MOTO_RLOADING_A1_SDI_busy : 1; //5
bool F1_MOTO_RDRIVING_A1_SDI_busy : 1; //6
bool F1_MOTO_DRYER_DRIVING_A1_SDI_busy : 1; //7
bool F1_MOTO_WINDER_A1_SDI_busy : 1; //8
bool F1_MOTO_LDANCER2_A1_SDI_busy : 1; //9
bool F1_MOTO_LDRIVING_A1_SDI_busy : 1; //10
bool F1_MOTO_DH_CLEANHEAD_A1_SDI_busy : 1; //11
bool F1_MOTO_RLOADARM_A1_SDI_busy : 1; //12
bool F1_MOTO_DRYER_LID_A1_SDI_busy : 1; //13
bool F1_MOTO_LLOADING_A1_SDI_busy : 1; //14
bool F1_MOTO_DH_CLEANMECH_A1_SDI_busy : 1; //15
}bits;
unsigned short ushort;
}F1SPIBUSY1;
//F2_SPI_Busy1_Direct
typedef union
{
struct
{
bool F2_ANALOG_DRYER_TEMP1_1_BUSY : 1; //0
bool F2_ANALOG_DRYER_TEMP2_1_BUSY : 1; //1
bool F2_ANALOG_DRYER_TEMP3_1_BUSY : 1; //2
bool F2_ANALOG_DYEINGH_TEMP1_1_BUSY : 1; //3
bool F2_ANALOG_DYEINGH_TEMP2_1_BUSY : 1; //4
bool F2_ANALOG_DYEINGH_TEMP3_1_BUSY : 1; //5
bool F2_ANALOG_DYEINGH_TEMP4_1_BUSY : 1; //6
bool F2_ANALOG_DYEINGH_TEMP5_1_BUSY : 1; //7
bool F2_ANALOG_MIXCHIP_TEMP_1_BUSY : 1; //8
bool F2_AN_ENCLOSURETEMP1_1_BUSY : 1; //9
bool F2_AN_ENCLOSURETEMP2_1_BUSY : 1; //10
bool F2_AN_ENCLOSURETEMP3_1_BUSY : 1; //11
bool spi_busy12 : 1; //12
bool spi_busy13 : 1; //13
bool spi_busy14 : 1; //14
bool spi_busy15 : 1; //15
}bits;
unsigned short ushort;
}F2SPIBUSY1;
//F1_SPI_Busy2_Direct
typedef union
{
struct
{
bool F1_MOTO_RDANCER_A1_SDI_busy : 1; //0
bool F1_MOTO_DH_LID_A1_SDI_busy : 1; //1
bool F1_MOTO_DRYER_LOADARM_A1_SDI_busy : 1; //2
bool F1_MOTO_SCREW_A1_SDI_busy : 1; //3
bool F1_MOTO_LDANCER1_A1_SDI_busy : 1; //4
bool F1_MOTO_LPIVOT1_A1_SDI_busy : 1; //5
bool spi_busy22 : 1; //6
bool spi_busy23 : 1; //7
bool spi_busy24 : 1; //8
bool spi_busy25 : 1; //9
bool spi_busy26 : 1; //10
bool spi_busy27 : 1; //11
bool spi_busy28 : 1; //12
bool spi_busy29 : 1; //13
bool spi_busy30 : 1; //14
bool spi_busy31 : 1; //15
}bits;
unsigned short ushort;
}F1SPIBUSY2;
//F2_SPI_Busy2_Direct
typedef union
{
struct
{
bool spi_busy16 : 1; //0
bool spi_busy17 : 1; //1
bool spi_busy18 : 1; //2
bool spi_busy19 : 1; //3
bool F2_MOTO_DISPENSER_A1_1_BUSY : 1; //4
bool F2_MOTO_DISPENSER_A1_2_BUSY : 1; //5
bool F2_MOTO_DISPENSER_A1_3_BUSY : 1; //6
bool F2_MOTO_DISPENSER_A1_4_BUSY : 1; //7
bool F2_MOTO_DISPENSER_A1_5_BUSY : 1; //8
bool F2_MOTO_DISPENSER_A1_6_BUSY : 1; //9
bool F2_MOTO_DISPENSER_A1_7_BUSY : 1; //10
bool F2_MOTO_DISPENSER_A1_8_BUSY : 1; //11
bool spi_busy28 : 1; //12
bool spi_busy29 : 1; //13
bool spi_busy30 : 1; //14
bool spi_busy31 : 1; //15
}bits;
unsigned short ushort;
}F2SPIBUSY2;
//F3_busy_01_Direct
typedef union
{
struct
{
bool F3_SPARE2_ROTENC_DATA_p_busy : 1; //0
bool F3_SPARE1_ROTENC_DATA_p_busy : 1; //1
bool F3_MOTO_SPARE1_1_A1_SDI_busy : 1; //2
bool F3_MOTO_SPARE1_2_A1_SDI_busy : 1; //3
bool F3_MOTO_SPARE2_1_A1_SDI_busy : 1; //4
bool F3_MOTO_SPARE2_2_A1_SDI_busy : 1; //5
bool F3_MOTO_SPARE3_1_A1_SDI_busy : 1; //6
bool spi_busy7 : 1; //7
bool spi_busy8 : 1; //8
bool spi_busy9 : 1; //9
bool spi_busy10 : 1; //10
bool spi_busy11 : 1; //11
bool spi_busy12 : 1; //12
bool spi_busy13 : 1; //13
bool spi_busy14 : 1; //14
bool spi_busy15 : 1; //15
}bits;
unsigned short ushort;
}F3SPIBUSY1;
//-----------------------------------------------------------
//29 + 32 SPI_Busy_register1 + SPI_Busy_register2
typedef union
{
struct
{
unsigned char SPI_Busy_1_D;
unsigned char SPI_Busy_2_D;
}ushort;
unsigned int uint;
}SPI_BUSY;
//35 Moto_Driver_NSTBYRST1
typedef union
{
struct
{
bool LPIVOT1 : 1; //0
bool LLOADING : 1; //1
bool LDRIVING : 1; //2
bool LDANCER2 : 1; //3
bool LDANCER1 : 1; //4
bool DRYER_LOADARM : 1; //5
bool DRYER_LID : 1; //6
bool DRYER_DRIVING : 1; //7
bool DH_LID : 1; //8
bool DH_CLEANMECH : 1; //9
bool DH_CLEANHEAD : 1; //10
unsigned char RESERVE:5; //11-15
}bits;
unsigned short ushort;
}MOT_NSTBYRST1;
//36 Moto_Driver_NSTBYRST2
typedef union
{
struct
{
bool WINDER : 1; //0
bool SCREW : 1; //1
bool RLOADING : 1; //2
bool RLOADARM : 1; //3
bool RDRIVING : 1; //4
bool RDANCER : 1; //5
unsigned char RESERVE1:2; // 6-7
unsigned char RESERVE2; // 8-15
}bits;
unsigned short ushort;
}MOT_NSTBYRST2;
//37 Moto_Driver_SW_register1 - Moto_Driver_SW1
typedef union
{
struct
{
bool LPIVOT1 : 1; //0
bool LLOADING : 1; //1
bool LDRIVING : 1; //2
bool LDANCER2 : 1; //3
bool LDANCER1 : 1; //4
bool DRYER_LOADARM : 1; //5
bool DRYER_LID : 1; //6
bool DRYER_DRIVING; //7
bool DH_LID : 1; //8
bool DH_CLEANMECH : 1; //9
bool DH_CLEANHEAD : 1; //10
bool GPO_TFEED_BREAK_1 : 1; //11
bool GPO_TFEED_BREAK_2 : 1; //12
unsigned char RESERVE:3; // 13-15
}bits;
unsigned short ushort;
}MOT_SW1;
//38 Moto_Driver_SW_register2 - Moto_Driver_SW2
typedef union
{
struct
{
bool F1_MOTO_WINDER_A1_SW : 1; //0
bool F1_MOTO_SCREW_A1_SW : 1; //1
bool F1_MOTO_RLOADING_A1_SW : 1; //2
bool F1_MOTO_RLOADARM_A1_SW : 1; //3
bool F1_MOTO_RDRIVING_A1_SW : 1; //4
bool F1_MOTO_RDANCER_A1_SW : 1; //5
unsigned char RESERVE1:2; // 6-7
unsigned char RESERVE2; // 8-15
}bits;
unsigned short ushort;
}MOT_SW2;
//308 GPO_01
typedef union
{
struct
{
bool F3_GPO_LED4 : 1; //0
bool F3_GPO_LED3 : 1; //1
bool F3_GPO_LED2 : 1; //2
bool F3_GPO_LED1 : 1; //3
bool F3_GPO_EXTWINDER_SSR11_CTRL : 1; //4
bool F3_GPO_BUZZER : 1; //4
bool F3_SPARE2_ROTENC_CLK : 1; //6
bool F3_SPARE1_ROTENC_CLK : 1; //7
unsigned char RESERVE; // 8-15
}bits;
unsigned short ushort;
}GP_Out_01;
//372 F3_VALVE_OUT
typedef union
{
struct
{
//Dry air Valves
bool MIDTANK2MANIF4_VALVE_2 : 1; //0
bool MIDTANK2MANIF4_VALVE_1 : 1; //1
bool MIDTANK2MANIF3_VALVE_2 : 1; //2
bool MIDTANK2MANIF3_VALVE_1 : 1; //3
bool MIDTANK2MANIF2_VALVE_2 : 1; //4
bool MIDTANK2MANIF2_VALVE_1 : 1; //5
bool MIDTANK2MANIF1_VALVE_2 : 1; //6
bool MIDTANK2MANIF1_VALVE_1 : 1; //7
//
bool CART2MIDTANK4_VALVE_2 : 1; //8
bool CART2MIDTANK4_VALVE_1 : 1; //9
bool CART2MIDTANK3_VALVE_2 : 1; //10
bool CART2MIDTANK3_VALVE_1 : 1; //11
bool CART2MIDTANK2_VALVE_2 : 1; //12
bool CART2MIDTANK2_VALVE_1 : 1; //13
bool CART2MIDTANK1_VALVE_2 : 1; //14
bool CART2MIDTANK1_VALVE_1 : 1; //15
}bits;
unsigned short ushort;
}VALVE_GPO_REG;
//F1_gpo_01
typedef union
{
struct
{
bool F1_GPO_WASTECH_PUMP2 : 1; //0
bool F1_GPO_WHS_WTANKPUMP2 : 1; //1
bool F1_GPO_DILUTORPUMP_SSR10_CTRL : 1; //2
bool F1_GPO_EXTWINDER_3 : 1; //3
bool F1_GPO_EXTWINDER_2 : 1; //4
bool F1_GPO_EXTWINDER_1 : 1; //5
bool F1_VALVE_WASTE_TANK : 1; //6
bool F1_VALVE_MIXCHIP_WASTECH : 1; //7
unsigned char RESERVE; // 8-15
}bits;
unsigned short ushort;
}F1_GPO_REG;
//F2_DISPENSER_VALVE_OUT
typedef union
{
struct
{
bool F2_DISPENSER_VALVE_C1_1_C2_1 : 1;//0
bool F2_DISPENSER_VALVE_C1_2_C2_2 : 1;//1
bool F2_DISPENSER_VALVE_C1_3_C2_3 : 1;//2
bool F2_DISPENSER_VALVE_C1_4_C2_4 : 1;//3
bool F2_DISPENSER_VALVE_C1_5_C2_5 : 1;//4
bool F2_DISPENSER_VALVE_C1_6_C2_6 : 1;//5
bool F2_DISPENSER_VALVE_C1_7_C2_7 : 1;//6
bool F2_DISPENSER_VALVE_C1_8_C2_8 : 1;//7
bool F2_DISPENSER_VALVE_EN_1 : 1;//8
bool F2_DISPENSER_VALVE_EN_2 : 1;//9
bool F2_DISPENSER_VALVE_EN_3 : 1;//10
bool F2_DISPENSER_VALVE_EN_4 : 1;//11
bool F2_DISPENSER_VALVE_EN_5 : 1;//12
bool F2_DISPENSER_VALVE_EN_6 : 1;//13
bool F2_DISPENSER_VALVE_EN_7 : 1;//14
bool F2_DISPENSER_VALVE_EN_8 : 1;//15
}bits;
unsigned short ushort;
}DISPENSER_VALVE_GPO_REG;
//F2_DISPENSER_VALVE_IN_Direct
typedef union
{
struct
{
//Dispenser Valves OCD
bool F2_DISPENSER_VALVE_OCD_8 : 1; //0
bool F2_DISPENSER_VALVE_OCD_7 : 1; //1
bool F2_DISPENSER_VALVE_OCD_6 : 1; //2
bool F2_DISPENSER_VALVE_OCD_5 : 1; //3
bool F2_DISPENSER_VALVE_OCD_4 : 1; //4
bool F2_DISPENSER_VALVE_OCD_3 : 1; //5
bool F2_DISPENSER_VALVE_OCD_2 : 1; //6
bool F2_DISPENSER_VALVE_OCD_1 : 1; //7
///Dispenser Valves Busy
bool Valve_busy_7 : 1; //8
bool Valve_busy_6 : 1; //9
bool Valve_busy_5 : 1; //10
bool Valve_busy_4 : 1; //11
bool Valve_busy_3 : 1; //12
bool Valve_busy_2 : 1; //13
bool Valve_busy_1 : 1; //14
bool Valve_busy_0 : 1; //15
}bits;
unsigned short ushort;
}VALVE_BUSY_REG;
//---------------------------------- Limit_Switches ------------------------------------------------
//F1_GPI_LS1_D
typedef union
{
struct
{
bool F1_LS_DRYER_SPARE4 : 1; //0
bool F1_LS_DRYER_SPARE3 : 1; //1
bool F1_LS_DRYER_SPARE2 : 1; //2
bool F1_LS_DRYER_SPARE1 : 1; //3
bool F1_LS_DRYER_LID_OPEN : 1; //4
bool F1_LS_DRYER_LID_CLOSED : 1; //5
bool F1_LS_DH_SPARE2 : 1; //6
bool F1_LS_DH_LID_OPEN : 1; //7
bool F1_LS_DH_LID_CLOSED : 1; //8
bool F1_LS_DH_LID_CLEANING : 1; //9
bool F1_LS_DH_CLEAN_UP : 1; //10
bool F1_LS_DH_CLEAN_RIGHT : 1; //11
bool F1_LS_DH_CLEAN_LEFT : 1; //12
bool F1_LS_DH_CLEAN_DOWN : 1; //13
bool RESERVE_BIT14 : 1; //14
bool RESERVE_BIT15 : 1; //15
}bits;
unsigned short ushort;
}Limit_Switch1_REG;
//F1_GPI_LS2_D
typedef union
{
struct
{
bool F1_LS_PIVOT_SPARE2 : 1; //0
bool F1_LS_PIVOT_SPARE1 : 1; //1
bool F1_LS_LSPARE2 : 1; //2
bool F1_LS_LSPARE1 : 1; //3
bool F1_LS_LPIVOT_UP : 1; //4
bool F1_LS_LPIVOT_DOWN : 1; //5
bool F1_LS_LOADARM_RIGHT : 1; //6
bool F1_LS_LOADARM_LEFT : 1; //7
bool F1_LS_LLOADMOTOR_UP : 1; //8
bool F1_LS_LLOADMOTOR_DOW: 1; //9
bool F1_LS_LDANCER2_UP : 1; //10
bool F1_LS_LDANCER2_DOWN : 1; //11
bool F1_LS_LDANCER1_UP : 1; //12
bool F1_LS_LDANCER1_DOWN : 1; //13
bool RESERVE_BIT14 : 1; //14
bool RESERVE_BIT15 : 1; //15
}bits;
unsigned short ushort;
}Limit_Switch2_REG;
//F1_GPI_LS3_D
typedef union
{
struct
{
bool F1_LS_SCREW_RIGHT : 1; //0
bool F1_LS_SCREW_LEFT : 1; //1
bool F1_LS_RSPARE2 : 1; //2
bool F1_LS_RSPARE1 : 1; //3
bool F1_LS_RDANCER_LONG : 1; //4 (F1_LS_RLOADRAM_UP)
bool F1_LS_RLOADRAM_DOWN : 1; //5
bool F1_LS_RLOADMOTOR_UP : 1; //6
bool F1_LS_RLOADMOTOR_DOWN : 1; //7
bool F1_LS_RDANCER_UP : 1; //8
bool F1_LS_RDANCER_DOWN : 1; //9
bool F1_SW_SPARE : 1; //10
bool F1_SW_SPOOL_EXISTS : 1; //11
bool RESERVE_BIT12 : 1; //12
bool RESERVE_BIT13 : 1; //13
bool RESERVE_BIT14 : 1; //14
bool RESERVE_BIT15 : 1; //15
}bits;
unsigned short ushort;
}Limit_Switch3_REG;
//------------------------------ MOTOR DRIVER L_6470 ------------------------------
typedef union
{
struct
{
unsigned short LSB;
unsigned short MSB;
}ushort;
unsigned int uint;
}INT2SHORT;//16->32
typedef union
{
struct
{
unsigned char LSB;
unsigned char MSB;
}uchar;
unsigned short uint;
}SHORT2CHAR;//16->8
typedef union
{
struct
{
unsigned char UCHAR_0;
unsigned char UCHAR_1;
unsigned char UCHAR_2;
unsigned char UCHAR_3;
}uchar;
unsigned int uint;
}INT2CHAR;//32->8
//enum
//{
// RLOADING,
// RDRIVING,
// F1_LDRIVING,
// F1_LLOADING,
// F1_DRYER_LOADARM,
// F1_DRYER_DRIVING,
// F1_DH_CLEANHEAD,
// F1_DH_CLEANMECH,
// F1_SCREW,
// F1_WINDER,
// RLOADARM,
// RDANCER,
// LDANCER1,
// LDANCER2,
// DRYER_LID,
// DH_LID,
// LPIVOT1,
//}SPI_TYPE;
////SPI
//typedef struct //S_SPI
//{
// unsigned char Type;
// unsigned int TX_MOSI; //32bit (Master Output Slave Input )
// unsigned int RX_MISO; //24bit (Master Input Slave Output)
// //unsigned int BUSY; //32bit
//
//}SPI;//SPI
/*
#define L6470_MOSI (*((volatile short *)(BASE | 0x0100)))
#define L6470_MISO (*((volatile short *)(BASE | 0x0200)))
#define L6470_CS (*((volatile short *)(BASE | 0x0300)))
#define L6470_CLK (*((volatile short *)(BASE | 0x0400)))
#define L6470_BUSY (*((volatile short *)(BASE | 0x0500)))
#define L6470_RESET (*((volatile short *)(BASE | 0x0600)))
#define L6470_TX (*((volatile char *)(BASE | 0x0700)))
#define L6470_RX (*((volatile char *)(BASE | 0x0800)))
*/
//L6470_MOSI = 0x00;
#endif /* DRIVERS_FPGA_FPGA_COMM_H_ */
|